Files
qt5-legatus-legacy/Lts/Plugins/ParticipantManagement/Gui/ParticipantInfo/participant_gear_restock_charge.h
T
2026-08-13 18:33:10 +02:00

41 lines
892 B
C++
Executable File

/**
* @RDE_HEADER@
* Restock Charges - UI Element for a single charge.
* $Id$
* $HeadURL$
* $Author$
* Created by Iuliana Ojog - 2022-03-17
*/
#pragma once
#include <QWidget>
namespace Ui {
class ParticipantGearRestockCharge;
}
class ParticipantGearRestockCharge : public QWidget
{
Q_OBJECT
public:
explicit ParticipantGearRestockCharge(QWidget *parent = nullptr, bool showAllOptions = false);
~ParticipantGearRestockCharge();
bool init(int chargeTypeId, const QString &chargeName, int initialValue, int maxThisCharge);
int value() const;
int chargeTypeId() const { return m_chargeTypeId; }
public slots:
void setMaxValue(int maxVal); // If this is higher than "maxThisCharge", maxThisCharge is taken!
signals:
void valueChanged(int newVal);
private:
int m_chargeTypeId{-1};
int m_maxThisCharge{9999};
Ui::ParticipantGearRestockCharge *m_ui;
};