Adds initial intermediate qt6 porting state
This commit is contained in:
11247 files changed
+1891537
No files matched your search
+68
@@ -0,0 +1,68 @@
|
||||
|
||||
|
||||
|
||||
#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.exercisePart = LtsWidgets::ExercisePart::eSpecial;
|
||||
plData.menuIcon = QIcon(QStringLiteral("icon:player_equipment_type.svg"));
|
||||
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"));
|
||||
plData.exercisePart = LtsWidgets::ExercisePart::eSpecial;
|
||||
plData.createWidgetFunc = [this](QWidget *parent)
|
||||
{
|
||||
return LtsWidgets::initDialog(new InjuryModelList(menuGroup(), m_session, parent));
|
||||
};
|
||||
ret.append(plData);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user