52 lines
1.4 KiB
C++
Executable File
52 lines
1.4 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* The ParticipantModel provices participant data for SimulationDialog
|
|
* $Id: ism_asset_list_dialog_model.h 58852 2023-02-01 11:28:56Z fritsche_h $
|
|
* $HeadURL: svn://192.168.133.21/TDS/branches/product/features/3dws_devel/Lts/Plugins/InfrastructureManagement/Gui/ResourceManagement/AssetList/ism_asset_list_dialog_model.h $
|
|
* $Author: fritsche_h $
|
|
* Created by Hannes Fritsche, ESZS, 2024-09-19
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LtsWidgets/lts_abstract_table_model.h>
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
class Participant;
|
|
class Party;
|
|
|
|
namespace Interface
|
|
{
|
|
class Dtc;
|
|
}
|
|
}
|
|
|
|
namespace CollateralDamageSimulation
|
|
{
|
|
|
|
class ParticipantModel final : public LtsWidgets::LtsAbstractTableModel<ParticipantManagement::Participant>
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ParticipantModel(QObject *parent = nullptr);
|
|
|
|
enum Columns
|
|
{
|
|
PARTY = 0,
|
|
EQUIPMENT_NUMBER = 1,
|
|
DESIGNATOR = 2,
|
|
TACTICAL_IDENTIFIER = 3
|
|
};
|
|
|
|
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
|
|
bool initModel(const std::shared_ptr<ParticipantManagement::Interface::Dtc> &ppmDtc, const QVector<int> &participantIds);
|
|
|
|
private: // attributes
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
mutable QHash<int, ParticipantManagement::Party> m_partyCache;
|
|
}; // class ParticipantModel
|
|
|
|
} // namespace CollateralDamageSimulation
|