QWidget *parent) :
QWidget(parent),
_layout(this),
- _read_only_value(this),
_value(this),
_list(this),
_value_type(None)
setLayout(&_layout);
_layout.setMargin(0);
- _layout.addWidget(&_read_only_value);
_layout.addWidget(&_list);
_layout.addWidget(&_value);
void SweepTimingWidget::show_none()
{
_value_type = None;
- _read_only_value.hide();
- _value.hide();
- _list.hide();
-}
-
-void SweepTimingWidget::show_read_only()
-{
- _value_type = ReadOnly;
- _read_only_value.show();
_value.hide();
_list.hide();
}
_value.setRange(min, max);
_value.setSingleStep(step);
- _read_only_value.hide();
_value.show();
_list.hide();
}
g_free(s);
}
- _read_only_value.hide();
_value.hide();
_list.show();
}
switch(_value_type)
{
case None:
- case ReadOnly:
return 0;
case MinMaxStep:
void SweepTimingWidget::set_value(uint64_t value)
{
- _read_only_value.setText(QString("%1").arg(value));
-
_value.setValue(value);
for (int i = 0; i < _list.count(); i++)
enum ValueType
{
None,
- ReadOnly,
MinMaxStep,
List
};
SweepTimingWidget(const char *suffix, QWidget *parent = NULL);
void show_none();
- void show_read_only();
void show_min_max_step(uint64_t min, uint64_t max, uint64_t step);
void show_list(const uint64_t *vals, size_t count);
private:
QHBoxLayout _layout;
- QLineEdit _read_only_value;
QDoubleSpinBox _value;
QComboBox _list;