commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r9058 - in grc/trunk: examples/audio examples/simple e


From: jblum
Subject: [Commit-gnuradio] r9058 - in grc/trunk: examples/audio examples/simple examples/usrp examples/xmlrpc src/grc src/grc/elements src/grc/gui src/grc/gui/elements src/grc_gnuradio/blocks/operators src/grc_gnuradio/data src/grc_gnuradio/utils
Date: Wed, 30 Jul 2008 13:17:01 -0600 (MDT)

Author: jblum
Date: 2008-07-30 13:17:00 -0600 (Wed, 30 Jul 2008)
New Revision: 9058

Modified:
   grc/trunk/examples/audio/dial_tone.grc
   grc/trunk/examples/simple/ber_simulation.grc
   grc/trunk/examples/usrp/usrp_two_tone_loopback.grc
   grc/trunk/examples/usrp/usrp_wbfm_receive.grc
   grc/trunk/examples/xmlrpc/xmlrpc_client.grc
   grc/trunk/examples/xmlrpc/xmlrpc_server.grc
   grc/trunk/src/grc/converter.py
   grc/trunk/src/grc/elements/Block.py
   grc/trunk/src/grc/elements/Param.py
   grc/trunk/src/grc/gui/ParamsDialog.py
   grc/trunk/src/grc/gui/elements/Block.py
   grc/trunk/src/grc/gui/elements/Param.py
   grc/trunk/src/grc_gnuradio/blocks/operators/gr_fft_vxx.xml
   grc/trunk/src/grc_gnuradio/data/block.dtd
   grc/trunk/src/grc_gnuradio/data/default_flow_graph.grc.xml
   grc/trunk/src/grc_gnuradio/utils/extract_docs.py
Log:
added hide property, renamed gui_ to _

Modified: grc/trunk/examples/audio/dial_tone.grc
===================================================================
--- grc/trunk/examples/audio/dial_tone.grc      2008-07-30 18:05:23 UTC (rev 
9057)
+++ grc/trunk/examples/audio/dial_tone.grc      2008-07-30 19:17:00 UTC (rev 
9058)
@@ -36,11 +36,11 @@
       <value>Custom</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(10, 10)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -67,11 +67,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(513, 277)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -91,7 +91,7 @@
     </param>
     <param>
       <key>device_name</key>
-      <value></value>
+      <value/>
     </param>
     <param>
       <key>ok_to_block</key>
@@ -102,11 +102,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(699, 112)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -137,11 +137,11 @@
       <value>42</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(238, 380)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -180,11 +180,11 @@
       <value>0</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(240, 208)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -223,11 +223,11 @@
       <value>0</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(240, 38)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -270,11 +270,11 @@
       <value>0, 0, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(634, 413)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -317,11 +317,11 @@
       <value>1, 0, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(443, 412)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -340,11 +340,11 @@
       <value>32000</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(11, 171)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>

Modified: grc/trunk/examples/simple/ber_simulation.grc
===================================================================
--- grc/trunk/examples/simple/ber_simulation.grc        2008-07-30 18:05:23 UTC 
(rev 9057)
+++ grc/trunk/examples/simple/ber_simulation.grc        2008-07-30 19:17:00 UTC 
(rev 9058)
@@ -36,11 +36,11 @@
       <value>Custom</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(16, 10)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -67,11 +67,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(652, 395)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -106,11 +106,11 @@
       <value>2, 0, 1, 1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(907, 334)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -141,11 +141,11 @@
       <value>42</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(235, 379)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -176,11 +176,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(360, 237)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -255,11 +255,11 @@
       <value>1, 0, 1, 1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(1062, 11)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -286,11 +286,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(397, 27)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -317,11 +317,11 @@
       <value>int(math.log(len(const))/math.log(2))</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(670, 41)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -344,11 +344,11 @@
       <value>range(len(const))</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(708, 224)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -383,11 +383,11 @@
       <value>False</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(15, 244)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -406,11 +406,11 @@
       <value>.25</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(18, 386)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -429,11 +429,11 @@
       <value>1+1j, 1-1j, -1-1j, -1+1j</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(16, 461)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -452,11 +452,11 @@
       <value>50e3</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(20, 168)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -475,11 +475,11 @@
       <value>import math</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(138, 168)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>

Modified: grc/trunk/examples/usrp/usrp_two_tone_loopback.grc
===================================================================
--- grc/trunk/examples/usrp/usrp_two_tone_loopback.grc  2008-07-30 18:05:23 UTC 
(rev 9057)
+++ grc/trunk/examples/usrp/usrp_two_tone_loopback.grc  2008-07-30 19:17:00 UTC 
(rev 9058)
@@ -36,11 +36,11 @@
       <value>Custom</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(10, 10)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -91,11 +91,11 @@
       <value>None</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(578, 319)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -162,11 +162,11 @@
       <value>1, 2, 2, 4</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(845, 228)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -209,11 +209,11 @@
       <value>0, 4, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(397, 478)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -256,11 +256,11 @@
       <value>0, 2, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(220, 475)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -303,11 +303,11 @@
       <value>1, 1, 2, 1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(20, 243)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -350,11 +350,11 @@
       <value>1, 0, 2, 1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(21, 422)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -405,11 +405,11 @@
       <value>None</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(835, 5)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -424,11 +424,11 @@
       <value>True</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(634, 226)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -455,11 +455,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(528, 78)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -498,11 +498,11 @@
       <value>0</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(258, 20)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -541,11 +541,11 @@
       <value>0</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(255, 179)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -576,11 +576,11 @@
       <value>42</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(257, 337)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -599,11 +599,11 @@
       <value>64e6/200</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(9, 166)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -622,11 +622,11 @@
       <value>int(100e6)</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(116, 166)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>

Modified: grc/trunk/examples/usrp/usrp_wbfm_receive.grc
===================================================================
--- grc/trunk/examples/usrp/usrp_wbfm_receive.grc       2008-07-30 18:05:23 UTC 
(rev 9057)
+++ grc/trunk/examples/usrp/usrp_wbfm_receive.grc       2008-07-30 19:17:00 UTC 
(rev 9058)
@@ -36,11 +36,11 @@
       <value>Custom</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(10, 10)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -91,11 +91,11 @@
       <value>None</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(277, 29)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -138,11 +138,11 @@
       <value>0, 2, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(275, 246)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -165,11 +165,11 @@
       <value>10</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(510, 37)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -189,7 +189,7 @@
     </param>
     <param>
       <key>device_name</key>
-      <value></value>
+      <value/>
     </param>
     <param>
       <key>ok_to_block</key>
@@ -200,11 +200,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(703, 241)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>180</value>
     </param>
   </block>
@@ -231,11 +231,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(764, 55)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -302,11 +302,11 @@
       <value>2, 0, 2, 4</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(512, 191)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -349,11 +349,11 @@
       <value>1, 1, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(991, 40)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -396,11 +396,11 @@
       <value>0, 0, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(104, 243)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -419,11 +419,11 @@
       <value>200</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(14, 173)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>

Modified: grc/trunk/examples/xmlrpc/xmlrpc_client.grc
===================================================================
--- grc/trunk/examples/xmlrpc/xmlrpc_client.grc 2008-07-30 18:05:23 UTC (rev 
9057)
+++ grc/trunk/examples/xmlrpc/xmlrpc_client.grc 2008-07-30 19:17:00 UTC (rev 
9058)
@@ -36,11 +36,11 @@
       <value>Custom</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(10, 10)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -71,11 +71,11 @@
       <value>ampl</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(409, 35)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -106,11 +106,11 @@
       <value>freq</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(222, 34)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -153,11 +153,11 @@
       <value>0, 0, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(207, 162)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -200,11 +200,11 @@
       <value>1, 0, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(397, 167)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -243,11 +243,11 @@
       <value>2, 0, 1, 2</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(596, 177)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -278,11 +278,11 @@
       <value>offset*ampl</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(608, 39)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -301,11 +301,11 @@
       <value>32000</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(13, 172)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>

Modified: grc/trunk/examples/xmlrpc/xmlrpc_server.grc
===================================================================
--- grc/trunk/examples/xmlrpc/xmlrpc_server.grc 2008-07-30 18:05:23 UTC (rev 
9057)
+++ grc/trunk/examples/xmlrpc/xmlrpc_server.grc 2008-07-30 19:17:00 UTC (rev 
9058)
@@ -36,11 +36,11 @@
       <value>Custom</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(10, 10)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -79,11 +79,11 @@
       <value>offset</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(162, 200)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -102,11 +102,11 @@
       <value>0</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(12, 390)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -129,11 +129,11 @@
       <value>1234</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(395, 240)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -160,11 +160,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(386, 93)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -215,11 +215,11 @@
       <value>0, 0, 2, 4</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(623, 28)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -286,11 +286,11 @@
       <value>2, 0, 2, 4</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(630, 233)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -309,11 +309,11 @@
       <value>32000</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(11, 160)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -332,11 +332,11 @@
       <value>1000</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(11, 237)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>
@@ -355,11 +355,11 @@
       <value>1</value>
     </param>
     <param>
-      <key>gui_coordinate</key>
+      <key>_coordinate</key>
       <value>(13, 315)</value>
     </param>
     <param>
-      <key>gui_rotation</key>
+      <key>_rotation</key>
       <value>0</value>
     </param>
   </block>

Modified: grc/trunk/src/grc/converter.py
===================================================================
--- grc/trunk/src/grc/converter.py      2008-07-30 18:05:23 UTC (rev 9057)
+++ grc/trunk/src/grc/converter.py      2008-07-30 19:17:00 UTC (rev 9058)
@@ -23,6 +23,7 @@
 from grc.Constants import FLOW_GRAPH_DTD
 from grc import ParseXML, Utils
 from grc.Utils import odict
+from lxml import etree
 import difflib
 import os
 
@@ -45,8 +46,8 @@
        @param tag the tag name
        @retun a list of matching blocks
        """
-       return filter(lambda b: b['tag'] == tag, blocks) 
-       
+       return filter(lambda b: b['tag'] == tag, blocks)
+
 def _get_params(block):
        """!
        Get a list of params.
@@ -55,8 +56,8 @@
        """
        params = Utils.exists_or_else(block, 'params', {}) or {}
        params = Utils.listify(params, 'param')
-       return params 
-       
+       return params
+
 def _convert_id(id):
        """!
        Convert an old id to a new safe id.
@@ -77,14 +78,32 @@
        """
        try: #return if file passes validation
                ParseXML.validate_dtd(file_path, FLOW_GRAPH_DTD)
+               try:
+                       changed = False
+                       #convert instances of gui_coordinate and gui_rotation
+                       xml = etree.parse(file_path)
+                       for find, replace in (
+                               ('gui_coordinate', '_coordinate'),
+                               ('gui_rotation', '_rotation'),
+                       ):
+                               keys = 
xml.xpath('/flow_graph/block/param[key="%s"]/key'%find)
+                               for key in keys:
+                                       key.text = replace
+                                       changed = True
+                       if not changed: return
+                       #backup after successful conversion
+                       os.rename(file_path, file_path+'.bak')
+                       #save new flow graph to file path
+                       xml.write(file_path, xml_declaration=True, 
pretty_print=True)
+               except Exception, e: print e
                return
        except: pass #convert
        ############################################################
-       #       extract window size, variables, blocks, and connections
+       # extract window size, variables, blocks, and connections
        ############################################################
        old_n = ParseXML.from_file(file_path)['flow_graph']
        window_size = '%s, %s'%(
-               Utils.exists_or_else(old_n, 'window_width', '2048'), 
+               Utils.exists_or_else(old_n, 'window_width', '2048'),
                Utils.exists_or_else(old_n, 'window_height', '2048'),
        )
        variables = Utils.exists_or_else(old_n, 'vars', {}) or {}
@@ -98,7 +117,7 @@
        new_n['block'] = list()
        new_n['connection'] = list()
        ############################################################
-       #       conversion - options block
+       # conversion - options block
        ############################################################
        #get name
        about_blocks = _get_blocks(blocks, 'About')
@@ -119,22 +138,22 @@
                _make_param('title', title),
                _make_param('author', author),
                _make_param('description', desc),
-               _make_param('window_size', window_size),                
+               _make_param('window_size', window_size),
        ]
        #append options block
        new_n['block'].append(options_block)
        ############################################################
-       #       conversion - variables
+       # conversion - variables
        ############################################################
        wxgui_row, wxgui_col = 0, 0
        #arrange sliders in a row
-       for variable in variables: 
+       for variable in variables:
                key = variable['key']
                value = variable['value']
                min = Utils.exists_or_else(variable, 'min', '')
                max = Utils.exists_or_else(variable, 'max', '')
                step = Utils.exists_or_else(variable, 'step', '')
-               var_block = odict()     
+               var_block = odict()
                if min and max: #slider varible
                        #determine num steps
                        try: num_steps = str(int((float(max) - 
float(min))/float(step)))
@@ -146,20 +165,20 @@
                                _make_param('min', min),
                                _make_param('max', max),
                                _make_param('num_steps', num_steps),
-                               _make_param('grid_pos', '%d, %d, 1, 
2'%(wxgui_row, wxgui_col)), 
+                               _make_param('grid_pos', '%d, %d, 1, 
2'%(wxgui_row, wxgui_col)),
                        ]
                        wxgui_col = (wxgui_col + 2)%4
                        if wxgui_col == 0: wxgui_row = wxgui_row + 1
-               else: #regular variable         
+               else: #regular variable
                        var_block['key'] = 'variable'
                        var_block['param'] = [
                                _make_param('id', key),
-                               _make_param('value', value),    
+                               _make_param('value', value),
                        ]
                #append variable block
                new_n['block'].append(var_block)
        ############################################################
-       #       conversion - blocks
+       # conversion - blocks
        ############################################################
        wxgui_row = wxgui_row + 1
        wxgui_col = 0
@@ -172,10 +191,10 @@
                if tag in ('Note', 'About'): continue
                id = _convert_id(block['id'])
                coor = '(%s, %s)'%(
-                       Utils.exists_or_else(block, 'x_coordinate', '0'), 
+                       Utils.exists_or_else(block, 'x_coordinate', '0'),
                        Utils.exists_or_else(block, 'y_coordinate', '0'),
                )
-               rot = Utils.exists_or_else(block, 'rotation', '0')              
+               rot = Utils.exists_or_else(block, 'rotation', '0')
                params = _get_params(block)
                #new block
                new_block = odict()
@@ -187,7 +206,7 @@
                new_block['param'] = [
                        _make_param('id', id),
                        _make_param('gui_coordinate', coor),
-                       _make_param('gui_rotation', rot),       
+                       _make_param('gui_rotation', rot),
                ]
                #handle specific blocks
                if key == 'wxgui_fftsink2':
@@ -200,17 +219,17 @@
                for i, param in enumerate(params):
                        platform_block = platform.get_block(key)
                        try: platform_param = platform_block.get_params()[i+1]
-                       except IndexError: break 
+                       except IndexError: break
                        if platform_param.is_enum():
                                try: param_value = 
platform_param.get_option_keys()[int(param)]
                                except: param_value = 
platform_param.get_option_keys()[0]
                        else: param_value = param.replace('$', '')
-                       
new_block['param'].append(_make_param(platform_param.get_key(), param_value))   
        
+                       
new_block['param'].append(_make_param(platform_param.get_key(), param_value))
                #append block
                new_n['block'].append(new_block)
        ############################################################
-       #       conversion - connections
-       ############################################################    
+       # conversion - connections
+       ############################################################
        for connection in connections:
                #extract info
                input_signal_block_id = connection['input_signal_block_id']
@@ -226,11 +245,10 @@
                #append connection
                new_n['connection'].append(new_conn)
        ############################################################
-       #       backup and replace
+       # backup and replace
        ############################################################
-       #return #below not ready yet
        #backup after successful conversion
        os.rename(file_path, file_path+'.bak')
        #save new flow graph to file path
        ParseXML.to_file({'flow_graph': new_n}, file_path)
-       
+

Modified: grc/trunk/src/grc/elements/Block.py
===================================================================
--- grc/trunk/src/grc/elements/Block.py 2008-07-30 18:05:23 UTC (rev 9057)
+++ grc/trunk/src/grc/elements/Block.py 2008-07-30 19:17:00 UTC (rev 9058)
@@ -50,7 +50,6 @@
        def eval(self):
                return self._param.evaluate()
 
-
 class Block(Element):
 
        def __init__(self, flow_graph, n):
@@ -91,6 +90,7 @@
                                'key': '_enabled',
                                'type': 'raw',
                                'value': 'True',
+                               'hide': 'all',
                        }
                )
                for param in map(lambda n: 
self.get_parent().get_parent().Param(self, n), params):

Modified: grc/trunk/src/grc/elements/Param.py
===================================================================
--- grc/trunk/src/grc/elements/Param.py 2008-07-30 18:05:23 UTC (rev 9057)
+++ grc/trunk/src/grc/elements/Param.py 2008-07-30 19:17:00 UTC (rev 9058)
@@ -95,12 +95,14 @@
                key = n['key']
                value = Utils.exists_or_else(n, 'value', '')
                type = n['type']
+               hide = Utils.exists_or_else(n, 'hide', '')
                options = Utils.listify(n, 'option')
                #build the param
                Element.__init__(self, block)
                self._name = name
                self._key = key
                self._type = type
+               self._hide = hide
                #create the Option objects from the n data
                self._options = odict()
                for option in map(lambda o: Option.make_option_from_n(self, o), 
options):
@@ -173,6 +175,8 @@
 
        def get_key(self): return self._key
 
+       def get_hide(self): return 
self.get_parent().resolve_dependencies(self._hide)
+
        def get_value(self):
                value = self._value
                if self.is_enum() and value not in self.get_option_keys():

Modified: grc/trunk/src/grc/gui/ParamsDialog.py
===================================================================
--- grc/trunk/src/grc/gui/ParamsDialog.py       2008-07-30 18:05:23 UTC (rev 
9057)
+++ grc/trunk/src/grc/gui/ParamsDialog.py       2008-07-30 19:17:00 UTC (rev 
9058)
@@ -67,7 +67,7 @@
                err_box.pack_start(get_title_label('Error Messages'), False)
                err_box.pack_start(self._error_messages_text_display, False)
                #Add all the parameters
-               for param in filter(lambda p: not 
(p.get_key().startswith('gui_') or p.get_key().startswith('_')), 
self.block.get_params()):
+               for param in filter(lambda p: p.get_hide() != 'all', 
self.block.get_params()):
                        
vbox.pack_start(param.get_input_object(self._handle_changed), False)
                vbox.pack_start(err_box, False)
                #Done adding parameters

Modified: grc/trunk/src/grc/gui/elements/Block.py
===================================================================
--- grc/trunk/src/grc/gui/elements/Block.py     2008-07-30 18:05:23 UTC (rev 
9057)
+++ grc/trunk/src/grc/gui/elements/Block.py     2008-07-30 19:17:00 UTC (rev 
9058)
@@ -39,22 +39,24 @@
                Add graphics related params to the block.
                """
                #add the position param
-               self._params['gui_coordinate'] = 
self.get_parent().get_parent().Param(
+               self._params['_coordinate'] = 
self.get_parent().get_parent().Param(
                        self,
                        {
                                'name': 'GUI Coordinate',
-                               'key': 'gui_coordinate',
+                               'key': '_coordinate',
                                'type': 'raw',
                                'value': '(0, 0)',
+                               'hide': 'all',
                        }
                )
-               self._params['gui_rotation'] = 
self.get_parent().get_parent().Param(
+               self._params['_rotation'] = 
self.get_parent().get_parent().Param(
                        self,
                        {
                                'name': 'GUI Rotation',
-                               'key': 'gui_rotation',
+                               'key': '_rotation',
                                'type': 'raw',
                                'value': '0',
+                               'hide': 'all',
                        }
                )
                Element.__init__(self)
@@ -65,7 +67,7 @@
                @return the coordinate tuple (x, y) or (0, 0) if failure
                """
                try: #should evaluate to tuple
-                       coor = 
eval(self.get_param('gui_coordinate').get_value())
+                       coor = eval(self.get_param('_coordinate').get_value())
                        x, y = map(int, coor)
                        fgW,fgH = self.get_parent().get_size()
                        if x <= 0:
@@ -86,7 +88,7 @@
                Set the coordinate into the position param.
                @param coor the coordinate tuple (x, y)
                """
-               self.get_param('gui_coordinate').set_value(str(coor))
+               self.get_param('_coordinate').set_value(str(coor))
 
        def get_rotation(self):
                """!
@@ -94,7 +96,7 @@
                @return the rotation in degrees or 0 if failure
                """
                try: #should evaluate to dict
-                       rotation = 
eval(self.get_param('gui_rotation').get_value())
+                       rotation = eval(self.get_param('_rotation').get_value())
                        return int(rotation)
                except:
                        self.set_rotation(POSSIBLE_ROTATIONS[0])
@@ -105,7 +107,7 @@
                Set the rotation into the position param.
                @param rot the rotation in degrees
                """
-               self.get_param('gui_rotation').set_value(str(rot))
+               self.get_param('_rotation').set_value(str(rot))
 
        def update(self):
                """Update the block, parameters, and ports when a change 
occurs."""
@@ -132,7 +134,7 @@
                self.label_width, self.label_height = layout.get_pixel_size()
                #display the params (except for the special params id and 
position)
                if Preferences.show_params():
-                       for param in filter(lambda p: not 
(p.get_key().startswith('gui_') or p.get_key().startswith('_')), 
self.get_params()):
+                       for param in filter(lambda p: p.get_hide() not in 
('all', 'part'), self.get_params()):
                                if not Preferences.show_id() and 
param.get_key() == 'id': continue
                                layout = param.get_layout()
                                layouts.append(layout)

Modified: grc/trunk/src/grc/gui/elements/Param.py
===================================================================
--- grc/trunk/src/grc/gui/elements/Param.py     2008-07-30 18:05:23 UTC (rev 
9057)
+++ grc/trunk/src/grc/gui/elements/Param.py     2008-07-30 19:17:00 UTC (rev 
9058)
@@ -31,7 +31,7 @@
 from os import path
 
 
######################################################################################################
-#      gtk objects for handling input
+# gtk objects for handling input
 
######################################################################################################
 
 class InputParam(gtk.HBox):
@@ -112,7 +112,7 @@
                self.get_text = lambda: str(input.get_active()) #the get text 
parses the selected index to a string
 
 
######################################################################################################
-#      A Flow Graph Parameter
+# A Flow Graph Parameter
 
######################################################################################################
 
 class Param(Element):
@@ -172,7 +172,7 @@
                @return pango markup string
                """
                
###########################################################################
-               #       display logic for numbers
+               # display logic for numbers
                
###########################################################################
                def float_to_str(var):
                        if var-int(var) == 0: return '%d'%int(var)
@@ -183,9 +183,9 @@
                def to_str(var):
                        if isinstance(var, str): return var
                        elif isinstance(var, complex):
-                               if var.imag == var.real == 0: return '0'        
#value is zero
-                               elif var.imag == 0: return 
'%s'%float_to_str(var.real)  #value is real
-                               elif var.real == 0: return 
'%sj'%float_to_str(var.imag) #value is imaginary
+                               if var.imag == var.real == 0: return '0' #value 
is zero
+                               elif var.imag == 0: return 
'%s'%float_to_str(var.real) #value is real
+                               elif var.real == 0: return 
'%sj'%float_to_str(var.imag) #value is imaginary
                                elif var.imag < 0: return 
'%s-%sj'%(float_to_str(var.real), float_to_str(var.imag*-1))
                                else: return '%s+%sj'%(float_to_str(var.real), 
float_to_str(var.imag))
                        elif isinstance(var, float): return float_to_str(var)

Modified: grc/trunk/src/grc_gnuradio/blocks/operators/gr_fft_vxx.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/blocks/operators/gr_fft_vxx.xml  2008-07-30 
18:05:23 UTC (rev 9057)
+++ grc/trunk/src/grc_gnuradio/blocks/operators/gr_fft_vxx.xml  2008-07-30 
19:17:00 UTC (rev 9058)
@@ -18,13 +18,16 @@
                <name>Input Type</name>
                <key>type</key>
                <type>enum</type>
+               <hide>part</hide>
                <option>
                        <name>Complex</name>
                        <key>complex</key>
+                       <opt>hide_shift:</opt>
                </option>
                <option>
                        <name>Float</name>
                        <key>float</key>
+                       <opt>hide_shift:all</opt>
                </option>
        </param>
        <param>
@@ -56,6 +59,7 @@
                <name>Shift</name>
                <key>shift</key>
                <type>enum</type>
+               <hide>$type.hide_shift</hide>
                <option>
                        <name>Yes</name>
                        <key>True</key>
@@ -75,7 +79,4 @@
                <type>complex</type>
                <vlen>$fft_size</vlen>
        </source>
-       <doc>
-The shift option only applies when using complex input.
-       </doc>
 </block>

Modified: grc/trunk/src/grc_gnuradio/data/block.dtd
===================================================================
--- grc/trunk/src/grc_gnuradio/data/block.dtd   2008-07-30 18:05:23 UTC (rev 
9057)
+++ grc/trunk/src/grc_gnuradio/data/block.dtd   2008-07-30 19:17:00 UTC (rev 
9058)
@@ -29,7 +29,7 @@
 <!--
        Sub level elements.
  -->
-<!ELEMENT param (name, key, value?, type, option*)>
+<!ELEMENT param (name, key, value?, type, hide?, option*)>
 <!ELEMENT option (name, key, opt*)>
 <!ELEMENT sink (name, type, vlen?, nports?, optional?)>
 <!ELEMENT source (name, type, vlen?, nports?, optional?)>
@@ -45,6 +45,7 @@
 <!ELEMENT check (#PCDATA)>
 <!ELEMENT opt (#PCDATA)>
 <!ELEMENT type (#PCDATA)>
+<!ELEMENT hide (#PCDATA)>
 <!ELEMENT vlen (#PCDATA)>
 <!ELEMENT nports (#PCDATA)>
 <!ELEMENT make (#PCDATA)>

Modified: grc/trunk/src/grc_gnuradio/data/default_flow_graph.grc.xml
===================================================================
--- grc/trunk/src/grc_gnuradio/data/default_flow_graph.grc.xml  2008-07-30 
18:05:23 UTC (rev 9057)
+++ grc/trunk/src/grc_gnuradio/data/default_flow_graph.grc.xml  2008-07-30 
19:17:00 UTC (rev 9058)
@@ -13,11 +13,11 @@
                        <value>top_block</value>
                </param>
                <param>
-                       <key>gui_coordinate</key>
+                       <key>_coordinate</key>
                        <value>(10, 10)</value>
                </param>
                <param>
-                       <key>gui_rotation</key>
+                       <key>_rotation</key>
                        <value>0</value>
                </param>
        </block>
@@ -32,11 +32,11 @@
                        <value>32000</value>
                </param>
                <param>
-                       <key>gui_coordinate</key>
+                       <key>_coordinate</key>
                        <value>(10, 170)</value>
                </param>
                <param>
-                       <key>gui_rotation</key>
+                       <key>_rotation</key>
                        <value>0</value>
                </param>
        </block>

Modified: grc/trunk/src/grc_gnuradio/utils/extract_docs.py
===================================================================
--- grc/trunk/src/grc_gnuradio/utils/extract_docs.py    2008-07-30 18:05:23 UTC 
(rev 9057)
+++ grc/trunk/src/grc_gnuradio/utils/extract_docs.py    2008-07-30 19:17:00 UTC 
(rev 9058)
@@ -39,7 +39,7 @@
        text = xml.text or ''
        if not len(xml): return text
        return ''.join([text] + map(extract_txt, xml))
-       
+
 def is_match(key, file):
        """!
        Is the block key a match for the given file name?
@@ -60,7 +60,7 @@
                if len(ks) == 2 and f.startswith(ks[0]) and f.endswith(ks[1]): 
continue
                if len(ks) > 2 and all(ki in ('x', fi) for ki, fi in zip(k, 
f)): continue
                return False
-       return True     
+       return True
 
 def extract(key):
        """!
@@ -92,7 +92,7 @@
                                brief_desc = ''
                                detailed_desc = ''
                        #combine
-                       doc_strs.append('\n'.join([comp_name, brief_desc, 
detailed_desc]).strip('\n'))  
+                       doc_strs.append('\n'.join([comp_name, brief_desc, 
detailed_desc]).strip('\n'))
                except IndexError: pass #bad format
        return '\n\n'.join(doc_strs)
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]