diff options
-rw-r--r-- | gr-qtgui/grc/qtgui_range.xml | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/gr-qtgui/grc/qtgui_range.xml b/gr-qtgui/grc/qtgui_range.xml index 12807ec84..4d28de223 100644 --- a/gr-qtgui/grc/qtgui_range.xml +++ b/gr-qtgui/grc/qtgui_range.xml @@ -21,21 +21,33 @@ #if $widget() == "knob" ######################################################################## $win = Qt.QVBoxLayout() -self._$(id)_knob = Qwt.QwtKnob(None) +self._$(id)_knob = Qwt.QwtKnob() self._$(id)_knob.setRange($start, $stop, $step) self._$(id)_knob.setValue(self.$id) self._$(id)_knob.valueChanged.connect(self.set_$(id)) $(win).addWidget(self._$(id)_knob) -self._$(id)_label = Qt.QLabel($label, None) +self._$(id)_label = Qt.QLabel($label) self._$(id)_label.setAlignment(Qt.Qt.AlignTop | Qt.Qt.AlignHCenter) $(win).addWidget(self._$(id)_label) #end if ######################################################################## +#if $widget() == "thermo" +######################################################################## +$win = $(orient.layout)() +$(win).addWidget(Qt.QLabel($label)) +self._$(id)_thermo = Qwt.QwtThermo() +self._$(id)_thermo.setScalePosition(Qwt.QwtThermo.$orient.scalepos) +self._$(id)_thermo.setRange($start, $stop) +self._$(id)_thermo.setValue(self.$id) +self._$(id)_thermo.$(orient.minfcn)($min_len) +$(win).addWidget(self._$(id)_thermo) +#end if +######################################################################## #if $widget() == "counter" ######################################################################## $win = Qt.QHBoxLayout() -$(win).addWidget(Qt.QLabel($label+": ", None)) -self._$(id)_counter = Qwt.QwtCounter(None) +$(win).addWidget(Qt.QLabel($label+": ")) +self._$(id)_counter = Qwt.QwtCounter() self._$(id)_counter.setRange($start, $stop, $step) self._$(id)_counter.setNumButtons(2) self._$(id)_counter.setMinimumWidth($min_len) @@ -47,13 +59,13 @@ self._$(id)_counter.valueChanged.connect(self.set_$(id)) #if $widget() == "slider" ######################################################################## $win = $(orient.layout)() -self._$(id)_slider = Qwt.QwtSlider(None, Qt.$orient, $orient.scalepos, Qwt.QwtSlider.BgSlot) +self._$(id)_slider = Qwt.QwtSlider(None, Qt.$orient, Qwt.QwtSlider.$orient.scalepos, Qwt.QwtSlider.BgSlot) self._$(id)_slider.setRange($start, $stop, $step) self._$(id)_slider.setValue(self.$id) self._$(id)_slider.$(orient.minfcn)($min_len) self._$(id)_slider.valueChanged.connect(self.set_$(id)) $(win).addWidget(self._$(id)_slider) -self._$(id)_num = Qt.QLabel(eng_notation.num_to_str($id), None) +self._$(id)_num = Qt.QLabel(eng_notation.num_to_str($id)) $(win).addWidget(self._$(id)_num) #end if ######################################################################## @@ -62,8 +74,8 @@ $(win).addWidget(self._$(id)_num) $win = Qt.QVBoxLayout() self._$(id)_tool_bar = Qt.QToolBar(self) $(win).addWidget(self._$(id)_tool_bar) -self._$(id)_tool_bar.addWidget(Qt.QLabel($label+": ", None)) -self._$(id)_counter = Qwt.QwtCounter(None) +self._$(id)_tool_bar.addWidget(Qt.QLabel($label+": ")) +self._$(id)_counter = Qwt.QwtCounter() self._$(id)_counter.setRange($start, $stop, $step) self._$(id)_counter.setNumButtons(2) self._$(id)_counter.setValue(self.$id) @@ -81,6 +93,9 @@ $(gui_hint()($win))</make> <callback>#if $widget() == "knob" self._$(id)_knob.setValue($id) #end if +#if $widget() == "thermo" +self._$(id)_thermo.setValue($id) +#end if #if $widget() == "counter" self._$(id)_counter.setValue($id) #end if @@ -133,24 +148,25 @@ self._$(id)_slider.setValue($id) <option><name>Counter</name><key>counter</key></option> <option><name>Slider</name><key>slider</key></option> <option><name>Knob</name><key>knob</key></option> + <option><name>Thermo</name><key>thermo</key></option> </param> <param> <name>Orientation</name> <key>orient</key> <value>Qt.Horizontal</value> <type>enum</type> - <hide>#if $widget() == "slider" then 'part' else 'all'#</hide> + <hide>#if $widget() in ("slider", "thermo") then 'part' else 'all'#</hide> <option> <name>Horizontal</name> <key>Qt.Horizontal</key> - <opt>scalepos:Qwt.QwtSlider.BottomScale</opt> + <opt>scalepos:BottomScale</opt> <opt>minfcn:setMinimumWidth</opt> <opt>layout:Qt.QHBoxLayout</opt> </option> <option> <name>Vertical</name> <key>Qt.Vertical</key> - <opt>scalepos:Qwt.QwtSlider.RightScale</opt> + <opt>scalepos:LeftScale</opt> <opt>minfcn:setMinimumHeight</opt> <opt>layout:Qt.QVBoxLayout</opt> </option> @@ -160,7 +176,7 @@ self._$(id)_slider.setValue($id) <key>min_len</key> <value>200</value> <type>int</type> - <hide>#if $widget().split('_')[0] in ("slider", "counter") then 'part' else 'all'#</hide> + <hide>#if $widget().split('_')[0] in ("slider", "counter", "thermo") then 'part' else 'all'#</hide> </param> <param> <name>GUI Hint</name> |