60 lines
1.7 KiB
C++
Executable File
60 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Gui Plugin for AudioVideoManagement - Eloka
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Astrid Mueller, SGAS, 2017-10-17
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AudioVideoManagement/logger.h>
|
|
#include <AudioVideoManagement/avm_dtc.h>
|
|
|
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
|
#include <Plugins/AudioVideoManagement/avm_data_plugin_interface.h>
|
|
|
|
namespace AudioVideoManagement
|
|
{
|
|
|
|
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "gui:3:avm.eloka")
|
|
Q_INTERFACES(GuiPluginBase::Plugin)
|
|
|
|
Q_OBJECT
|
|
public:
|
|
GuiPlugin() = default;
|
|
~GuiPlugin() = default;
|
|
|
|
QString pluginName() override { return QStringLiteral("AudioVideoManagement.GuiPlugin.Eloka"); }
|
|
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);
|
|
|
|
bool fetchInterfaces() override;
|
|
void clearInterfaces() override;
|
|
QString menuGroup() const override;
|
|
QVector<LtsWidgets::PluginData> getActions() override;
|
|
bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Global || partition == IDL::PartitionType::Exercise; }
|
|
|
|
private:
|
|
LtsWidgets::LtsDialog *onShowEloka(QWidget *parent);
|
|
|
|
std::shared_ptr<AudioVideoManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<AudioVideoManagement::DataInterface> m_avmDataIfc;
|
|
};
|
|
|
|
|
|
} // namespace AudioVideoManagement
|