summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Blum2011-03-03 22:16:55 -0800
committerJosh Blum2011-03-03 22:16:55 -0800
commit5bffcb2b1443f85bf695b48b57e6b16634ba331c (patch)
treeec34cb3026e781c273438766a1d31f4220ffe6cd
parent47096a9ec323ad88c83afbaefa4686284449048c (diff)
downloadgnuradio-5bffcb2b1443f85bf695b48b57e6b16634ba331c.tar.gz
gnuradio-5bffcb2b1443f85bf695b48b57e6b16634ba331c.tar.bz2
gnuradio-5bffcb2b1443f85bf695b48b57e6b16634ba331c.zip
qtgui-grc: made slider widget components (counter/slider) optional
-rw-r--r--gr-qtgui/grc/qtgui_slider.xml26
1 files changed, 22 insertions, 4 deletions
diff --git a/gr-qtgui/grc/qtgui_slider.xml b/gr-qtgui/grc/qtgui_slider.xml
index e71382b12..078e0df76 100644
--- a/gr-qtgui/grc/qtgui_slider.xml
+++ b/gr-qtgui/grc/qtgui_slider.xml
@@ -20,23 +20,31 @@ $(win).addWidget(self._$(id)_tool_bar)
#set $label = '"%s"'%$id
#end if
self._$(id)_tool_bar.addWidget(Qt.QLabel($label+": ", None))
+#if int($widget.counter)
self._$(id)_counter = Qwt.QwtCounter(None)
self._$(id)_counter.setRange($start, $stop, $step)
self._$(id)_counter.setNumButtons(2)
-self._$(id)_counter.setValue($value)
+self._$(id)_counter.setValue(self.$id)
self._$(id)_tool_bar.addWidget(self._$(id)_counter)
self._$(id)_counter.valueChanged.connect(self.set_$(id))
+#end if
+#if int($widget.slider)
self._$(id)_slider = Qwt.QwtSlider(None)
self._$(id)_slider.setRange($start, $stop, $step)
-self._$(id)_slider.setValue($value)
+self._$(id)_slider.setValue(self.$id)
self._$(id)_slider.setOrientation(Qt.$orient)
self._$(id)_slider.setScalePosition($orient.scalepos)
self._$(id)_slider.valueChanged.connect(self.set_$(id))
$(win).addWidget(self._$(id)_slider)
+#end if
$(gui_hint()($win))</make>
<callback>self.set_$(id)($value)</callback>
- <callback>self._$(id)_counter.setValue($id)</callback>
- <callback>self._$(id)_slider.setValue($id)</callback>
+ <callback>#if int($widget.counter)
+self._$(id)_counter.setValue($id)
+#end if
+#if int($widget.slider)
+self._$(id)_slider.setValue($id)
+#end if</callback>
<param>
<name>Label</name>
<key>label</key>
@@ -69,6 +77,16 @@ $(gui_hint()($win))</make>
<type>real</type>
</param>
<param>
+ <name>Widget</name>
+ <key>widget</key>
+ <value>all</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option><name>Counter + Slider</name> <key>both</key> <opt>counter:1</opt><opt>slider:1</opt></option>
+ <option><name>Counter only</name> <key>counter</key> <opt>counter:1</opt><opt>slider:0</opt></option>
+ <option><name>Slider only</name> <key>slider</key> <opt>counter:0</opt><opt>slider:1</opt></option>
+ </param>
+ <param>
<name>Orientation</name>
<key>orient</key>
<value>Qt.Horizontal</value>