Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+106
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* AreaEffectSimulation - Functional Area Edit Dialog
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Malte Diers, SLSE, 2017-04-06
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Plugins/AreaEffectSimulation/Gui/Base/aes_base_edit.h>
|
||||
#include <AreaEffectSimulation/aes_ftc.h>
|
||||
#include <Plugins/AdvancedSymbology/asb_data_plugin_interface.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
||||
#include <QPolygonF>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class FunctionalAreaEdit;
|
||||
}
|
||||
|
||||
namespace AdvancedSymbology
|
||||
{
|
||||
namespace Gui
|
||||
{
|
||||
class SymbolModificationDialogFrameless;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
class FunctionalAreaEdit final
|
||||
: public BaseEdit
|
||||
, protected AreaEffectSimulation::Interface::Ftc::FunctionalAreaModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FunctionalAreaEdit(const QString &menuGroup, QWidget *parent = nullptr);
|
||||
~FunctionalAreaEdit();
|
||||
|
||||
QString dialogIdentifier() const override
|
||||
{
|
||||
return m_aesItem.id() <= 0 ? QStringLiteral("AddFunctionalArea") : QStringLiteral("EditFunctionalArea%1").arg(m_aesItem.id());
|
||||
}
|
||||
bool init(int areaId, bool copy, LtsSession::LtsSession *session);
|
||||
|
||||
void onFunctionalAreaModifyReply(const Core::FunctionReplyObject &replyObject) override final { onAesItemModifyReply(replyObject); }
|
||||
|
||||
private:
|
||||
void retranslate() override;
|
||||
|
||||
static double s_minWidth;
|
||||
static double s_maxWidth;
|
||||
static double s_stepWidth;
|
||||
static double s_minHeight;
|
||||
static double s_maxHeight;
|
||||
static double s_stepHeight;
|
||||
static int s_minDurationMinutes;
|
||||
static int s_maxDurationMinutes;
|
||||
static int s_stepDurationMinutes;
|
||||
static int s_minEffectMinutes;
|
||||
static int s_maxEffectMinutes;
|
||||
static int s_stepEffectMinutes;
|
||||
static int s_stepSupplyMinutes;
|
||||
|
||||
void setData(const FunctionalArea &area, bool copy);
|
||||
void fillCbx();
|
||||
void enableUiElements(bool enable) override;
|
||||
void disableButtons(bool state);
|
||||
void setVisableFaButtons();
|
||||
QStringList toStringList(const QList<QByteArray> &list);
|
||||
|
||||
private Q_SLOTS:
|
||||
void getPosition();
|
||||
void onRectData(const QPointF ¢erPoint, double width, double height, const QPolygonF &coordinates);
|
||||
void onCbxIdxDeconChanged();
|
||||
void onCbxIdxMaintChanged();
|
||||
void onCbxIdxMedicChanged();
|
||||
void onCbxIdxSupplyChanged();
|
||||
void onCbxIdxFunctionalAreaTypeChanged();
|
||||
void onSymbolSelection();
|
||||
void onSymbolConfig();
|
||||
void onChangeSymbol(const QString &sidc);
|
||||
void onClearPointSymbol();
|
||||
bool apply() override;
|
||||
void showPreviewObject() override;
|
||||
void onParticipantClicked();
|
||||
void onParticipant(const QVector<int> &participants);
|
||||
|
||||
private:
|
||||
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbfc;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
AdvancedSymbology::Gui::SymbolModificationDialogFrameless *m_symbolConfig;
|
||||
QString m_sidc;
|
||||
AdvancedSymbology::SymbolResultWatcherQWidgetBase *m_symbolWatcher;
|
||||
QPolygonF m_previewPolygon;
|
||||
Ui::FunctionalAreaEdit *m_ui;
|
||||
QMap<qint32, AreaEffectSimulation::FunctionalAreaType> m_functionalAreaTypes;
|
||||
ParticipantManagement::Participant m_participant;
|
||||
};
|
||||
|
||||
} //namespace AreaEffectSimulation
|
||||
Reference in new issue
Block a user