143 lines
6.2 KiB
C++
Executable File
143 lines
6.2 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* MarkerManagement - Marker Overview Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <FileManagement/flm_explorer_gui_plugin_interface.h>
|
|
#include <FilterManagement/Data/flt_data_plugin.h>
|
|
#include <FilterManagement/flt_participant_plugin_interface.h>
|
|
#include <FilterManagement/flt_aes_plugin_interface.h>
|
|
#include <FilterManagement/flt_building_cmpnt_plugin_interface.h>
|
|
#include <MarkerManagement/logger.h>
|
|
#include <MarkerManagement/mrk_dtc.h>
|
|
#include <MarkerManagement/mrk_ftc.h>
|
|
#include <OperatorManagement/opm_dtc.h>
|
|
#include <FileManagement/flm_dtc.h>
|
|
#include <FileManagement/flm_ftc.h>
|
|
#include <SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
|
#include <SituationReplayManagement/srm_ftc.h>
|
|
#include <SituationReplay/srp_data_plugin_interface.h>
|
|
#include <SituationReplay/srp_ftc.h>
|
|
|
|
#include <LtsSession/lts_session.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
|
|
#include <QPointer>
|
|
|
|
namespace Ui
|
|
{
|
|
class SnapshotDialog;
|
|
}
|
|
|
|
namespace MarkerManagement
|
|
{
|
|
class SnapshotDialogModel;
|
|
// --------------------------------------------------------
|
|
// SnapshotDialog
|
|
// --------------------------------------------------------
|
|
class SnapshotDialog : public LtsWidgets::LtsDialog
|
|
, protected MarkerManagement::Interface::Ftc::SnapshotRemoveReplyHandler
|
|
, protected SituationReplayManagement::Interface::Ftc::ReplayPartitionRemoveReplyHandler
|
|
, protected SituationReplay::Interface::Ftc::ChangeReplayStateReplyHandler
|
|
, protected MarkerManagement::Interface::Ftc::SnapshotModifyReplyHandler
|
|
, protected FileManagement::Interface::Ftc::FileContentRemoveReplyHandler
|
|
, protected FileManagement::Interface::Ftc::FileContentModifyReplyHandler
|
|
, public FilterManagement::Interface::Ftc::AesFilterUpdateReplyHandler
|
|
, public FilterManagement::Interface::Ftc::SymbolAppearanceUpdateReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit SnapshotDialog(const QString &menuGroup, LtsSession::LtsSession *session, QWidget *parent = nullptr);
|
|
~SnapshotDialog();
|
|
|
|
bool init(const std::shared_ptr<MarkerManagement::Interface::Dtc> &mrkDtc,
|
|
const std::shared_ptr<MarkerManagement::Interface::Ftc> &mrkFtc,
|
|
const std::shared_ptr<FileManagement::Interface::Dtc> &flmDtc,
|
|
const std::shared_ptr<FileManagement::Interface::Ftc> &flmFtc,
|
|
const std::shared_ptr<OperatorManagement::Interface::Dtc> &opmDtc,
|
|
const std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> &fltParticipipantIfc,
|
|
const std::shared_ptr<FilterManagement::ForeignAesGuiInterface> &fltAesIfc,
|
|
const std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> &fltBuildingComponentIfc);
|
|
|
|
void showSnapshot();
|
|
|
|
protected:
|
|
void onSnapshotRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
void onReplayPartitionRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject);}
|
|
void onChangeReplayStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject);}
|
|
void onSnapshotModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
void onFileContentRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
void onFileContentModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
void slotReplaySessionForPlanEditorStarted();
|
|
|
|
// AesFilterUpdateReplyHandler interface
|
|
public:
|
|
void onAesFilterUpdateReply(const Core::FunctionReplyObject &reply) override final { m_requestHelper->requestReply(reply); }
|
|
|
|
// SymbolAppearanceUpdateReplyHandler interface
|
|
public:
|
|
void onSymbolAppearanceUpdateReply(const Core::FunctionReplyObject &reply) override final { m_requestHelper->requestReply(reply); }
|
|
|
|
protected:
|
|
void aboutToClose() override;
|
|
private slots:
|
|
void enaDisa();
|
|
void onEditMetaData();
|
|
void onRemoveSnapshots();
|
|
void onShow();
|
|
void onSaveSettings();
|
|
// void onSelectionChanged();
|
|
void onEditPlan();
|
|
void onPlaneditorFinished();
|
|
void onPrint();
|
|
|
|
void onRefreshCurrent(const Snapshot &snapshot);
|
|
|
|
private:
|
|
void retranslate() override;
|
|
bool applyFilter(const Snapshot &snapshot);
|
|
void tableColumnOrganiserSetting() override;
|
|
|
|
QVector<int> selectedSnapshotIds() const;
|
|
bool showSnapshotInternal(const Snapshot &snapshot, bool bApplyFilter);
|
|
bool saveSnapshotPlan(const QByteArray &planXMLContent);
|
|
void prepareIndex(const QModelIndex &idx);
|
|
void saveSnapshotFilter();
|
|
void saveSnapshotPreviewInLibrary(const QString &snapshotTitle);
|
|
|
|
QString m_menuGroup;
|
|
SnapshotDialogModel *m_model;
|
|
Ui::SnapshotDialog *m_ui;
|
|
std::shared_ptr<MarkerManagement::Interface::Dtc> m_mrkDtc;
|
|
std::shared_ptr<MarkerManagement::Interface::Ftc> m_mrkFtc;
|
|
std::shared_ptr<FileManagement::Interface::Dtc> m_flmDtc;
|
|
std::shared_ptr<FileManagement::Interface::Ftc> m_flmFtc;
|
|
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
|
|
std::shared_ptr<SituationReplay::Interface::Ftc> m_srpFtc;
|
|
std::weak_ptr<SituationMap::ForeignGuiInterface> m_sitMapGuiIfc; // no hard dependency to avoid crash when app is closed before this dialog is closed
|
|
std::shared_ptr<FilterManagement::ForeignFltParticipantGuiInterface> m_fltParticipantIfc;
|
|
std::shared_ptr<FilterManagement::ForeignAesGuiInterface> m_fltAesIfc;
|
|
std::shared_ptr<FilterManagement::ForeignFltBuildingComponentGuiInterface> m_fltBuildingComponentIfc;
|
|
|
|
std::shared_ptr<FileManagement::ForeignGuiInterface> m_flmGui;
|
|
LtsSession::LtsSession *m_session;
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
MarkerManagement::Snapshot m_currentSnapshot;
|
|
bool m_planEditorHasUpdatedThePlan; // to saveSnapshotPreviewInLibrary if required
|
|
QPointer<LtsPluginManager::LtsPluginManager> m_planEditorApp;
|
|
int m_fileId; // of PreviewImage
|
|
QVector <QImage> m_images;
|
|
QVector <QString> m_imageTitles;
|
|
QVector <QString> m_descriptions;
|
|
|
|
LOGGER_T m_logger;
|
|
};
|
|
}
|