summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-qtgui/grc/qtgui_chooser.xml2
-rw-r--r--gr-qtgui/grc/qtgui_entry.xml17
-rw-r--r--gr-qtgui/grc/qtgui_label.xml15
-rw-r--r--gr-qtgui/grc/qtgui_slider.xml2
4 files changed, 19 insertions, 17 deletions
diff --git a/gr-qtgui/grc/qtgui_chooser.xml b/gr-qtgui/grc/qtgui_chooser.xml
index 0d95c7cda..d06a229b4 100644
--- a/gr-qtgui/grc/qtgui_chooser.xml
+++ b/gr-qtgui/grc/qtgui_chooser.xml
@@ -53,7 +53,7 @@ self._$(id)_labels = map(str, self._$(id)_options)
#if $widget() == 'combo_box'
#set $win = 'self._%s_tool_bar'%$id
$win = Qt.QToolBar(self)
-$(win).addWidget(Qt.QLabel($label+" ", None))
+$(win).addWidget(Qt.QLabel($label+": ", None))
self._$(id)_combo_box = Qt.QComboBox(None)
$(win).addWidget(self._$(id)_combo_box)
for label in self._$(id)_labels: self._$(id)_combo_box.addItem(label)
diff --git a/gr-qtgui/grc/qtgui_entry.xml b/gr-qtgui/grc/qtgui_entry.xml
index 63c14ad8f..32c879420 100644
--- a/gr-qtgui/grc/qtgui_entry.xml
+++ b/gr-qtgui/grc/qtgui_entry.xml
@@ -10,20 +10,21 @@
<key>variable_qtgui_entry</key>
<category>QT GUI Widgets</category>
<import>from PyQt4 import Qt</import>
+ <import>from gnuradio import eng_notation</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))
+$(win).addWidget(Qt.QLabel($label+": ", None))
self._$(id)_line_edit = Qt.QLineEdit(str(self.$id))
self._$(id)_tool_bar.addWidget(self._$(id)_line_edit)
self._$(id)_line_edit.returnPressed.connect(
- lambda: self.set_$(id)($(type.conv)(self._$(id)_line_edit.text())))
+ lambda: self.set_$(id)($(type.conv)(self._$(id)_line_edit.text().toAscii())))
$(gui_hint()($win))</make>
<callback>self.set_$(id)($value)</callback>
- <callback>self._$(id)_line_edit.setText(str($id))</callback>
+ <callback>self._$(id)_line_edit.setText($(type.str)($id))</callback>
<param>
<name>Label</name>
<key>label</key>
@@ -37,11 +38,11 @@ $(gui_hint()($win))</make>
<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>
+ <option><name>Float</name><key>real</key><opt>conv:eng_notation.str_to_num</opt><opt>str:eng_notation.num_to_str</opt></option>
+ <option><name>Integer</name><key>int</key><opt>conv:int</opt><opt>str:str</opt></option>
+ <option><name>String</name><key>string</key><opt>conv:str</opt><opt>str:str</opt></option>
+ <option><name>Boolean</name><key>bool</key><opt>conv:bool</opt><opt>str:str</opt></option>
+ <option><name>Any</name><key>raw</key><opt>conv:eval</opt><opt>str:repr</opt></option>
</param>
<param>
<name>Default Value</name>
diff --git a/gr-qtgui/grc/qtgui_label.xml b/gr-qtgui/grc/qtgui_label.xml
index 90286d0b2..96354688e 100644
--- a/gr-qtgui/grc/qtgui_label.xml
+++ b/gr-qtgui/grc/qtgui_label.xml
@@ -10,18 +10,19 @@
<key>variable_qtgui_label</key>
<category>QT GUI Widgets</category>
<import>from PyQt4 import Qt</import>
+ <import>from gnuradio import eng_notation</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))
+$(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>
+ <callback>self._$(id)_label.setText($(type.str)($id))</callback>
<param>
<name>Label</name>
<key>label</key>
@@ -35,11 +36,11 @@ $(gui_hint()($win))</make>
<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>
+ <option><name>Float</name><key>real</key><opt>conv:eng_notation.str_to_num</opt><opt>str:eng_notation.num_to_str</opt></option>
+ <option><name>Integer</name><key>int</key><opt>conv:int</opt><opt>str:str</opt></option>
+ <option><name>String</name><key>string</key><opt>conv:str</opt><opt>str:str</opt></option>
+ <option><name>Boolean</name><key>bool</key><opt>conv:bool</opt><opt>str:str</opt></option>
+ <option><name>Any</name><key>raw</key><opt>conv:eval</opt><opt>str:repr</opt></option>
</param>
<param>
<name>Default Value</name>
diff --git a/gr-qtgui/grc/qtgui_slider.xml b/gr-qtgui/grc/qtgui_slider.xml
index e29123878..e71382b12 100644
--- a/gr-qtgui/grc/qtgui_slider.xml
+++ b/gr-qtgui/grc/qtgui_slider.xml
@@ -19,7 +19,7 @@ $(win).addWidget(self._$(id)_tool_bar)
#if not $label()
#set $label = '"%s"'%$id
#end if
-self._$(id)_tool_bar.addWidget(Qt.QLabel($label, None))
+self._$(id)_tool_bar.addWidget(Qt.QLabel($label+": ", None))
self._$(id)_counter = Qwt.QwtCounter(None)
self._$(id)_counter.setRange($start, $stop, $step)
self._$(id)_counter.setNumButtons(2)