75 lines
2.4 KiB
C++
Executable File
75 lines
2.4 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* GUI Plugin for ParticipantManagement - Participant Edit
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, SLSE, 2016-10-17
|
|
*/
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <ParticipantManagement/logger.h>
|
|
|
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_participants_gui_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_gui_combobox_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_templates_gui_plugin_interface.h>
|
|
#include <Plugins/ParticipantManagement/ppm_data_plugin_interface.h>
|
|
|
|
namespace AdvancedSymbology
|
|
{
|
|
class ForeignDataInterface;
|
|
}
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
|
|
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "gui:3:ppm.participant")
|
|
Q_INTERFACES(GuiPluginBase::Plugin)
|
|
|
|
Q_OBJECT
|
|
public:
|
|
GuiPlugin() = default;
|
|
~GuiPlugin() = default;
|
|
|
|
QString pluginName() override { return QStringLiteral("ParticipantManagement.GuiPlugin.ParticipantEdit"); }
|
|
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
|
bool availableInPartition(IDL::PartitionType partition) const override
|
|
{
|
|
return (partition == IDL::PartitionType::Exercise);
|
|
}
|
|
};
|
|
|
|
class InterfaceImpl final : public QObject, public ForeignGuiParticipantsInterface, public GuiPluginBase::Interface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
|
|
|
QVector<LtsWidgets::PluginData> getActions() override;
|
|
bool fetchInterfaces() override;
|
|
void clearInterfaces() override;
|
|
QString menuGroup() const override;
|
|
QString menuGroupSup() const;
|
|
|
|
bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise; }
|
|
|
|
private:
|
|
LtsWidgets::LtsDialog *onParticipantEdit(QWidget *parent, bool asSupportService);
|
|
LtsWidgets::LtsDialog *onParticipantOrganisation(QWidget *parent, bool asSupportService);
|
|
LtsWidgets::LtsDialog *onTacticalParticipantOrganisation(QWidget *parent);
|
|
|
|
private:
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ftc;
|
|
std::shared_ptr<ParticipantManagement::ForeignGuiTemplatesInterface> m_ppmGuiTemplateIfc;
|
|
std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> m_ppmGuiCbxIfc;
|
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asb;
|
|
};
|
|
|
|
} // namespace ParticipantManagement
|