summaryrefslogtreecommitdiff
path: root/grc/data/platforms/python/blocks/variable_slider.xml
diff options
context:
space:
mode:
authorjblum2008-09-07 21:38:12 +0000
committerjblum2008-09-07 21:38:12 +0000
commitc86f6c23c6883f73d953d64c28ab42cedb77e4d7 (patch)
tree0193b2a649eb0f7f1065912862de340a02848e16 /grc/data/platforms/python/blocks/variable_slider.xml
parentddec4fc07744a6519086b1b111f29d551b7f19c6 (diff)
downloadgnuradio-c86f6c23c6883f73d953d64c28ab42cedb77e4d7.tar.gz
gnuradio-c86f6c23c6883f73d953d64c28ab42cedb77e4d7.tar.bz2
gnuradio-c86f6c23c6883f73d953d64c28ab42cedb77e4d7.zip
Merged r9481:9518 on jblum/grc_reorganize into trunk. Reorganized grc source under gnuradio.grc module. Trunk passes make distcheck.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9525 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc/data/platforms/python/blocks/variable_slider.xml')
-rw-r--r--grc/data/platforms/python/blocks/variable_slider.xml92
1 files changed, 92 insertions, 0 deletions
diff --git a/grc/data/platforms/python/blocks/variable_slider.xml b/grc/data/platforms/python/blocks/variable_slider.xml
new file mode 100644
index 000000000..2f6374b9a
--- /dev/null
+++ b/grc/data/platforms/python/blocks/variable_slider.xml
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##Variable Slider: a grc variable with key, value, min, max, step
+###################################################
+ -->
+<block>
+ <name>Variable Slider</name>
+ <key>variable_slider</key>
+ <make>$value
+_$(id)_control = grc_wxgui.slider_$(slider_type)_control(
+ window=self.GetWin(),
+ callback=self.set_$(id),
+ #if $label.eval
+ label=$label,
+ #else
+ label=&quot;$id&quot;,
+ #end if
+ value=$id,
+ min=$min,
+ max=$max,
+ num_steps=$num_steps,
+)
+#set $grid_pos = $grid_pos.eval
+#if not grid_pos
+self.Add(_$(id)_control)
+#else
+self.GridAdd(_$(id)_control, $grid_pos[0], $grid_pos[1], $grid_pos[2], $grid_pos[3])
+#end if</make>
+ <param>
+ <name>Label</name>
+ <key>label</key>
+ <value></value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Default Value</name>
+ <key>value</key>
+ <value>50</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Minimum</name>
+ <key>min</key>
+ <value>0</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Maximum</name>
+ <key>max</key>
+ <value>100</value>
+ <type>real</type>
+ </param>
+ <param>
+ <name>Num Steps</name>
+ <key>num_steps</key>
+ <value>100</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Slider Type</name>
+ <key>slider_type</key>
+ <value>horizontal</value>
+ <type>enum</type>
+ <option>
+ <name>Horizontal</name>
+ <key>horizontal</key>
+ </option>
+ <option>
+ <name>Vertical</name>
+ <key>vertical</key>
+ </option>
+ </param>
+ <param>
+ <name>Grid Position</name>
+ <key>grid_pos</key>
+ <value></value>
+ <type>grid_pos</type>
+ </param>
+ <check>$min &lt;= $value &lt;= $max</check>
+ <check>$min &lt; $max</check>
+ <check>0 &lt; $num_steps &lt;= 1000</check>
+ <doc>
+This block creates a variable with a slider. \
+Leave the label blank to use the variable id as the label. \
+The value must be a real number. \
+The value must be between the minimum and the maximum. \
+The number of steps must be between 0 and 1000.
+
+Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
+ </doc>
+</block>