94 lines
1.7 KiB
C++
Executable File
94 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 Mike Wille, SLTE, 2024-01-11
|
|
*/
|
|
|
|
#include "tpm_usb_gui_plugin.h"
|
|
#include "tpm_usb_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("Plugin"))
|
|
{}
|
|
|
|
|
|
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("THP2.USB.Dialog");
|
|
plData.menuIcon = QIcon(QLatin1String("icon:export_documents.svg"));
|
|
plData.menuText = tr("Export THP USB");
|
|
// plData.operatorRight = OperatorRights::ScriptEditorEdit;
|
|
plData.createWidgetFunc = [this](QWidget *)
|
|
{
|
|
return LtsWidgets::createThrowableDialog<USB2Dialog>(m_session);
|
|
};
|
|
ret.append(plData);
|
|
|
|
return ret;
|
|
}
|
|
|
|
} // namespace TakeHomePackageManager
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//
|