55 lines
1.6 KiB
C++
Executable File
55 lines
1.6 KiB
C++
Executable File
/**
|
|
*@RDE_HEADER@
|
|
* Gui Plugin for EffectShowManagement - PpmComboBox
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Patric Karwat, SLSE, 2016-09-12
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LtsSession/lts_session.h>
|
|
|
|
#include <PluginInterfaces/gui_plugin_interface.h>
|
|
#include <Plugins/EffectShowManagement/esm_data_plugin_interface.h>
|
|
|
|
#include "esm_combobox_foreign_gui_interface_impl.h"
|
|
|
|
namespace EffectShowManagement
|
|
{
|
|
|
|
class GuiPlugin final : public QObject, public GuiPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "gui:3:esm.combobox")
|
|
Q_INTERFACES(GuiPluginBase::Plugin)
|
|
|
|
Q_OBJECT
|
|
public:
|
|
GuiPlugin() = default;
|
|
~GuiPlugin() = default;
|
|
|
|
QString pluginName() override { return QStringLiteral("EffectShowManagement.GuiPlugin.ComboBox"); }
|
|
std::shared_ptr<GuiPluginBase::Interface> createGuiInterface(LtsSession::LtsSession *session) override;
|
|
bool availableInPartition(IDL::PartitionType partition) const override
|
|
{
|
|
return (partition == IDL::PartitionType::Global ||
|
|
partition == IDL::PartitionType::Exercise ||
|
|
partition == IDL::PartitionType::Replay);
|
|
}
|
|
};
|
|
|
|
class InterfaceImpl final : public ForeignGuiComboboxInterfaceImpl, public GuiPluginBase::Interface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit InterfaceImpl(LtsSession::LtsSession *session);
|
|
|
|
bool fetchInterfaces() override;
|
|
void clearInterfaces() override;
|
|
QString menuGroup() const override { return QString(); }
|
|
bool availableInPartition(IDL::PartitionType partition) const override { return partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Global; }
|
|
};
|
|
|
|
} // namespace EffectShowManagement
|