Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,64 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* CustomView for Exercises
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Iuliana Ojog, NLE, 2019-08-01
|
||||
*/
|
||||
|
||||
#include "mrk_marker.h"
|
||||
#include "ui_mrk_marker.h"
|
||||
#include "mrk_dialog_model.h"
|
||||
|
||||
#include <LtsUtilsCore/dds_vector_to_pixmap.h>
|
||||
|
||||
namespace MarkerManagement
|
||||
{
|
||||
|
||||
CustomViewMarker::CustomViewMarker(QWidget *parent)
|
||||
: AbstractDisplayWidget(parent)
|
||||
, m_ui(new Ui::CustomViewMarker)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->image->setMenuEnabled(false); // no menu !
|
||||
m_ui->image->setDrawOuterRect(false);
|
||||
#ifndef LTS_DEBUG
|
||||
m_ui->lbOperator->setVisible(false);
|
||||
#endif
|
||||
}
|
||||
|
||||
CustomViewMarker::~CustomViewMarker()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
bool CustomViewMarker::init(const QModelIndex &idx)
|
||||
{
|
||||
if (!idx.isValid())
|
||||
return false;
|
||||
|
||||
const QString mrkNote = rowData(idx, MarkerManagement::MarkerManagementDialogModel::ColNote).toString();
|
||||
m_ui->lbMarkerNote->setText(mrkNote);
|
||||
m_ui->lbMarkerNote->setToolTip(mrkNote);
|
||||
|
||||
m_ui->lbOperator->setText(rowData(idx, MarkerManagement::MarkerManagementDialogModel::ColOperator).toString());
|
||||
m_ui->lbTimestamp->setText(rowData(idx, MarkerManagement::MarkerManagementDialogModel::ColTime).toString());
|
||||
m_ui->lbType->setText(rowData(idx, MarkerManagement::MarkerManagementDialogModel::ColType).toString());
|
||||
m_ui->lbOffset->setText(rowData(idx, MarkerManagement::MarkerManagementDialogModel::ColOffset).toString());
|
||||
|
||||
QPixmap img;
|
||||
int fileId = rowData(idx, MarkerManagement::MarkerManagementDialogModel::ColFileId).toInt();
|
||||
if (fileId > 0)
|
||||
{
|
||||
QByteArray imgData = rowData(idx, MarkerManagement::MarkerManagementDialogModel::ColImage).toByteArray();
|
||||
img = LtsUtils::getPixmap(imgData);
|
||||
}
|
||||
|
||||
if (!img.isNull())
|
||||
m_ui->image->setPixmap(img);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace MarkerManagement
|
||||
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* CustomView for Exercises
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Iuliana Ojog, NLE, 2019-08-01
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Viewer/LtsDataView/abstract_display_widget.h>
|
||||
#include <Plugins/MarkerManagement/Gui/Common/mrkcommon_export.h>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class CustomViewMarker;
|
||||
}
|
||||
|
||||
namespace MarkerManagement
|
||||
{
|
||||
class MRKCOMMON_EXPORT CustomViewMarker final : public LtsDataView::AbstractDisplayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CustomViewMarker(QWidget *parent = nullptr);
|
||||
~CustomViewMarker();
|
||||
bool init(const QModelIndex &idx) override;
|
||||
|
||||
private:
|
||||
Ui::CustomViewMarker* m_ui;
|
||||
};
|
||||
} // namespace MarkerManagement
|
||||
@@ -0,0 +1,166 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CustomViewMarker</class>
|
||||
<widget class="QWidget" name="CustomViewMarker">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>351</width>
|
||||
<height>140</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="LtsWidgets::LtsImageEditor" name="image">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>128</width>
|
||||
<height>128</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lbMarkerNote">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"><Marker Note with wordwrap></string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lbOperator">
|
||||
<property name="font">
|
||||
<font>
|
||||
<italic>true</italic>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true"><Operator></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblType">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Type:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="lbTimestamp">
|
||||
<property name="text">
|
||||
<string notr="true"><Timestamp></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="lbOffset">
|
||||
<property name="text">
|
||||
<string notr="true"><Offset></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="lbType">
|
||||
<property name="text">
|
||||
<string notr="true"><Type></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblTime">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblOffset">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Offset:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LtsWidgets::LtsImageEditor</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>LtsWidgets/lts_image_editor.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in new issue
Block a user