Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+74
@@ -0,0 +1,74 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* GUI Plugin for WarehouseManagement
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-02-29
|
||||
*/
|
||||
|
||||
#include "whm_gui_plugin.h"
|
||||
#include "injury_model_edit_dialog.h"
|
||||
#include "injury_model_list.h"
|
||||
#include "equipment_type_edit_dialog.h"
|
||||
#include "equipment_type_list.h"
|
||||
#include "../whm_data_plugin_interface.h"
|
||||
|
||||
#include <WarehouseGuez/whg_operator_rights.h>
|
||||
#include <LtsSession/lts_session.h>
|
||||
|
||||
namespace WarehouseManagement
|
||||
{
|
||||
|
||||
std::shared_ptr<GuiPluginBase::Interface> GuiPlugin::createGuiInterface(LtsSession::LtsSession *session)
|
||||
{
|
||||
return std::make_shared<InterfaceImpl>(session);
|
||||
}
|
||||
|
||||
InterfaceImpl::InterfaceImpl(LtsSession::LtsSession *session)
|
||||
: GuiPluginBase::Interface(session, WarehouseGuez::getLogger(QStringLiteral("Plugins.Gui.Whm")))
|
||||
, m_dtc(nullptr)
|
||||
, m_ftc(nullptr)
|
||||
{}
|
||||
|
||||
bool InterfaceImpl::fetchInterfaces()
|
||||
{
|
||||
if (!m_session->getDtc<WarehouseManagement::DataInterface>(m_dtc) ||
|
||||
!m_session->getFtc<WarehouseManagement::DataInterface>(m_ftc))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
QVector<LtsWidgets::PluginData> InterfaceImpl::getActions()
|
||||
{
|
||||
QVector<LtsWidgets::PluginData> ret;
|
||||
LtsWidgets::PluginData plData;
|
||||
|
||||
plData.menuGroup = menuGroup();
|
||||
plData.menuText = tr("Equipment Types Overview");
|
||||
plData.identifier = QStringLiteral("whmEquipmentTypes");
|
||||
// plData.operatorRight = OperatorRights:: // todo opRights
|
||||
plData.exercisePart = LtsWidgets::ExercisePart::eSpecial;
|
||||
plData.menuIcon = QIcon(QStringLiteral("icon:player_equipment_type.svg")); // todo icon
|
||||
plData.createWidgetFunc = [this](QWidget *parent)
|
||||
{
|
||||
return LtsWidgets::initDialog(new EquipmentList(menuGroup(), m_session, parent));
|
||||
};
|
||||
ret.append(plData);
|
||||
|
||||
plData.menuGroup = menuGroup();
|
||||
plData.menuText = tr("Injury Model Overview");
|
||||
plData.identifier = QStringLiteral("whmInjuryModelTypes");
|
||||
plData.menuIcon = QIcon(QStringLiteral("icon:vul_model.svg")); // todo icon
|
||||
plData.exercisePart = LtsWidgets::ExercisePart::eSpecial;
|
||||
plData.createWidgetFunc = [this](QWidget *parent)
|
||||
{
|
||||
return LtsWidgets::initDialog(new InjuryModelList(menuGroup(), m_session, parent));
|
||||
};
|
||||
ret.append(plData);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
} //namespace WarehouseManagement
|
||||
Reference in new issue
Block a user