Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+108
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Target Configuration
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Norbert Thoden, NLE, 2020-06-29
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <TargetManagement/tgt_dtc.h>
|
||||
#include <TargetManagement/tgt_ftc.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <LtsUtilsGuiDds/request_helper.h>
|
||||
#include <TargetManagement/logger.h>
|
||||
#include <Plugins/TargetManagement/Gui/ShootbackTargetConfiguration/tgt_target_part_model.h>
|
||||
#include <Plugins/FileManagement/flm_explorer_gui_plugin_interface.h>
|
||||
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
||||
|
||||
class QPushButton;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class TargetPartDialog;
|
||||
}
|
||||
|
||||
namespace TargetManagement
|
||||
{
|
||||
|
||||
class TargetPartDialog final : public LtsWidgets::LtsDialog
|
||||
, protected TargetManagement::Interface::Ftc::ShootbackTargetModifyReplyHandler
|
||||
, protected TargetManagement::Interface::Ftc::ShootbackTargetRemoveReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
using BaseClass = LtsWidgets::LtsDialog;
|
||||
|
||||
enum class MODE
|
||||
{
|
||||
TARGET_BASE_CONFIGURATION,
|
||||
TARGET_OVERVIEW
|
||||
};
|
||||
|
||||
explicit TargetPartDialog(const QString &menuGroup, LtsSession::LtsSession *session, QWidget *parent = nullptr);
|
||||
~TargetPartDialog();
|
||||
|
||||
bool init(MODE mode);
|
||||
|
||||
void retranslate() override;
|
||||
|
||||
Q_SIGNALS:
|
||||
void assignAreasRequested(int targetParticpantId);
|
||||
void escapePressed();
|
||||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *event) override final;
|
||||
void onShootbackTargetModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void onShootbackTargetRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
void setMode(MODE mode = MODE::TARGET_BASE_CONFIGURATION);
|
||||
|
||||
QByteArray toJson() const;
|
||||
QVector<ShootbackTarget> fromJson(const QByteArray &content);
|
||||
|
||||
private Q_SLOTS:
|
||||
void onEscapePressed();
|
||||
void onSelectionChanged();
|
||||
void onNewTargetPart();
|
||||
void onRemoveTargetPart();
|
||||
void onEditTargetPart();
|
||||
|
||||
void onExportButtonClicked();
|
||||
void onImportButtonClicked();
|
||||
void onImport();
|
||||
|
||||
void onAssignAreaClicked();
|
||||
|
||||
void onMapCenterClicked();
|
||||
void onMapZoomToClicked();
|
||||
|
||||
void onObjectEntered(const QModelIndex &index);
|
||||
void onTableViewClicked(const QModelIndex &index);
|
||||
|
||||
void clearSelectionOfMapObjects();
|
||||
|
||||
private:
|
||||
QPushButton *m_assignAreaBtn{nullptr};
|
||||
TargetParticipantModel *m_targetParticipantModel{nullptr};
|
||||
|
||||
MODE m_mode{MODE::TARGET_BASE_CONFIGURATION};
|
||||
std::shared_ptr<TargetManagement::Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<TargetManagement::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> m_ppmGuiCbxIfc;
|
||||
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
|
||||
std::shared_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc;
|
||||
|
||||
LtsSession::LtsSession *m_session{nullptr};
|
||||
Ui::TargetPartDialog *m_ui{nullptr};
|
||||
QString m_menuGroup;
|
||||
LtsUtils::RequestHelper *m_requestHelper{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace TargetManagement
|
||||
Reference in new issue
Block a user