From: Joel Holdsworth Date: Sat, 18 Jan 2014 22:43:56 +0000 (+0000) Subject: SweepTimingWidget removed Read Only support X-Git-Tag: pulseview-0.2.0~122 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5cacd7d9fbc6ba6e9e67940d2497f04dd54e7f76;p=pulseview.git SweepTimingWidget removed Read Only support --- diff --git a/pv/widgets/sweeptimingwidget.cpp b/pv/widgets/sweeptimingwidget.cpp index b1164891..d34d07e5 100644 --- a/pv/widgets/sweeptimingwidget.cpp +++ b/pv/widgets/sweeptimingwidget.cpp @@ -29,7 +29,6 @@ SweepTimingWidget::SweepTimingWidget(const char *suffix, QWidget *parent) : QWidget(parent), _layout(this), - _read_only_value(this), _value(this), _list(this), _value_type(None) @@ -46,7 +45,6 @@ SweepTimingWidget::SweepTimingWidget(const char *suffix, setLayout(&_layout); _layout.setMargin(0); - _layout.addWidget(&_read_only_value); _layout.addWidget(&_list); _layout.addWidget(&_value); @@ -56,15 +54,6 @@ SweepTimingWidget::SweepTimingWidget(const char *suffix, 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(); } @@ -77,7 +66,6 @@ void SweepTimingWidget::show_min_max_step(uint64_t min, uint64_t max, _value.setRange(min, max); _value.setSingleStep(step); - _read_only_value.hide(); _value.show(); _list.hide(); } @@ -95,7 +83,6 @@ void SweepTimingWidget::show_list(const uint64_t *vals, size_t count) g_free(s); } - _read_only_value.hide(); _value.hide(); _list.show(); } @@ -105,7 +92,6 @@ uint64_t SweepTimingWidget::value() const switch(_value_type) { case None: - case ReadOnly: return 0; case MinMaxStep: @@ -127,8 +113,6 @@ uint64_t SweepTimingWidget::value() const 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++) diff --git a/pv/widgets/sweeptimingwidget.h b/pv/widgets/sweeptimingwidget.h index c4bfe378..3ce79c7d 100644 --- a/pv/widgets/sweeptimingwidget.h +++ b/pv/widgets/sweeptimingwidget.h @@ -40,7 +40,6 @@ private: enum ValueType { None, - ReadOnly, MinMaxStep, List }; @@ -49,7 +48,6 @@ public: 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); @@ -62,7 +60,6 @@ signals: private: QHBoxLayout _layout; - QLineEdit _read_only_value; QDoubleSpinBox _value; QComboBox _list;