61 lines
1.7 KiB
C++
Executable File
61 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
|
#include <LtsProjectionWorkstation/logger.h>
|
|
#include <Plugins/OperatorManagement/Data/opm_data_plugin.h>
|
|
#include <Plugins/OperatorManagement/opm_settings_gui_plugin_interface.h>
|
|
#include <Plugins/AssetManagement/Data/asm_data_plugin.h>
|
|
#include <memory>
|
|
|
|
namespace ProjectionWorkstation
|
|
{
|
|
|
|
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "gui:3:pws")
|
|
Q_INTERFACES(GuiPluginBase::Plugin)
|
|
|
|
Q_OBJECT
|
|
public:
|
|
explicit GuiPlugin() = default;
|
|
~GuiPlugin() = default;
|
|
|
|
QString pluginName() override { return QLatin1String("ProjectionWorkstationGuiPlugin"); }
|
|
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 GuiPluginBase::Interface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
|
|
|
QVector<LtsWidgets::PluginData> getActions() override;
|
|
QString menuGroup() const override { return tr("Projection"); }
|
|
bool fetchInterfaces() override;
|
|
void clearInterfaces() override;
|
|
|
|
private:
|
|
bool m_isProjectionWorkstation;
|
|
|
|
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
|
|
std::shared_ptr<OperatorManagement::ForeignSettingsGuiInterface> m_opmIfc;
|
|
std::shared_ptr<AssetManagement::Interface::Dtc> m_asmDtc;
|
|
|
|
};
|
|
|
|
} // namespace ProjectionWorkstation
|