63 lines
1.7 KiB
C++
Executable File
63 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* HMI Plugin for ExerciseManangement
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Mike Wille, SLSE, 2016-03-30
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include <ServiceManagement/logger.h>
|
|
#include <ServiceManagement/scm_ftc.h>
|
|
#include <ServiceManagement/scm_dtc.h>
|
|
#include <ExerciseManagement/exm_dtc.h>
|
|
#include <Plugins/ServiceManagement/scm_data_plugin_interface.h>
|
|
|
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
|
|
|
|
|
namespace ServiceManagement
|
|
{
|
|
|
|
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "gui:3:scm")
|
|
Q_INTERFACES(GuiPluginBase::Plugin)
|
|
|
|
Q_OBJECT
|
|
public:
|
|
GuiPlugin() = default;
|
|
~GuiPlugin() = default;
|
|
|
|
QString pluginName() override { return QStringLiteral("ServiceManagement"); }
|
|
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
|
bool availableInPartition(IDL::PartitionType partition) const override
|
|
{
|
|
return (partition == IDL::PartitionType::Global);
|
|
}
|
|
};
|
|
|
|
class InterfaceImpl final : public QObject, 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;
|
|
bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Global; }
|
|
|
|
private:
|
|
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtcExm;
|
|
std::shared_ptr<ServiceManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<ServiceManagement::Interface::Ftc> m_ftc;
|
|
};
|
|
|
|
} // namespace ServiceManagement
|