61 lines
1.7 KiB
C++
Executable File
61 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* GUI Plugin for ExerciseManangement
|
|
* $Id: tpm_gui_plugin.cpp 48572 2019-10-02 11:47:04Z rudolphus_g $
|
|
* $HeadURL: svn://slssvn/TDS/branches/product/iterations/21_03_salted_caramel/Lts/Plugins/TakeHomePackageManager/tpm_gui_plugin.cpp $
|
|
* $Author: rudolphus_g $
|
|
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
|
*/
|
|
|
|
#include "tpm_gui_plugin.h"
|
|
#include "tpm_exported_scripts_dialog.h"
|
|
#include "logger.h"
|
|
|
|
namespace TakeHomePackageManager
|
|
{
|
|
std::shared_ptr<GuiPluginBase::Interface> GuiPlugin::createGuiInterface(LtsSession::LtsSession *session)
|
|
{
|
|
return std::make_shared<InterfaceImpl>(session);
|
|
}
|
|
|
|
|
|
InterfaceImpl::InterfaceImpl(LtsSession::LtsSession *session)
|
|
: GuiPluginBase::Interface(session, getLogger("Plugins.Gui.Tpm"))
|
|
{}
|
|
|
|
|
|
bool InterfaceImpl::fetchInterfaces()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
|
|
QString InterfaceImpl::menuGroup() const
|
|
{
|
|
return tr("Presentation");
|
|
}
|
|
|
|
QVector<LtsWidgets::PluginData> InterfaceImpl::getActions()
|
|
{
|
|
QVector<LtsWidgets::PluginData> ret;
|
|
LtsWidgets::PluginData plData;
|
|
plData.menuGroup = menuGroup();
|
|
if (m_session->app() == LtsAppDescriptor::App::Scripts)
|
|
plData.exercisePart = LtsWidgets::ExercisePart::eSpecial;
|
|
else
|
|
plData.exercisePart = LtsWidgets::ExercisePart::eAfterAction;
|
|
plData.identifier = QLatin1String("PresentationManagement.ScriptDialog.ManageExportedScripts");
|
|
plData.menuIcon = QIcon(QLatin1String("icon:export_documents.svg"));
|
|
plData.menuText = tr("Manage Exported Scripts");
|
|
// plData.operatorRight = OperatorRights::ScriptEditorEdit;
|
|
plData.createWidgetFunc = [this](QWidget *)
|
|
{
|
|
return LtsWidgets::initDialog(new ExportedScriptsDialog(), m_session);
|
|
};
|
|
ret.append(plData);
|
|
|
|
return ret;
|
|
}
|
|
|
|
} // namespace TakeHomePackageManager
|