summaryrefslogtreecommitdiff
path: root/gr-wxgui
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-02-27 23:18:11 -0800
committerJosh Blum <josh@joshknows.com>2011-03-01 17:02:06 -0800
commit47f621a14c9a6e3696155dd5a223da40bcb7721c (patch)
tree03ff5e5875416340e3dcef010f176f9872b365d2 /gr-wxgui
parentf0537a7da4571bd6aaab273a0588eaef04121648 (diff)
grc: work on generator for gui flowgraphs to simplify generation
generator does not differentiate between notebooks and controls, they are all block, but block are now sorted by variables present in the make also adjusted categories listed in the wx and qt widget related blocks
Diffstat (limited to 'gr-wxgui')
-rw-r--r--gr-wxgui/grc/Makefile.am1
-rw-r--r--gr-wxgui/grc/notebook.xml70
-rw-r--r--gr-wxgui/grc/variable_check_box.xml2
-rw-r--r--gr-wxgui/grc/variable_chooser.xml2
-rw-r--r--gr-wxgui/grc/variable_slider.xml2
-rw-r--r--gr-wxgui/grc/variable_static_text.xml2
-rw-r--r--gr-wxgui/grc/variable_text_box.xml2
-rw-r--r--gr-wxgui/grc/wxgui_constellationsink2.xml1
-rw-r--r--gr-wxgui/grc/wxgui_fftsink2.xml1
-rw-r--r--gr-wxgui/grc/wxgui_histosink2.xml1
-rw-r--r--gr-wxgui/grc/wxgui_numbersink2.xml1
-rw-r--r--gr-wxgui/grc/wxgui_scopesink2.xml1
-rw-r--r--gr-wxgui/grc/wxgui_termsink.xml1
-rw-r--r--gr-wxgui/grc/wxgui_waterfallsink2.xml1
14 files changed, 83 insertions, 5 deletions
diff --git a/gr-wxgui/grc/Makefile.am b/gr-wxgui/grc/Makefile.am
index 26217077ac..d8c7b3471c 100644
--- a/gr-wxgui/grc/Makefile.am
+++ b/gr-wxgui/grc/Makefile.am
@@ -23,6 +23,7 @@ include $(top_srcdir)/Makefile.common
grcblocksdir = $(grc_blocksdir)
dist_grcblocks_DATA = \
+ notebook.xml \
variable_check_box.xml \
variable_chooser.xml \
variable_slider.xml \
diff --git a/gr-wxgui/grc/notebook.xml b/gr-wxgui/grc/notebook.xml
new file mode 100644
index 0000000000..bb3de51cb3
--- /dev/null
+++ b/gr-wxgui/grc/notebook.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##WX GUI Notebook
+###################################################
+ -->
+<block>
+ <name>WX GUI Notebook</name>
+ <key>notebook</key>
+ <category>WX GUI Widgets</category>
+ <import>from grc_gnuradio import wxgui as grc_wxgui</import>
+ <make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
+self.$(id) = wx.Notebook($(parent).GetWin(), style=$style)
+#for $label in $labels()
+self.$(id).AddPage(grc_wxgui.Panel(self.$(id)), "$label")
+#end for
+#if not $grid_pos()
+$(parent).Add(self.$(id))
+#else
+$(parent).GridAdd(self.$(id), $(', '.join(map(str, $grid_pos()))))
+#end if</make>
+ <param>
+ <name>Tab Orientation</name>
+ <key>style</key>
+ <value>wx.NB_TOP</value>
+ <type>enum</type>
+ <option>
+ <name>Top</name>
+ <key>wx.NB_TOP</key>
+ </option>
+ <option>
+ <name>Right</name>
+ <key>wx.NB_RIGHT</key>
+ </option>
+ <option>
+ <name>Bottom</name>
+ <key>wx.NB_BOTTOM</key>
+ </option>
+ <option>
+ <name>Left</name>
+ <key>wx.NB_LEFT</key>
+ </option>
+ </param>
+ <param>
+ <name>Labels</name>
+ <key>labels</key>
+ <value>['tab1', 'tab2', 'tab3']</value>
+ <type>raw</type>
+ </param>
+ <param>
+ <name>Grid Position</name>
+ <key>grid_pos</key>
+ <value></value>
+ <type>grid_pos</type>
+ </param>
+ <param>
+ <name>Notebook</name>
+ <key>notebook</key>
+ <value></value>
+ <type>notebook</type>
+ </param>
+ <check>isinstance($labels, (list, tuple))</check>
+ <check>all(map(lambda x: isinstance(x, str), $labels))</check>
+ <check>len($labels) &gt; 0</check>
+ <doc>
+Use the Grid Position (row, column, row span, column span) to position the graphical element in the window.
+
+Use the Notebook Param (notebook-id, page-index) to place the graphical element inside of a notebook page.
+ </doc>
+</block>
diff --git a/gr-wxgui/grc/variable_check_box.xml b/gr-wxgui/grc/variable_check_box.xml
index d1e4d990cf..0c7bd10815 100644
--- a/gr-wxgui/grc/variable_check_box.xml
+++ b/gr-wxgui/grc/variable_check_box.xml
@@ -8,7 +8,7 @@
<block>
<name>WX GUI Check Box</name>
<key>variable_check_box</key>
- <category>Variables</category>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import forms</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
diff --git a/gr-wxgui/grc/variable_chooser.xml b/gr-wxgui/grc/variable_chooser.xml
index 99bf4389c0..e16e88c5da 100644
--- a/gr-wxgui/grc/variable_chooser.xml
+++ b/gr-wxgui/grc/variable_chooser.xml
@@ -9,7 +9,7 @@
<block>
<name>WX GUI Chooser</name>
<key>variable_chooser</key>
- <category>Variables</category>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import forms</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
diff --git a/gr-wxgui/grc/variable_slider.xml b/gr-wxgui/grc/variable_slider.xml
index 09aa4d3d7a..5e3c175aa4 100644
--- a/gr-wxgui/grc/variable_slider.xml
+++ b/gr-wxgui/grc/variable_slider.xml
@@ -8,7 +8,7 @@
<block>
<name>WX GUI Slider</name>
<key>variable_slider</key>
- <category>Variables</category>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import forms</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
diff --git a/gr-wxgui/grc/variable_static_text.xml b/gr-wxgui/grc/variable_static_text.xml
index d7bb30eea7..cd122e76a1 100644
--- a/gr-wxgui/grc/variable_static_text.xml
+++ b/gr-wxgui/grc/variable_static_text.xml
@@ -8,7 +8,7 @@
<block>
<name>WX GUI Static Text</name>
<key>variable_static_text</key>
- <category>Variables</category>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import forms</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
diff --git a/gr-wxgui/grc/variable_text_box.xml b/gr-wxgui/grc/variable_text_box.xml
index c5416aee7a..afff839cfd 100644
--- a/gr-wxgui/grc/variable_text_box.xml
+++ b/gr-wxgui/grc/variable_text_box.xml
@@ -8,7 +8,7 @@
<block>
<name>WX GUI Text Box</name>
<key>variable_text_box</key>
- <category>Variables</category>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import forms</import>
<var_make>self.$(id) = $(id) = $value</var_make>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
diff --git a/gr-wxgui/grc/wxgui_constellationsink2.xml b/gr-wxgui/grc/wxgui_constellationsink2.xml
index 881c6eba34..c200790f9d 100644
--- a/gr-wxgui/grc/wxgui_constellationsink2.xml
+++ b/gr-wxgui/grc/wxgui_constellationsink2.xml
@@ -7,6 +7,7 @@
<block>
<name>WX GUI Constellation Sink</name>
<key>wxgui_constellationsink2</key>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import constsink_gl</import>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
constsink_gl.const_sink_c(
diff --git a/gr-wxgui/grc/wxgui_fftsink2.xml b/gr-wxgui/grc/wxgui_fftsink2.xml
index b06220d1e0..9b35ab848f 100644
--- a/gr-wxgui/grc/wxgui_fftsink2.xml
+++ b/gr-wxgui/grc/wxgui_fftsink2.xml
@@ -7,6 +7,7 @@
<block>
<name>WX GUI FFT Sink</name>
<key>wxgui_fftsink2</key>
+ <category>WX GUI Widgets</category>
<import>from gnuradio import window</import>
<import>from gnuradio.wxgui import fftsink2</import>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
diff --git a/gr-wxgui/grc/wxgui_histosink2.xml b/gr-wxgui/grc/wxgui_histosink2.xml
index 2f475fe2ec..f4f6a29597 100644
--- a/gr-wxgui/grc/wxgui_histosink2.xml
+++ b/gr-wxgui/grc/wxgui_histosink2.xml
@@ -7,6 +7,7 @@
<block>
<name>WX GUI Histo Sink</name>
<key>wxgui_histosink2</key>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import histosink_gl</import>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
histosink_gl.histo_sink_f(
diff --git a/gr-wxgui/grc/wxgui_numbersink2.xml b/gr-wxgui/grc/wxgui_numbersink2.xml
index b3b4cb2542..2559266101 100644
--- a/gr-wxgui/grc/wxgui_numbersink2.xml
+++ b/gr-wxgui/grc/wxgui_numbersink2.xml
@@ -7,6 +7,7 @@
<block>
<name>WX GUI Number Sink</name>
<key>wxgui_numbersink2</key>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import numbersink2</import>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
numbersink2.$(type.fcn)(
diff --git a/gr-wxgui/grc/wxgui_scopesink2.xml b/gr-wxgui/grc/wxgui_scopesink2.xml
index 43922f45ec..dbf983e112 100644
--- a/gr-wxgui/grc/wxgui_scopesink2.xml
+++ b/gr-wxgui/grc/wxgui_scopesink2.xml
@@ -7,6 +7,7 @@
<block>
<name>WX GUI Scope Sink</name>
<key>wxgui_scopesink2</key>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import scopesink2</import>
<import>from gnuradio import gr</import>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'
diff --git a/gr-wxgui/grc/wxgui_termsink.xml b/gr-wxgui/grc/wxgui_termsink.xml
index ae15b98a65..3e35c75788 100644
--- a/gr-wxgui/grc/wxgui_termsink.xml
+++ b/gr-wxgui/grc/wxgui_termsink.xml
@@ -7,6 +7,7 @@
<block>
<name>WX GUI Terminal Sink</name>
<key>wxgui_termsink</key>
+ <category>WX GUI Widgets</category>
<import>from gnuradio.wxgui import termsink</import>
diff --git a/gr-wxgui/grc/wxgui_waterfallsink2.xml b/gr-wxgui/grc/wxgui_waterfallsink2.xml
index 9789994be6..7c646c3b2f 100644
--- a/gr-wxgui/grc/wxgui_waterfallsink2.xml
+++ b/gr-wxgui/grc/wxgui_waterfallsink2.xml
@@ -7,6 +7,7 @@
<block>
<name>WX GUI Waterfall Sink</name>
<key>wxgui_waterfallsink2</key>
+ <category>WX GUI Widgets</category>
<import>from gnuradio import window</import>
<import>from gnuradio.wxgui import waterfallsink2</import>
<make>#set $parent = $notebook() and 'self.%s.GetPage(%s)'%$notebook() or 'self'