Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+47
@@ -0,0 +1,47 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* ContaminationManangement - ChargeEdit Dlg
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Patric Karwat, SLSE, 2019-05-17
|
||||
*/
|
||||
|
||||
#include "aes_charge_edit.h"
|
||||
#include "ui_aes_charge_edit.h"
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
ChargeEdit::ChargeEdit(int chargeId, const QString &charge, int oldStock, QWidget *parent)
|
||||
: LtsWidgets::LtsFramelessDialog(parent, LtsWidgets::Behaviour::Modal)
|
||||
, m_chargeId(chargeId)
|
||||
, m_oldStock(oldStock)
|
||||
, m_buttonBox(new LtsWidgets::LtsDialogButtonBox(this))
|
||||
, m_ui(new Ui::ChargeEdit)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
m_ui->verticalLayout->addWidget(m_buttonBox);
|
||||
|
||||
connect(m_buttonBox->getButton(LtsWidgets::DialogButton::Close), &QPushButton::clicked,
|
||||
this, &ChargeEdit::onSendStock);
|
||||
connect(m_buttonBox->getButton(LtsWidgets::DialogButton::Ok), &QPushButton::clicked,
|
||||
this, &ChargeEdit::onSendStock);
|
||||
m_ui->spStock->setValue(oldStock);
|
||||
m_ui->lblCharge->setText(charge);
|
||||
}
|
||||
|
||||
ChargeEdit::~ChargeEdit()
|
||||
{
|
||||
delete m_ui;
|
||||
}
|
||||
|
||||
void ChargeEdit::onSendStock()
|
||||
{
|
||||
if (sender() == m_buttonBox->getButton(LtsWidgets::DialogButton::Close))
|
||||
emit newStock(m_chargeId, m_oldStock);
|
||||
else
|
||||
emit newStock(m_chargeId, m_ui->spStock->value());
|
||||
}
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
Reference in new issue
Block a user