summaryrefslogtreecommitdiff
path: root/gr-qtgui/grc/qtgui_sink_x.xml
diff options
context:
space:
mode:
authorJosh Blum2011-01-20 22:31:31 -0800
committerJosh Blum2011-03-01 17:02:06 -0800
commite30f0a7ca02801732ad7a25ab83e1d27dc45c6ce (patch)
tree4dce85c1bac97c380c243195ac8d05afa5afc7b2 /gr-qtgui/grc/qtgui_sink_x.xml
parenta284640decd1fd6634f35bd1e20fd69b9194a7b6 (diff)
downloadgnuradio-e30f0a7ca02801732ad7a25ab83e1d27dc45c6ce.tar.gz
gnuradio-e30f0a7ca02801732ad7a25ab83e1d27dc45c6ce.tar.bz2
gnuradio-e30f0a7ca02801732ad7a25ab83e1d27dc45c6ce.zip
grc: added tabbed widget in qtgui for grc
created gui_hint type to handle tab descriptor + position markup, and to handle the generation of the name of the parent widget. No support python modules required in gr-qtgui.
Diffstat (limited to 'gr-qtgui/grc/qtgui_sink_x.xml')
-rw-r--r--gr-qtgui/grc/qtgui_sink_x.xml18
1 files changed, 15 insertions, 3 deletions
diff --git a/gr-qtgui/grc/qtgui_sink_x.xml b/gr-qtgui/grc/qtgui_sink_x.xml
index 8182f8d94..6e5c9549b 100644
--- a/gr-qtgui/grc/qtgui_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_sink_x.xml
@@ -8,10 +8,12 @@
<name>QT GUI Sink</name>
<key>qtgui_sink_x</key>
<category>Graphical Sinks</category>
+ <import>from PyQt4 import Qt</import>
<import>from gnuradio.qtgui import qtgui</import>
<import>from gnuradio.gr import firdes</import>
<import>import sip</import>
- <make>qtgui.$(type.fcn)(
+ <make>#set $win = 'self._%s_win'%$id
+qtgui.$(type.fcn)(
$fftsize, \#fftsize
$wintype, \#wintype
$fc, \#fc
@@ -23,8 +25,8 @@
$plottime, \#plottime
$plotconst, \#plotconst
)
-self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), QtGui.QWidget)
-self.layout.addWidget(self._$(id)_win)</make>
+self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget)
+$(gui_hint()($win))</make>
<callback>set_frequency_range($fc, $bw)</callback>
<param>
<name>Type</name>
@@ -114,11 +116,21 @@ self.layout.addWidget(self._$(id)_win)</make>
<option><name>On</name><key>True</key></option>
<option><name>Off</name><key>False</key></option>
</param>
+ <param>
+ <name>GUI Hint</name>
+ <key>gui_hint</key>
+ <value></value>
+ <type>gui_hint</type>
+ <hide>part</hide>
+ </param>
<sink>
<name>in</name>
<type>$type</type>
<nports>$num_inputs</nports>
</sink>
<doc>
+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>