Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+80
@@ -0,0 +1,80 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Dialog to edit drone Simulation
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Steve Kemayou, ESZS, 2025-04-08
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <LtsWidgets/lts_abstract_table_model.h>
|
||||
#include <LtsWidgets/lts_column_filter_proxy_model.h>
|
||||
//#include <CentralEffectSimulation/logger.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include "logger.h"
|
||||
|
||||
namespace CentralEffectSimulation
|
||||
{
|
||||
class MissionPlanModel : public LtsWidgets::LtsAbstractTableModel<ParticipantManagement::MissionPlan>
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
enum Columns
|
||||
{
|
||||
Name,
|
||||
MissionStart,
|
||||
ItemsCountAndFulfilled, // item Fulfilled / item count
|
||||
Fulfilled,
|
||||
Participant,
|
||||
UasState,
|
||||
CurrentMission,
|
||||
Aborted
|
||||
};
|
||||
explicit MissionPlanModel(QObject *parent = nullptr);
|
||||
QVariant data(const QModelIndex &index, int role) const override final;
|
||||
bool initModel(const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc, int exerciseId);
|
||||
QString currentJob2String(const ParticipantManagement::MissionPlan &missionPlan) const;
|
||||
|
||||
|
||||
private slots:
|
||||
void onMissionPlanChanged(const ParticipantManagement::MissionPlan &data, const DataModification modType);
|
||||
|
||||
private:
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
||||
int m_exerciseId {-1};
|
||||
LOGGER_T m_logger;
|
||||
friend class EmergencyCallProxyModel;
|
||||
};
|
||||
|
||||
|
||||
/*!
|
||||
* UASProxyModel
|
||||
*/
|
||||
class MissionPlanProxyModel : public LtsWidgets::LtsColumnFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
using LtsWidgets::LtsColumnFilterProxyModel::LtsColumnFilterProxyModel;
|
||||
bool showExpired() const {return m_showExpired;}
|
||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
|
||||
public slots:
|
||||
void setShowExpired(bool show);
|
||||
protected:
|
||||
bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override final;
|
||||
private:
|
||||
bool checkFilter(int sourceRow)const;
|
||||
private:
|
||||
bool m_showExpired{false};
|
||||
MissionPlanModel *m_sourceModel{nullptr};
|
||||
};
|
||||
} //namespace CentralEffectSimulation
|
||||
|
||||
Reference in new issue
Block a user