106 lines
3.2 KiB
C++
Executable File
106 lines
3.2 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Dialog to Simulate drone
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Steve Kemayou, ESZS, 2025-04-08
|
|
*/
|
|
|
|
#pragma once
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsWidgets/lts_frameless_dialog.h>
|
|
#include <LtsSession/lts_session.h>
|
|
#include <ParticipantManagement/ppm_dtc.h>
|
|
#include <ParticipantManagement/ppm_ftc.h>
|
|
|
|
#include <CentralEffectSimulation/ces_dtc.h>
|
|
#include <CentralEffectSimulation/ces_ftc.h>
|
|
|
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
|
#include <Plugins/CentralEffectSimulation/ces_gui_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_participants_gui_plugin_interface.h>
|
|
#include <Plugins/SituationMapPlugin/situation_map_gui_plugin_interface.h>
|
|
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
#include "mission_plan_model.h"
|
|
#include "mission_plan_edit.h"
|
|
|
|
#include <QTimer>
|
|
#include <QWidget>
|
|
|
|
namespace Ui {
|
|
class MissionPlanDialog;
|
|
}
|
|
|
|
namespace CentralEffectSimulation
|
|
{
|
|
class MissionPlanDialog : public LtsWidgets::LtsDialog
|
|
, protected ParticipantManagement::Interface::Ftc::RemoveMissionPlanReplyHandler
|
|
, protected ParticipantManagement::Interface::Ftc::ModifyMissionPlanReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MissionPlanDialog(const QString &menuGroup, QWidget *parent = nullptr);
|
|
~MissionPlanDialog();
|
|
|
|
|
|
bool init(LtsSession::LtsSession *session);
|
|
|
|
|
|
void onModifyMissionPlanReply(const Core::FunctionReplyObject &replyObject) override;
|
|
void onRemoveMissionPlanReply(const Core::FunctionReplyObject &replyObject) override;
|
|
|
|
enum class WayPointsStatus
|
|
{
|
|
Undefined = 0,
|
|
Prepared,
|
|
Active,
|
|
Aborted,
|
|
Expired,
|
|
|
|
};
|
|
|
|
|
|
private:
|
|
void retranslate() override;
|
|
void changeParty();
|
|
bool removeMissionPlan(int32_t missionplanId);
|
|
WayPointsStatus wayPointCurrentStatus(const ParticipantManagement::MissionPlan &mp) const;
|
|
bool canBeLocked() const;
|
|
bool canBeUnlocked() const;
|
|
MissionPlanEdit * currentMissionPlanEditor() const;
|
|
ParticipantManagement::MissionPlan currentMissionPlan() const ;
|
|
void tableColumnOrganiserSetting() override;
|
|
|
|
|
|
protected slots:
|
|
void enaDisa();
|
|
void onUnlockModifications();
|
|
void onLockModifications();
|
|
void onAddMissionPlan();
|
|
void onRemoveMissionPlanClicked();
|
|
void onEditMissionPlan();
|
|
void onEditDialogClosed(const int participantId);
|
|
void onMissionPlanChanged(const ParticipantManagement::MissionPlan &data, const DataModification modType);
|
|
private:
|
|
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ppmFtc;
|
|
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
QTimer m_updateMissionTimer;
|
|
|
|
LtsSession::LtsSession *m_session;
|
|
QString m_menuGroup;
|
|
QMap<int, MissionPlanEdit *> m_participantUasEditMap;
|
|
LOGGER_T m_logger;
|
|
|
|
Ui::MissionPlanDialog *m_ui;
|
|
|
|
MissionPlanModel *m_missionPlanModel{nullptr};
|
|
MissionPlanProxyModel *m_missionPlanProxyModel{nullptr};
|
|
};
|
|
} // namespace CentralEffectSimulation
|