Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,49 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
# Created by Patric Karwat, SLSE, 2016-07-03
|
||||
#
|
||||
|
||||
ADD_INTERFACE_LIBRARY(
|
||||
AesMineCorridorGuiPluginInterface
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/aes_mine_corridor_gui_plugin_interface.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
)
|
||||
|
||||
SET(aes_mine_corridor_gui_SRCS
|
||||
aes_mine_corridor_gui_plugin.cpp
|
||||
aes_mine_corridor_gui_plugin.h
|
||||
aes_mine_corridor_edit.cpp
|
||||
aes_mine_corridor_edit.h
|
||||
aes_mine_corridor_list.cpp
|
||||
aes_mine_corridor_list.h
|
||||
aes_mine_corridors_model.cpp
|
||||
aes_mine_corridors_model.h
|
||||
CustomView/aes_mine_corridor.h
|
||||
CustomView/aes_mine_corridor.cpp
|
||||
)
|
||||
|
||||
NGL_WRAP_UI(aes_mine_corridor_gui_SRCS
|
||||
aes_mine_corridor_edit.ui
|
||||
CustomView/aes_mine_corridor.ui
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY2(WS AesMineCorridorGuiPlugin MODULE ${aes_mine_corridor_gui_SRCS})
|
||||
NGL_TARGET_LINK_LIBRARIES(AesMineCorridorGuiPlugin
|
||||
AesBaseGui
|
||||
ngltools # dtg
|
||||
NGLLogger
|
||||
LtsSessionData
|
||||
AesDataPluginInterface
|
||||
AesMineCorridorGuiPluginInterface
|
||||
AesInfoGuiPluginInterface
|
||||
PpmGuiComboboxPluginInterface
|
||||
SituationMapGuiPluginInterface
|
||||
Qt5::Widgets
|
||||
LtsWidgets
|
||||
LtsDataView
|
||||
LtsUtilsGuiDds
|
||||
LtsUtilsSettings
|
||||
)
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* CustomView for AES NContamination
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Mike Wille, SLSE, 2016-04-08
|
||||
*/
|
||||
|
||||
#include "aes_mine_corridor.h"
|
||||
#include "ui_aes_mine_corridor.h"
|
||||
|
||||
#include "aes_mine_corridors_model.h"
|
||||
#include <Services/AreaEffectSimulation/Utils/polygons.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
CustomViewMineCorridor::CustomViewMineCorridor(QWidget *parent)
|
||||
: AbstractDisplayWidget(parent)
|
||||
, m_ui(new Ui::CustomViewMineCorridor)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
}
|
||||
|
||||
CustomViewMineCorridor::~CustomViewMineCorridor()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
bool CustomViewMineCorridor::init(const QModelIndex &idx)
|
||||
{
|
||||
if (!idx.isValid())
|
||||
return false;
|
||||
|
||||
m_ui->lblIdentifier->setText(rowData(idx, AreaEffectSimulation::MineCorridorsModel::BcName).toString());
|
||||
m_ui->lblEffectState->setText(rowData(idx, AreaEffectSimulation::MineCorridorsModel::BcEffectState).toString());
|
||||
m_ui->lblEffectStart->setText(rowData(idx, AreaEffectSimulation::MineCorridorsModel::BcEffectStart).toString());
|
||||
m_ui->lblIcon->clear();
|
||||
m_ui->lblIcon->setAutoFillBackground(true);
|
||||
|
||||
const AesItemSortFilterProxyModel *sfpm = qobject_cast<const AesItemSortFilterProxyModel*>(idx.model());
|
||||
if (!sfpm)
|
||||
return false;
|
||||
const MineCorridorsModel *aesModel = qobject_cast<const MineCorridorsModel*>(sfpm->sourceModel());
|
||||
if (!aesModel)
|
||||
return false;
|
||||
const auto srcIdx = sfpm->mapToSource(idx);
|
||||
MineCorridor mineCorridor = aesModel->getRowData(srcIdx.row());
|
||||
calculateIcon(mineCorridor, sfpm->partyColor(idx.row()));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CustomViewMineCorridor::calculateIcon(const MineCorridor &corridor, const QColor &color)
|
||||
{
|
||||
QVector<Database::AesMineCorridorSegment> segments;
|
||||
segments.reserve(corridor.segments().size());
|
||||
int counter = 0;
|
||||
for (const Core::GeoPosition2D &segmentIn : corridor.segments())
|
||||
{
|
||||
Database::AesMineCorridorSegment segmentOut;
|
||||
segmentOut.position = QPointF(segmentIn.lon(), segmentIn.lat());
|
||||
segmentOut.mineCorridorId = corridor.id();
|
||||
segmentOut.elementNumber = counter;
|
||||
segments.append(segmentOut);
|
||||
++counter;
|
||||
}
|
||||
|
||||
QPolygonF poly = AreaEffectSimulation::Polygons::mineCorridor(segments, corridor.width());
|
||||
Qt::BrushStyle bStyle = PixmapLabel::checkForBrushStyle(corridor.effectStateId());
|
||||
const auto pix = Polygons::pixmapFromPolygon(PixmapLabel::geographic2Utm(poly), color, ICON_RESOLUTION, bStyle);
|
||||
m_ui->lblIcon->setPixmap(pix);
|
||||
|
||||
return true;
|
||||
}
|
||||
} // namespace AreaEffectSimulation
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* CustomView for AES NContamination
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Mike Wille, SLSE, 2016-04-08
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <Viewer/LtsDataView/abstract_display_widget.h>
|
||||
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class CustomViewMineCorridor;
|
||||
}
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
class MineCorridor;
|
||||
class CustomViewMineCorridor final : public LtsDataView::AbstractDisplayWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CustomViewMineCorridor( QWidget *parent = nullptr);
|
||||
~CustomViewMineCorridor();
|
||||
bool init(const QModelIndex &idx) override final;
|
||||
|
||||
private:
|
||||
bool calculateIcon(const AreaEffectSimulation::MineCorridor &corridor, const QColor &color);
|
||||
|
||||
Ui::CustomViewMineCorridor *m_ui;
|
||||
|
||||
};
|
||||
} // namespace AreaEffectSimulation
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CustomViewMineCorridor</class>
|
||||
<widget class="QWidget" name="CustomViewMineCorridor">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>350</width>
|
||||
<height>200</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="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="lblIdentifier">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>State:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="lblEffectState">
|
||||
<property name="text">
|
||||
<string notr="true">State</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="AreaEffectSimulation::PixmapLabel" name="lblIcon">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">icon</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="lblEffectStart">
|
||||
<property name="text">
|
||||
<string notr="true">Time</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>AreaEffectSimulation::PixmapLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>AreaEffectSimulation/Gui/Base/aes_pixmap_label.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
+221
@@ -0,0 +1,221 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* AreaEffectSimulation - NContamination Edit Dialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-07-07
|
||||
*/
|
||||
|
||||
|
||||
#include "aes_mine_corridor_edit.h"
|
||||
#include "ui_aes_mine_corridor_edit.h"
|
||||
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
#include <Plugins/AreaEffectSimulation/aes_data_plugin_interface.h>
|
||||
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
||||
#include <PluginInterfaces/gui_plugin_interface.h>
|
||||
|
||||
#include <QDoubleSpinBox>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
MineCorridorEdit::MineCorridorEdit(const QString &menuGroup, QWidget *parent)
|
||||
: BaseEdit(menuGroup, QLatin1String("MineCorridorEdit"), parent)
|
||||
, m_ui(new Ui::MineCorridorEdit)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
m_ui->sbWidth->setDecimals(2);
|
||||
m_ui->sbWidth->setMinimum(s_minWidth);
|
||||
m_ui->sbWidth->setMaximum(s_maxWidth);
|
||||
m_ui->sbWidth->setSingleStep(s_stepWidth);
|
||||
|
||||
m_uiRequirements->addRequirement({m_ui->lblGeometry, [this]() { return (!m_ui->positionEdit_1->coordinate().isNull() &&
|
||||
!m_ui->positionEdit_2->coordinate().isNull()
|
||||
); }});
|
||||
m_uiRequirements->addRequirement({m_ui->lblIdentifier, [this]() { return (!m_ui->leIdentifier->text().isEmpty()); }});
|
||||
m_uiRequirements->addRequirement({m_ui->lblEffectStart, [this]() { return hasValidEffectStart(m_ui->dteEffectStart); }});
|
||||
|
||||
enaDisa();
|
||||
connect(m_ui->sbWidth, &QSpinBox::editingFinished, this, &MineCorridorEdit::correctSpinBoxValue);
|
||||
connect(m_ui->pbClear, &QPushButton::clicked, this, &MineCorridorEdit::clearCoordinates);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Situation-Add_Mine_Corridor"));
|
||||
}
|
||||
|
||||
MineCorridorEdit::~MineCorridorEdit()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void MineCorridorEdit::retranslate()
|
||||
{
|
||||
translate(m_ui, m_aesItem, tr("Mine Corridor"));
|
||||
}
|
||||
|
||||
std::vector<LtsCoordWidget::LtsCoordWidget *> MineCorridorEdit::coordWidgets() const
|
||||
{
|
||||
return {m_ui->positionEdit_1,
|
||||
m_ui->positionEdit_2,
|
||||
m_ui->positionEdit_3,
|
||||
m_ui->positionEdit_4,
|
||||
m_ui->positionEdit_5,
|
||||
m_ui->positionEdit_6,
|
||||
m_ui->positionEdit_7,
|
||||
m_ui->positionEdit_8,
|
||||
m_ui->positionEdit_9,
|
||||
m_ui->positionEdit_10,
|
||||
m_ui->positionEdit_11};
|
||||
}
|
||||
|
||||
void MineCorridorEdit::enableUiElements(bool enable)
|
||||
{
|
||||
|
||||
m_ui->leIdentifier->setMaxLength(30);
|
||||
|
||||
m_ui->pbPosition->setEnabled(m_sitMapGuiIfc && enable);
|
||||
setEffectStartEnabled(m_ui->dteEffectStart, enable);
|
||||
enabledCoordinates(enable);
|
||||
m_ui->sbWidth->setEnabled(enable);
|
||||
m_ui->pbClear->setEnabled(enable);
|
||||
m_ui->leIdentifier->setEnabled(enable || isOnlyNameModifiable());
|
||||
|
||||
if (m_aesItem.effectStateId() == AesEffectState_def::EsExpired)
|
||||
{
|
||||
m_ui->leIdentifier->setText(QString::fromStdString(m_aesItem.name()));
|
||||
__unchange__();
|
||||
}
|
||||
if (m_aesItem.effectStateId() == AesEffectState_def::EsActivated)
|
||||
{
|
||||
QString name = m_ui->leIdentifier->text();
|
||||
auto baseData = m_dtc->mineCorridor(m_aesItem.id());
|
||||
setData(baseData, false);
|
||||
__unchange__();
|
||||
if (name != m_ui->leIdentifier->text())
|
||||
m_ui->leIdentifier->setText(name);
|
||||
}
|
||||
}
|
||||
|
||||
bool MineCorridorEdit::init(int aesItemId, bool copy,
|
||||
LtsSession::LtsSession *session)
|
||||
{
|
||||
if (!BaseEdit::init(aesItemId, session))
|
||||
return false;
|
||||
|
||||
bool editable = LtsSessionData::LtsSessionData::getInstance()->hasOperatorRight(OperatorRights::MineCorridorsEdit) ||
|
||||
m_session->app() == LtsAppDescriptor::App::OC;
|
||||
bool readable = LtsSessionData::LtsSessionData::getInstance()->hasOperatorRight(OperatorRights::MineCorridorsShow);
|
||||
|
||||
if (!readable && !editable)
|
||||
return false;
|
||||
|
||||
// Todo: Older allowed?
|
||||
m_ui->dteEffectStart->setMinimumTimeMSec(m_session->partitionTime());
|
||||
m_ui->dteEffectStart->setRetrieveCurrentTimeCallback([this]() { return m_session->partitionTime(); });
|
||||
|
||||
if (m_sitMapGuiIfc)
|
||||
connect(m_ui->pbPosition, &QPushButton::clicked, this, &MineCorridorEdit::getPolygon);
|
||||
else
|
||||
m_ui->pbPosition->setEnabled(false);
|
||||
|
||||
if (aesItemId > 0)
|
||||
{
|
||||
auto baseData = m_dtc->mineCorridor(aesItemId);
|
||||
setData(baseData, copy);
|
||||
}
|
||||
|
||||
enableUiElements(editable && isModifiable() && !isOnlyNameModifiable());
|
||||
|
||||
connect(m_dtc.get(), &AreaEffectSimulation::Interface::Dtc::mineCorridorChanged,
|
||||
this, &BaseEdit::onAreaChanged);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MineCorridorEdit::setData(const MineCorridor &aesItem, bool copy)
|
||||
{
|
||||
m_aesItem = aesItem;
|
||||
if (copy)
|
||||
{
|
||||
m_aesItem.id(0);
|
||||
m_aesItem.effectStateId(AreaEffectSimulation::AesEffectState_def::get_default());
|
||||
}
|
||||
m_ui->leIdentifier->setText(QString::fromStdString(aesItem.name()));
|
||||
m_ui->sbWidth->setValue(aesItem.width());
|
||||
m_ui->dteEffectStart->setMsecsSinceEpoch(aesItem.effectStart().is_set() ? aesItem.effectStart().get() : 0);
|
||||
|
||||
setCoordinates(aesItem.segments());
|
||||
}
|
||||
|
||||
void MineCorridorEdit::getPolygon()
|
||||
{
|
||||
if (!has2DMap())
|
||||
return;
|
||||
|
||||
m_sitMapGuiIfc->getCorridor(this,
|
||||
SLOT(onPolygonData(double, QVector<QPointF>, QPolygonF)),
|
||||
nullptr,
|
||||
s_minWidth,
|
||||
s_maxWidth,
|
||||
s_maxLength,
|
||||
s_maxSegments,
|
||||
true,
|
||||
getCoordinatesQPointF(),
|
||||
50);
|
||||
}
|
||||
|
||||
|
||||
void MineCorridorEdit::onPolygonData(const double width, const QVector<QPointF> &polygon, const QPolygonF &bufferOutlinePolygon)
|
||||
{
|
||||
if (polygon.size() < 2)
|
||||
return;
|
||||
|
||||
m_previewPolygon = bufferOutlinePolygon;
|
||||
|
||||
// Corridors are always given with Centerline. Therefore, no reverse Polygon!
|
||||
setCoordinates(polygon, false);
|
||||
m_ui->sbWidth->setValue(std::abs(width));
|
||||
|
||||
showPreviewObject();
|
||||
}
|
||||
|
||||
bool MineCorridorEdit::apply()
|
||||
{
|
||||
std::string name = m_ui->leIdentifier->text().toStdString();
|
||||
double width = m_ui->sbWidth->value();
|
||||
qint64 effectStart = m_ui->dteEffectStart->msecsSinceEpoch();
|
||||
|
||||
if (!checkSegementLengths(this))
|
||||
return false;
|
||||
|
||||
const MineCorridorModifyRequest req(m_aesItem.id(),
|
||||
name,
|
||||
1 * 60 * 1000, // 1min
|
||||
m_aesItem.effectSourceId(),
|
||||
width,
|
||||
getCoordinates(),
|
||||
LtsUtils::toOptional(effectStart),
|
||||
dds::core::optional<int32_t>(),
|
||||
dds::core::optional<int32_t>(),
|
||||
dds::core::optional<rti::core::int64>());
|
||||
|
||||
return m_requestHelper->startSingleRequest([this, req]()
|
||||
{
|
||||
return m_ftc->mineCorridorModifyRequest(req, this);
|
||||
});
|
||||
}
|
||||
|
||||
void MineCorridorEdit::showPreviewObject()
|
||||
{
|
||||
if (!m_sitMapGuiIfc)
|
||||
return;
|
||||
|
||||
if (m_previewPolygon.isEmpty())
|
||||
return;
|
||||
|
||||
m_sitMapGuiIfc->displayPreviewObject(this, m_previewPolygon, true);
|
||||
}
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* AreaEffectSimulation - Explosion Edit Dialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-07-07
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_base_edit.h>
|
||||
#include <AreaEffectSimulation/aes_ftc.h>
|
||||
|
||||
class QDoubleSpinBox;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class MineCorridorEdit;
|
||||
}
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
class MineCorridorEdit final
|
||||
: public BaseEdit
|
||||
, protected AreaEffectSimulation::Interface::Ftc::MineCorridorModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MineCorridorEdit(const QString &menuGroup, QWidget *parent = nullptr);
|
||||
~MineCorridorEdit();
|
||||
|
||||
QString dialogIdentifier() const override
|
||||
{
|
||||
return m_aesItem.id() <= 0 ? QStringLiteral("AddMineCorridor") : QStringLiteral("EditMineCorridor%1").arg(m_aesItem.id());
|
||||
}
|
||||
bool init(int aesItemId, bool copy, LtsSession::LtsSession *session);
|
||||
|
||||
void onMineCorridorModifyReply(const Core::FunctionReplyObject &replyObject) override final { onAesItemModifyReply(replyObject); }
|
||||
|
||||
private:
|
||||
void retranslate() override;
|
||||
std::vector<LtsCoordWidget::LtsCoordWidget *> coordWidgets() const override;
|
||||
|
||||
static constexpr double s_minWidth = 5;
|
||||
static constexpr double s_maxWidth = 50;
|
||||
static constexpr double s_stepWidth = 0.01;
|
||||
static constexpr double s_maxLength = 1000;
|
||||
static constexpr int s_maxSegments = 11;
|
||||
|
||||
void setData(const MineCorridor &aesItem, bool copy);
|
||||
void enableUiElements(bool enable) override;
|
||||
AesItem aesItem(int aesItemId) const;
|
||||
double getMaxLength() const override { return s_maxLength; }
|
||||
|
||||
private Q_SLOTS:
|
||||
void getPolygon();
|
||||
void onPolygonData(const double width, const QVector<QPointF> &polygon, const QPolygonF &bufferOutlinePolygon);
|
||||
bool apply() override;
|
||||
void showPreviewObject() override;
|
||||
|
||||
private:
|
||||
Ui::MineCorridorEdit *m_ui;
|
||||
QPolygonF m_previewPolygon;
|
||||
};
|
||||
|
||||
} //namespace AreaEffectSimulation
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MineCorridorEdit</class>
|
||||
<widget class="QWidget" name="MineCorridorEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1069</width>
|
||||
<height>242</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string notr="true">Aes Mine Corridor Edit</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="2" column="6">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_9" native="true"/>
|
||||
</item>
|
||||
<item row="6" column="4">
|
||||
<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 row="5" column="4">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_6" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lblIdentifier">
|
||||
<property name="text">
|
||||
<string>Identifier:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="4">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_3" native="true"/>
|
||||
</item>
|
||||
<item row="3" column="4">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_4" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="7">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="4">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_5" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="LtsWidgets::LtsDateTimeEdit" name="dteEffectStart" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="checkable" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="withButtons" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="withSlider" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="withReset" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lblEffectStart">
|
||||
<property name="text">
|
||||
<string>Activation Time:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="6">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_11" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QPushButton" name="pbPosition">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../Styles/Light/resources/rme_light_style.qrc">
|
||||
<normaloff>:/style/position.svg</normaloff>:/style/position.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="lblGeometry">
|
||||
<property name="text">
|
||||
<string>Geometry:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_2" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="6">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_7" native="true"/>
|
||||
</item>
|
||||
<item row="3" column="6">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_10" native="true"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="leIdentifier"/>
|
||||
</item>
|
||||
<item row="1" column="6">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_8" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="LtsCoordWidget::LtsCoordWidget" name="positionEdit_1" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="5">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Fixed</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="lblWidth">
|
||||
<property name="text">
|
||||
<string>Width [m]:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QDoubleSpinBox" name="sbWidth"/>
|
||||
</item>
|
||||
<item row="2" column="3">
|
||||
<widget class="QPushButton" name="pbClear">
|
||||
<property name="text">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../Styles/Light/resources/rme_light_style.qrc">
|
||||
<normaloff>:/style/remove.svg</normaloff>:/style/remove.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>LtsCoordWidget::LtsCoordWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>LtsCoordTrans/lts_coord_widget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>LtsWidgets::LtsDateTimeEdit</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>LtsWidgets/lts_date_time_edit.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<tabstops>
|
||||
<tabstop>dteEffectStart</tabstop>
|
||||
<tabstop>leIdentifier</tabstop>
|
||||
<tabstop>sbWidth</tabstop>
|
||||
<tabstop>pbPosition</tabstop>
|
||||
<tabstop>pbClear</tabstop>
|
||||
<tabstop>positionEdit_1</tabstop>
|
||||
<tabstop>positionEdit_2</tabstop>
|
||||
<tabstop>positionEdit_3</tabstop>
|
||||
<tabstop>positionEdit_4</tabstop>
|
||||
<tabstop>positionEdit_5</tabstop>
|
||||
<tabstop>positionEdit_6</tabstop>
|
||||
<tabstop>positionEdit_7</tabstop>
|
||||
<tabstop>positionEdit_8</tabstop>
|
||||
<tabstop>positionEdit_9</tabstop>
|
||||
<tabstop>positionEdit_10</tabstop>
|
||||
<tabstop>positionEdit_11</tabstop>
|
||||
</tabstops>
|
||||
<resources>
|
||||
<include location="../../../Styles/Light/resources/rme_light_style.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GUI Plugin for AreaEffectSimulation - NContaminations
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-07-07
|
||||
*/
|
||||
|
||||
#include "aes_mine_corridor_gui_plugin.h"
|
||||
#include "aes_mine_corridor_edit.h"
|
||||
#include "aes_mine_corridor_list.h"
|
||||
|
||||
#include <AreaEffectSimulation/aes_operator_rights.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <LtsUtilsSettings/settings.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
std::shared_ptr<GuiPluginBase::Interface> GuiPlugin::createGuiInterface(LtsSession::LtsSession *session)
|
||||
{
|
||||
return std::make_shared<InterfaceImpl>(session);
|
||||
}
|
||||
|
||||
InterfaceImpl::InterfaceImpl(LtsSession::LtsSession *session)
|
||||
: AesBaseInterface(session, getLogger("Plugins.Gui.MineCorridor"))
|
||||
, ForeignGuiInterface()
|
||||
{}
|
||||
|
||||
QVector<LtsWidgets::PluginData> InterfaceImpl::getActions()
|
||||
{
|
||||
QVector<LtsWidgets::PluginData> ret;
|
||||
|
||||
LtsUtils::ProjectSettings *ps = LtsUtils::ProjectSettings::getInstance();
|
||||
const bool enableMineCorridors = ps->value(QStringLiteral("aes"),
|
||||
QStringLiteral("enableMineCorridors")).toBool();
|
||||
|
||||
if (enableMineCorridors && m_session->app() != LtsAppDescriptor::App::OC)
|
||||
{
|
||||
// Mine Corridors
|
||||
ret.append(LtsWidgets::PluginData(menuGroup(),
|
||||
tr("Mine Corridors"),
|
||||
QLatin1String("ListMineCorridors"),
|
||||
QIcon(QLatin1String("icon:mine_barrier_corridor.svg")), // Todo
|
||||
[this](QWidget *parent) { return onShowMineCorridorListDialog(parent);},
|
||||
OperatorRights::MineCorridorsShow,
|
||||
LtsWidgets::ExercisePart::eExecution));
|
||||
|
||||
if (m_session->isExercisePartition())
|
||||
ret.append(LtsWidgets::PluginData(menuGroup(),
|
||||
tr("Add Mine Corridor"),
|
||||
QLatin1String("AddMineCorridor"),
|
||||
QIcon(QLatin1String("icon:mine_barrier_corridor_add.svg")), // Todo
|
||||
[this](QWidget *parent) { return onShowAddMineCorridorDialog(parent);},
|
||||
OperatorRights::MineCorridorsEdit,
|
||||
LtsWidgets::ExercisePart::eExecution,
|
||||
LtsWidgets::ExerciseState::eCreated | LtsWidgets::ExerciseState::eStarted | LtsWidgets::ExerciseState::ePaused));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
AreaEffectSimulation::BaseEdit *InterfaceImpl::showEditWindow(int aesEntityId, QWidget *parent)
|
||||
{
|
||||
MineCorridorEdit *editWidget = new MineCorridorEdit(menuGroup(), parent);
|
||||
if (editWidget->init(aesEntityId, false, m_session))
|
||||
return editWidget;
|
||||
|
||||
delete editWidget;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LtsWidgets::LtsDialog *InterfaceImpl::onShowAddMineCorridorDialog(QWidget *parent)
|
||||
{
|
||||
MineCorridorEdit *editWidget = new MineCorridorEdit(menuGroup(), parent);
|
||||
if (editWidget->init(0, false, m_session))
|
||||
return editWidget;
|
||||
|
||||
delete editWidget;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
LtsWidgets::LtsDialog *InterfaceImpl::onShowMineCorridorListDialog(QWidget *parent)
|
||||
{
|
||||
MineCorridorList *listWidget = new MineCorridorList(menuGroup(), parent);
|
||||
if (listWidget->init(m_session))
|
||||
return listWidget;
|
||||
|
||||
delete listWidget;
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace AreaEffectSimulation
|
||||
+53
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Gui Plugin for AreaEffectSimulation - NContamniations
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-07-07
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_base_gui_plugin.h>
|
||||
#include "aes_mine_corridor_gui_plugin_interface.h"
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
class GuiPlugin final : public AesBaseGuiPlugin
|
||||
{
|
||||
Q_PLUGIN_METADATA(IID "gui:3:aes.minecorridors")
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GuiPlugin() = default;
|
||||
~GuiPlugin() = default;
|
||||
|
||||
QString pluginName() override { return QStringLiteral("AreaEffectSimuationMineCorridorGui"); }
|
||||
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
||||
bool availableInPartition(IDL::PartitionType partition) const override
|
||||
{
|
||||
return partition == IDL::PartitionType::Exercise ||
|
||||
partition == IDL::PartitionType::Replay;
|
||||
}
|
||||
};
|
||||
|
||||
class InterfaceImpl final : public AesBaseInterface, public AesMineCorridor::ForeignGuiInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
||||
|
||||
QString menuGroup() const override { return tr("Area Effect Simulation Mines"); } //We are now in a different Menugroup!
|
||||
QVector<LtsWidgets::PluginData> getActions() override;
|
||||
|
||||
AreaEffectSimulation::BaseEdit *showEditWindow(int aesEntityId, QWidget *parent) override;
|
||||
private:
|
||||
LtsWidgets::LtsDialog *onShowAddMineCorridorDialog(QWidget *parent);
|
||||
LtsWidgets::LtsDialog *onShowMineCorridorListDialog(QWidget *parent);
|
||||
|
||||
};
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* HMI Plugin for AreaEffectSimulation (Interface for access from other Plugins)
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-07-01
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
class QWidget;
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
class BaseEdit;
|
||||
}
|
||||
|
||||
namespace AesMineCorridor
|
||||
{
|
||||
class ForeignGuiInterface
|
||||
{
|
||||
public:
|
||||
ForeignGuiInterface() = default;
|
||||
virtual ~ForeignGuiInterface() = default;
|
||||
|
||||
virtual AreaEffectSimulation::BaseEdit *showEditWindow(int aesEntityId, QWidget *parent) = 0;
|
||||
};
|
||||
} // namespace AesMineCorridor
|
||||
|
||||
+100
@@ -0,0 +1,100 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* ContaminationManangement - NContamination Overview Dialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-07-07
|
||||
*/
|
||||
|
||||
#include "aes_mine_corridor_list.h"
|
||||
#include "aes_mine_corridors_model.h"
|
||||
#include "aes_mine_corridor_edit.h"
|
||||
#include "CustomView/aes_mine_corridor.h"
|
||||
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
bool MineCorridorList::init(LtsSession::LtsSession *session)
|
||||
{
|
||||
if (!AesItemList::init(session))
|
||||
return false;
|
||||
|
||||
m_bHasAddEditOperatorRights = LtsSessionData::LtsSessionData::getInstance()->hasOperatorRight(OperatorRights::MineCorridorsEdit);
|
||||
|
||||
setDataViewModel(m_model, [this]() { return new CustomViewMineCorridor(this); });
|
||||
|
||||
#ifndef LTS_DEBUG
|
||||
hideColumn(MineCorridorsModel::BcId);
|
||||
#endif
|
||||
hideColumn(MineCorridorsModel::BcParticipant);
|
||||
hideColumn(MineCorridorsModel::BcParty);
|
||||
hideColumn(MineCorridorsModel::BcChargeType);
|
||||
hideColumn(MineCorridorsModel::BcEffectDuration);
|
||||
|
||||
setSortIndicator(MineCorridorsModel::BcName);
|
||||
|
||||
setOnlineHelpFilename(QStringLiteral("Situation-Mine_Corridors"));
|
||||
|
||||
enaDisa();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void MineCorridorList::createModel()
|
||||
{
|
||||
m_model = new AesItemSortFilterProxyModelTmpl<MineCorridor>(m_session, this);
|
||||
|
||||
MineCorridorsModel *sourceModel = new MineCorridorsModel(this);
|
||||
sourceModel->initModel(m_session);
|
||||
m_model->setSourceModel(sourceModel);
|
||||
}
|
||||
|
||||
void MineCorridorList::onAddAesItem()
|
||||
{
|
||||
MineCorridorEdit *dialog = new MineCorridorEdit(m_menuGroup, this);
|
||||
|
||||
const int aesItemId = model()->aesId(currentRow());
|
||||
if (dialog->init(aesItemId, aesItemId > 0, m_session))
|
||||
addDialog(dialog, m_menuGroup, dialog->dialogIdentifier(), LtsWidgets::LayoutArea::eDialogTab);
|
||||
else
|
||||
delete dialog;
|
||||
}
|
||||
|
||||
void MineCorridorList::onEditAesItem()
|
||||
{
|
||||
const int aesItemId = model()->aesId(currentRow());
|
||||
|
||||
if (aesItemId < 0)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "current MineCorridorId: " << aesItemId;
|
||||
|
||||
MineCorridorEdit *dialog = new MineCorridorEdit(m_menuGroup, this);
|
||||
if (dialog->init(aesItemId, false, m_session))
|
||||
addDialog(dialog, m_menuGroup, dialog->dialogIdentifier(), LtsWidgets::LayoutArea::eDialogTab);
|
||||
else
|
||||
delete dialog;
|
||||
}
|
||||
|
||||
void MineCorridorList::onRemoveAesItem()
|
||||
{
|
||||
const int aesItemId = model()->aesId(currentRow());
|
||||
Core::RemoveElementRequest req(aesItemId);
|
||||
m_requestHelper->startSingleRequest([req, this]()
|
||||
{
|
||||
return m_ftc->mineCorridorRemoveRequest(req, this);
|
||||
});
|
||||
}
|
||||
|
||||
void MineCorridorList::retranslate()
|
||||
{
|
||||
translateBase(tr("Mine Corridors"));
|
||||
}
|
||||
|
||||
void MineCorridorList::onMineCorridorRemoveReply(const Core::FunctionReplyObject &replyObject)
|
||||
{
|
||||
m_requestHelper->requestReply(replyObject);
|
||||
}
|
||||
} // namespace AreaEffectSimulation
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* AreaEffectSimulation - Contamination Overview Dialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-07-07
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_itemlist.h>
|
||||
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_base_model.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
class MineCorridorList final : public AesItemListTmpl<MineCorridor>
|
||||
, protected AreaEffectSimulation::Interface::Ftc::MineCorridorRemoveReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using AesItemListTmpl<MineCorridor>::AesItemListTmpl;
|
||||
|
||||
bool init(LtsSession::LtsSession *session) override;
|
||||
|
||||
private slots:
|
||||
void onAddAesItem() override;
|
||||
void onEditAesItem() override;
|
||||
void onRemoveAesItem() override;
|
||||
|
||||
private:
|
||||
void createModel() override;
|
||||
void retranslate() override;
|
||||
void onMineCorridorRemoveReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
};
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* AreaEffectManangement - N Contamination Overview Dialog Model
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Malte Diers, SLSE, 2017-02-21
|
||||
*/
|
||||
|
||||
#include "aes_mine_corridors_model.h"
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
#include <QLocale>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
MineCorridorsModel::MineCorridorsModel(QObject *parent)
|
||||
: AesGuiBaseModel<MineCorridor>(parent)
|
||||
{}
|
||||
|
||||
bool MineCorridorsModel::initModel(LtsSession::LtsSession *session)
|
||||
{
|
||||
if (!AesGuiBaseModel::initModel(session))
|
||||
return false;
|
||||
|
||||
connect(m_aesDtc.get(), &Interface::Dtc::mineCorridorChanged,
|
||||
this, &MineCorridorsModel::onDataChanged);
|
||||
m_aesDtc->mineCorridors([this](const MineCorridor &item) { insertRow(item);});
|
||||
return true;
|
||||
}
|
||||
} // namespace AreaEffectSimulation
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* HMI Plugin for AreaEffectSimulation - Contaminations Overview Dialog Model
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Malte Diers, SLSE, 2017-02-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_base_model.h>
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
class LtsSession;
|
||||
}
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
class MineCorridorsModel : public AesGuiBaseModel<MineCorridor>
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MineCorridorsModel(QObject *parent = nullptr);
|
||||
|
||||
bool initModel(LtsSession::LtsSession *session);
|
||||
};
|
||||
|
||||
} //namespace AreaEffectSimulation
|
||||
Reference in new issue
Block a user