10#include <QWidgetAction>
53 void _decimalDigitsChanged(
int value);
54 void _scientificClicked(
bool value);
66 QWidget * widget =
new QWidget(NULL);
67 QHBoxLayout *layout =
new QHBoxLayout();
68 QLabel * label =
new QLabel(title);
69 _spinBox =
new QSpinBox(NULL);
71 _spinBox->setValue(value);
72 layout->setContentsMargins(-1, 0, -1, 0);
73 layout->addWidget(label);
74 layout->addWidget(_spinBox);
75 widget->setLayout(layout);
79 connect(_spinBox, SIGNAL(valueChanged(
int)),
this, SLOT(spinBoxChanged()));
81 setDefaultWidget(widget);
90 int value = _spinBox->value();
104 QWidget * widget =
new QWidget(NULL);
105 QHBoxLayout *layout =
new QHBoxLayout();
106 QLabel * label =
new QLabel(title);
107 _checkBox =
new QCheckBox(NULL);
108 _checkBox->setChecked(value);
110 layout->setContentsMargins(-1, 0, 20, 0);
111 layout->addWidget(label);
112 layout->addStretch();
113 layout->addWidget(_checkBox);
114 widget->setLayout(layout);
116 connect(_checkBox, &QCheckBox::clicked,
this, &CheckBoxAction::checkBoxChanged);
118 setDefaultWidget(widget);
122 QCheckBox *_checkBox;
125 void checkBoxChanged(
bool value) { emit
clicked(value); }
CheckBoxAction(const QString &title, bool value)
SpinBoxAction(const QString &title, int value)
void editingFinished(int)
void ValueChanged(const std::string &value)
void ShowContextMenu(const QPoint &)
VLineEdit_Deprecated(const std::string &value="")
void SetIsDouble(bool isDouble)
void SetValue(const std::string &value)
void SetValue(double value)
void emitLineEditChanged()
void SetReadOnly(bool b)
Sets the line edit to read-only based on the value of b.
std::string GetValue() const