diff options
Diffstat (limited to 'gr-qtgui/grc/qtgui_range.xml.cmakein')
-rw-r--r-- | gr-qtgui/grc/qtgui_range.xml.cmakein | 131 |
1 files changed, 131 insertions, 0 deletions
diff --git a/gr-qtgui/grc/qtgui_range.xml.cmakein b/gr-qtgui/grc/qtgui_range.xml.cmakein new file mode 100644 index 0000000000..71b614cc5e --- /dev/null +++ b/gr-qtgui/grc/qtgui_range.xml.cmakein @@ -0,0 +1,131 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Variable Range: +## ranged widgets like a slider or a knob +################################################### + --> +<block> + <name>QT GUI Range</name> + <key>variable_qtgui_range</key> + <import>from gnuradio.qtgui import Range, RangeWidget</import> + <var_make>self.$(id) = $(id) = $value</var_make> + <make>#set $win = 'self._%s_win'%$id + #set $range = 'self._%s_range'%$id +#if not $label() + #set $label = '"%s"'%$id +#end if +$(range) = Range($start, $stop, $step, $value, $min_len) +$(win) = RangeWidget($range, self.set_$(id), $label, "$widget", $rangeType) +$(gui_hint()($win))</make> + <callback>self.set_$(id)($value)</callback> + + <param> + <name>Label</name> + <key>label</key> + <value></value> + <type>string</type> + <hide>#if $label() then 'none' else 'part'#</hide> + </param> + + <param> + <name>Type</name> + <key>rangeType</key> + <value>"float"</value> + <type>enum</type> + <hide>part</hide> + <option><name>Float</name><key>float</key><opt>type:float</opt></option> + <option><name>Int</name><key>int</key><opt>type:int</opt></option> + </param> + + <param> + <name>Default Value</name> + <key>value</key> + <value>50</value> + <type>$rangeType.type</type> + </param> + + <param> + <name>Start</name> + <key>start</key> + <value>0</value> + <type>$rangeType.type</type> + </param> + + <param> + <name>Stop</name> + <key>stop</key> + <value>100</value> + <type>$rangeType.type</type> + </param> + + <param> + <name>Step</name> + <key>step</key> + <value>1</value> + <type>$rangeType.type</type> + </param> + + <param> + <name>Widget</name> + <key>widget</key> + <value>counter_slider</value> + <type>enum</type> + <hide>part</hide> + <option><name>Counter + Slider</name><key>counter_slider</key></option> + <option><name>Counter</name><key>counter</key></option> + <option><name>Slider</name><key>slider</key></option> + <option><name>Knob</name><key>dial</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> + <option> + <name>Horizontal</name> + <key>Qt.Horizontal</key> + <opt>scalepos:BottomScale</opt> + <opt>minfcn:setMinimumWidth</opt> + </option> + <option> + <name>Vertical</name> + <key>Qt.Vertical</key> + <opt>scalepos:LeftScale</opt> + <opt>minfcn:setMinimumHeight</opt> + </option> + </param> + + <param> + <name>Minimum Length</name> + <key>min_len</key> + <value>200</value> + <type>int</type> + <hide>part</hide> + </param> + <!-- from min_len <hide>#if $widget().split('_')[0] in ("slider", "counter") then 'part' else 'all'#</hide>--> + + <param> + <name>GUI Hint</name> + <key>gui_hint</key> + <value></value> + <type>gui_hint</type> + <hide>part</hide> + </param> + + <check>$start <= $value <= $stop</check> + <check>$start < $stop</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 start and the stop. + + The GUI hint can be used to position the widget within the application. \ + The hint is of the form [tab_id@tab_index]: [row, col, row_span, col_span]. \ + Both the tab specification and the grid position are optional. + </doc> +</block> |