86 lines
2.2 KiB
C++
Executable File
86 lines
2.2 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_info_gui_plugin_interface.h>
|
|
|
|
namespace ParticipantManagement
|
|
{
|
|
namespace Interface {
|
|
class Dtc;
|
|
}
|
|
}
|
|
|
|
namespace SituationMap{
|
|
class ForeignGuiInterface;
|
|
}
|
|
|
|
namespace AdvancedSymbology {
|
|
class ForeignDataInterface;
|
|
}
|
|
namespace GuezIedManagement
|
|
{
|
|
|
|
namespace Interface {
|
|
class Dtc;
|
|
}
|
|
|
|
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "gui:3:gim.info")
|
|
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 ||
|
|
partition == IDL::PartitionType::Replay;
|
|
}
|
|
};
|
|
|
|
class InterfaceImpl final : public QObject, public GuezIedManagement::ForeignGuiInterface, 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("IED Management"); }
|
|
|
|
bool fetchInterfaces() override;
|
|
void clearInterfaces() override;
|
|
|
|
// ForeignDataInterface
|
|
void showInfoWindow(const QVector<int> &iedEntityIds) override;
|
|
void showInfoWindow(int iedEntityId) override;
|
|
|
|
private:
|
|
LtsWidgets::LtsDialog *onShowInfoWindow(QWidget *parent, int iedEntityId);
|
|
|
|
std::shared_ptr<GuezIedManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
|
|
std::shared_ptr<SituationMap::ForeignGuiInterface> m_situationIfc;
|
|
std::shared_ptr<AdvancedSymbology::ForeignDataInterface> m_asbIfc;
|
|
};
|
|
|
|
} // namespace GuezIedManagement
|