mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-12 21:39:26 +00:00
32 lines
696 B
C++
32 lines
696 B
C++
|
#ifndef CSVSETTINGS_SPINBOX_HPP
|
||
|
#define CSVSETTINGS_SPINBOX_HPP
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QStringList>
|
||
|
#include <QSpinBox>
|
||
|
|
||
|
namespace CSVSettings
|
||
|
{
|
||
|
class SpinBox : public QSpinBox
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
QStringList mValueList;
|
||
|
|
||
|
public:
|
||
|
explicit SpinBox(QWidget *parent = 0);
|
||
|
|
||
|
void setObjectName (const QString &name);
|
||
|
|
||
|
void setValue (const QString &value);
|
||
|
void setValueList (const QStringList &list);
|
||
|
const QStringList &valueList() const { return mValueList; }
|
||
|
|
||
|
protected:
|
||
|
|
||
|
QString textFromValue (int val) const;
|
||
|
int valueFromText (const QString &text) const;
|
||
|
};
|
||
|
}
|
||
|
#endif // CSVSETTINGS_SPINBOX_HPP
|