diff options
author | Josh Blum | 2011-03-01 18:05:34 -0800 |
---|---|---|
committer | Josh Blum | 2011-03-01 18:05:34 -0800 |
commit | fb5d1b80dc97bf940079b5a4b3b3f35002cc60aa (patch) | |
tree | 63693bc410e7ff0d5e56cce37935603d340023e3 /gr-qtgui/grc/qtgui_label.xml | |
parent | a09e0096cf717c137126cd5fb721c0331a1a8df6 (diff) | |
download | gnuradio-fb5d1b80dc97bf940079b5a4b3b3f35002cc60aa.tar.gz gnuradio-fb5d1b80dc97bf940079b5a4b3b3f35002cc60aa.tar.bz2 gnuradio-fb5d1b80dc97bf940079b5a4b3b3f35002cc60aa.zip |
qtgui-grc: rename the text entry and label blocks
Diffstat (limited to 'gr-qtgui/grc/qtgui_label.xml')
-rw-r--r-- | gr-qtgui/grc/qtgui_label.xml | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml new file mode 100644 index 000000000..90286d0b2 --- /dev/null +++ b/gr-qtgui/grc/qtgui_label.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> +<!-- +################################################### +##Variable Label Text: +## a gui static text form +################################################### + --> +<block> + <name>QT GUI Label</name> + <key>variable_qtgui_label</key> + <category>QT GUI Widgets</category> + <import>from PyQt4 import Qt</import> + <var_make>self.$(id) = $(id) = $value</var_make> + <make>#set $win = 'self._%s_tool_bar'%$id +$win = Qt.QToolBar(self) +#if not $label() + #set $label = '"%s"'%$id +#end if +$(win).addWidget(Qt.QLabel($label+" ", None)) +self._$(id)_label = Qt.QLabel(str(self.$id)) +self._$(id)_tool_bar.addWidget(self._$(id)_label) +$(gui_hint()($win))</make> + <callback>self.set_$(id)($value)</callback> + <callback>self._$(id)_label.setText(str($id))</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>type</key> + <value>int</value> + <type>enum</type> + <hide>part</hide> + <option><name>Float</name><key>real</key><opt>conv:float</opt></option> + <option><name>Integer</name><key>int</key><opt>conv:int</opt></option> + <option><name>String</name><key>string</key><opt>conv:str</opt></option> + <option><name>Boolean</name><key>bool</key><opt>conv:bool</opt></option> + <option><name>Any</name><key>raw</key><opt>conv:eval</opt></option> + </param> + <param> + <name>Default Value</name> + <key>value</key> + <value>0</value> + <type>$type</type> + </param> + <param> + <name>GUI Hint</name> + <key>gui_hint</key> + <value></value> + <type>gui_hint</type> + <hide>part</hide> + </param> + <doc> +This block creates a variable with a label widget for text. \ +Leave the label blank to use the variable id as the label. + +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> |