Files
qt5-legatus-legacy/Lts/Plugins/GuezIedManagement/Gui/PairingEdit/gim_pairing_gui_plugin.h
T
2026-08-13 18:33:10 +02:00

73 lines
1.8 KiB
C++
Executable File

/**
* @RDE_HEADER@
* Pairing of IED-objects
* $Id$
* $HeadURL$
* $Author$
* Created by Philipp Dassow, SLEA, 2017-07-28
*/
#pragma once
#include <PluginInterfaces/gui_plugin_interface.h>
#include <Common/ProjectConfig/project_defines.h>
#include <Plugins/GuezIedManagement/gim_pairing_gui_plugin_interface.h>
namespace ParticipantManagement
{
namespace Interface {
class Dtc;
}
class ForeignGuiComboboxInterface;
}
namespace GuezIedManagement
{
namespace Interface {
class Dtc;
class Ftc;
}
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
{
Q_PLUGIN_METADATA(IID "gui:3:gim.pairingedit")
Q_INTERFACES(GuiPluginBase::Plugin)
Q_OBJECT
public:
explicit GuiPlugin() = default;
~GuiPlugin() = default;
QString pluginName() override { return ForeignGuiInterface::pluginName(); }
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 GuiPluginBase::Interface
{
Q_OBJECT
public:
explicit InterfaceImpl(LtsSession::LtsSession *session);
QString pluginName() { return ForeignGuiInterface::pluginName(); }
QVector<LtsWidgets::PluginData> getActions() override;
QString menuGroup() const override { return tr("Participants");}
bool fetchInterfaces() override;
void clearInterfaces() override;
private:
std::shared_ptr<GuezIedManagement::Interface::Dtc> m_dtc;
std::shared_ptr<GuezIedManagement::Interface::Ftc> m_ftc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> m_ppmGuiCbxIfc;
};
} // namespace GuezIedManagement