Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

+46
View File
@@ -0,0 +1,46 @@
/**
* @RDE_HEADER@
* Add Equipment Type - Ask for new ID and id of template to copy from
* $Id$
* $HeadURL$
* $Author$
* Created by Malte Diers, NLE, 2020-07-20
*/
#include "injury_model_add.h"
#include "ui_injury_model_add.h"
namespace WarehouseManagement
{
InjuryModelAdd::InjuryModelAdd(const QSet<int> &availableIds, QWidget *parent)
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
, m_ui(new Ui::InjuryModelAdd)
{
m_ui->setupUi(this);
connect(m_ui->ltsDialogButtonBox->getButton(LtsWidgets::DialogButton::Close), &QPushButton::clicked,
this, &InjuryModelAdd::reject);
connect(m_ui->ltsDialogButtonBox->getButton(LtsWidgets::DialogButton::Ok), &QPushButton::clicked,
this, &InjuryModelAdd::onOkay);
for (int val = 1; val <= 255; ++ val)
{
if (availableIds.contains(val))
m_ui->cbId->addItem(QString::number(val), val);
}
}
InjuryModelAdd::~InjuryModelAdd()
{
delete m_ui;
}
void InjuryModelAdd::onOkay()
{
emit newInjuryModel(m_ui->cbId->currentData().toInt());
accept();
}
} // namespace AreaEffectSimulation