Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+101
@@ -0,0 +1,101 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Tactical Organisation of Parties (during exercise execution)
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2016-10-05
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <LtsWidgets/lts_dialog.h>
|
||||
#include <ParticipantManagement/logger.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
#include <Plugins/ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
|
||||
#include <LtsUtilsGuiDds/request_helper.h>
|
||||
|
||||
class QTreeView;
|
||||
namespace AdvancedSymbology
|
||||
{
|
||||
class ForeignDataInterface;
|
||||
}
|
||||
namespace LtsSession
|
||||
{
|
||||
class LtsSession;
|
||||
}
|
||||
|
||||
namespace Core
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Ftc;
|
||||
}
|
||||
}
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class TacticalOrganisation;
|
||||
}
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
class ParticipantEditItem;
|
||||
class ParticipantEditModel;
|
||||
class ParticipantTreeFilterProxyModel;
|
||||
|
||||
class TacticalOrganisation final : public LtsWidgets::LtsDialog
|
||||
, protected ParticipantManagement::Interface::Ftc::ModifyParticipantDataReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TacticalOrganisation(LtsSession::LtsSession *session, QWidget *parent = nullptr);
|
||||
~TacticalOrganisation();
|
||||
|
||||
bool init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<Interface::Ftc> &ftc,
|
||||
const std::shared_ptr<ForeignGuiComboboxInterface> &ppmGuiCbxIfc,
|
||||
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbIfc);
|
||||
|
||||
void retranslate() override;
|
||||
protected:
|
||||
bool apply() override;
|
||||
void onModifyParticipantDataReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
private Q_SLOTS:
|
||||
void onReinitLeft();
|
||||
void onReinitRight();
|
||||
void onAddParticipant();
|
||||
void onParticipantSelected(int participantId);
|
||||
void showContextMenu(const QPoint position);
|
||||
private:
|
||||
void expandNodeChildren(QTreeView *pTreeView, const QModelIndex &index, bool expand);
|
||||
void editParticipant(const QModelIndex &idx);
|
||||
ParticipantTreeFilterProxyModel *modelForParty(int partyId, bool bLeftSide);
|
||||
ParticipantEditModel *editModelForParty(int partyId);
|
||||
void initLockedState();
|
||||
void tableColumnOrganiserSetting() override;
|
||||
private:
|
||||
std::shared_ptr<Interface::Dtc> m_dtc;
|
||||
std::shared_ptr<Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<ForeignGuiComboboxInterface> m_ppmGuiCbxIfc;
|
||||
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbIfc;
|
||||
std::shared_ptr<Core::Interface::Ftc> m_coreFtc;
|
||||
|
||||
QHash<int, ParticipantEditModel *> m_participantModels;
|
||||
QHash<int, ParticipantTreeFilterProxyModel *> m_participantProxyModels;
|
||||
LtsSession::LtsSession *m_session;
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
QAction *m_addEquipmentNumberAction;
|
||||
QTreeView *m_tvContextMenu;
|
||||
ParticipantEditItem *m_newItemDlg;
|
||||
static int s_preselectedPartyLeft;
|
||||
static int s_preselectedPartyRight;
|
||||
|
||||
// used for topic locking
|
||||
static const qint64 m_entityId { 12345678901 };
|
||||
int32_t m_unlockId {0};
|
||||
|
||||
Ui::TacticalOrganisation *m_ui;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace ParticipantManagement
|
||||
Reference in new issue
Block a user