commit-gnuradio
[Top][All Lists]
Advanced

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

[Commit-gnuradio] [gnuradio] 21/37: qtgui: updates number sink behavor.


From: git
Subject: [Commit-gnuradio] [gnuradio] 21/37: qtgui: updates number sink behavor.
Date: Thu, 17 Jul 2014 20:23:42 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit 4a003bb6329cbe63debe8fbfca91747e6e1225f1
Author: Tom Rondeau <address@hidden>
Date:   Sat Jul 12 09:49:57 2014 -0400

    qtgui: updates number sink behavor.
    
    Adds ability to add a title, set the units of teh number, add and set the 
scaling factor.
    
    Addresses Issue #690.
---
 gr-digital/examples/demod/test_corr_and_sync.grc   | 528 +++++++++++++++------
 gr-qtgui/grc/qtgui_number_sink.xml                 | 158 ++++++
 gr-qtgui/include/gnuradio/qtgui/form_menus.h       |  64 +++
 gr-qtgui/include/gnuradio/qtgui/number_sink.h      |   6 +
 .../include/gnuradio/qtgui/numberdisplayform.h     |  11 +
 gr-qtgui/lib/number_sink_impl.cc                   |  38 +-
 gr-qtgui/lib/number_sink_impl.h                    |   6 +
 gr-qtgui/lib/numberdisplayform.cc                  | 106 ++++-
 8 files changed, 742 insertions(+), 175 deletions(-)

diff --git a/gr-digital/examples/demod/test_corr_and_sync.grc 
b/gr-digital/examples/demod/test_corr_and_sync.grc
index 71dca83..91e09dd 100644
--- a/gr-digital/examples/demod/test_corr_and_sync.grc
+++ b/gr-digital/examples/demod/test_corr_and_sync.grc
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='ASCII'?>
 <flow_graph>
-  <timestamp>Thu Apr 24 14:08:23 2014</timestamp>
+  <timestamp>Fri Jul 11 16:54:10 2014</timestamp>
   <block>
     <key>options</key>
     <param>
@@ -52,6 +52,10 @@
       <value></value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(10, 10)</value>
     </param>
@@ -64,7 +68,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>rrc_taps</value>
+      <value>samp_rate</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -72,11 +76,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(sps), eb, 
5*sps*nfilts)</value>
+      <value>100000</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1075, 73)</value>
+      <value>(11, 72)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -87,7 +95,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>nfilts</value>
+      <value>eb</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -95,11 +103,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>32</value>
+      <value>0.35</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1074, 9)</value>
+      <value>(346, 72)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -110,7 +122,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>payload_size</value>
+      <value>matched_filter</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -118,11 +130,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>992</value>
+      <value>firdes.root_raised_cosine(nfilts, nfilts, 1, eb, 
int(11*sps*nfilts))</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(101, 73)</value>
+      <value>(429, 72)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -133,7 +149,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>gap</value>
+      <value>preamble</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -141,11 +157,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>20000</value>
+      
<value>[1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1]</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(202, 72)</value>
+      <value>(279, 8)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -156,7 +176,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>bb_filter</value>
+      <value>sps</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -164,11 +184,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>firdes.root_raised_cosine(sps, sps, 1, eb, 101)</value>
+      <value>4</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(429, 8)</value>
+      <value>(278, 72)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -179,7 +203,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>sps</value>
+      <value>bb_filter</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -187,11 +211,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>4</value>
+      <value>firdes.root_raised_cosine(sps, sps, 1, eb, 101)</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(278, 72)</value>
+      <value>(429, 8)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -202,7 +230,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>preamble</value>
+      <value>gap</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -210,11 +238,15 @@
     </param>
     <param>
       <key>value</key>
-      
<value>[1,-1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,1,1,-1,1,-1,-1,1,-1,-1,1,1,1,-1,-1,-1,1,-1,1,1,1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,-1,-1,-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,1,-1,-1]</value>
+      <value>20000</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(279, 8)</value>
+      <value>(202, 72)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -225,7 +257,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>matched_filter</value>
+      <value>payload_size</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -233,11 +265,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>firdes.root_raised_cosine(nfilts, nfilts, 1, eb, 
int(11*sps*nfilts))</value>
+      <value>992</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(429, 72)</value>
+      <value>(101, 73)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -248,7 +284,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>eb</value>
+      <value>nfilts</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -256,11 +292,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>0.35</value>
+      <value>32</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(346, 72)</value>
+      <value>(1074, 9)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -271,7 +311,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>samp_rate</value>
+      <value>rrc_taps</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -279,11 +319,15 @@
     </param>
     <param>
       <key>value</key>
-      <value>100000</value>
+      <value>firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(sps), eb, 
5*sps*nfilts)</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(11, 72)</value>
+      <value>(1075, 73)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -305,6 +349,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -340,6 +388,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -383,6 +435,10 @@
       <value>sps</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -438,6 +494,10 @@
       <value>False</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -485,6 +545,10 @@
       <value>True</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -536,6 +600,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -591,6 +659,10 @@
       <value>False</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -638,6 +710,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -685,6 +761,10 @@
       <value>[[0,],]</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -720,6 +800,10 @@
       <value>import scipy</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(181, 16)</value>
     </param>
@@ -775,6 +859,10 @@
       <value>3,1,1,1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(692, 7)</value>
     </param>
@@ -830,6 +918,10 @@
       <value>4,0,1,1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(808, 7)</value>
     </param>
@@ -885,6 +977,10 @@
       <value>4,1,1,1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(950, 8)</value>
     </param>
@@ -940,6 +1036,10 @@
       <value>3,0,1,1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(584, 7)</value>
     </param>
@@ -991,6 +1091,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1042,6 +1146,10 @@
       <value>True</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1077,6 +1185,10 @@
       <value>8</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1124,6 +1236,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1155,10 +1271,6 @@
       <value>True</value>
     </param>
     <param>
-      <key>value</key>
-      <value>"ok"</value>
-    </param>
-    <param>
       <key>sym_map</key>
       <value>[0,1]</value>
     </param>
@@ -1183,6 +1295,10 @@
       <value>None</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(1237, 27)</value>
     </param>
@@ -1214,6 +1330,10 @@
       <value>2</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1281,6 +1401,10 @@
       <value>5,0,1,2</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>_coordinate</key>
       <value>(875, 571)</value>
     </param>
@@ -1308,6 +1432,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1343,6 +1471,10 @@
       <value>8</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1390,6 +1522,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1437,6 +1573,10 @@
       <value>[[0,],]</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1484,6 +1624,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1523,6 +1667,10 @@
       <value>1</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1562,6 +1710,14 @@
       <value></value>
     </param>
     <param>
+      <key>ylabel</key>
+      <value>Amplitude</value>
+    </param>
+    <param>
+      <key>yunit</key>
+      <value>""</value>
+    </param>
+    <param>
       <key>size</key>
       <value>20000</value>
     </param>
@@ -1570,6 +1726,10 @@
       <value>samp_rate</value>
     </param>
     <param>
+      <key>grid</key>
+      <value>False</value>
+    </param>
+    <param>
       <key>autoscale</key>
       <value>False</value>
     </param>
@@ -1862,6 +2022,10 @@
       <value>1.0</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1889,6 +2053,10 @@
       <value>constel</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -1928,6 +2096,14 @@
       <value></value>
     </param>
     <param>
+      <key>ylabel</key>
+      <value>Amplitude</value>
+    </param>
+    <param>
+      <key>yunit</key>
+      <value>""</value>
+    </param>
+    <param>
       <key>size</key>
       <value>80000</value>
     </param>
@@ -1936,6 +2112,10 @@
       <value>samp_rate</value>
     </param>
     <param>
+      <key>grid</key>
+      <value>False</value>
+    </param>
+    <param>
       <key>autoscale</key>
       <value>False</value>
     </param>
@@ -2228,6 +2408,10 @@
       <value>1.0</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
       <value></value>
     </param>
@@ -2241,10 +2425,53 @@
     </param>
   </block>
   <block>
-    <key>qtgui_time_sink_x</key>
+    <key>digital_costas_loop_cc</key>
     <param>
       <key>id</key>
-      <value>qtgui_time_sink_x_0</value>
+      <value>digital_costas_loop_cc_0</value>
+    </param>
+    <param>
+      <key>_enabled</key>
+      <value>True</value>
+    </param>
+    <param>
+      <key>w</key>
+      <value>1*3.14/50.0</value>
+    </param>
+    <param>
+      <key>order</key>
+      <value>2</value>
+    </param>
+    <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
+      <key>affinity</key>
+      <value></value>
+    </param>
+    <param>
+      <key>minoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>maxoutbuf</key>
+      <value>0</value>
+    </param>
+    <param>
+      <key>_coordinate</key>
+      <value>(1091, 303)</value>
+    </param>
+    <param>
+      <key>_rotation</key>
+      <value>0</value>
+    </param>
+  </block>
+  <block>
+    <key>qtgui_const_sink_x</key>
+    <param>
+      <key>id</key>
+      <value>qtgui_const_sink_x_0</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -2260,11 +2487,11 @@
     </param>
     <param>
       <key>size</key>
-      <value>50000</value>
+      <value>1000</value>
     </param>
     <param>
-      <key>srate</key>
-      <value>samp_rate</value>
+      <key>grid</key>
+      <value>False</value>
     </param>
     <param>
       <key>autoscale</key>
@@ -2279,6 +2506,14 @@
       <value>2</value>
     </param>
     <param>
+      <key>xmin</key>
+      <value>-2</value>
+    </param>
+    <param>
+      <key>xmax</key>
+      <value>2</value>
+    </param>
+    <param>
       <key>nconnections</key>
       <value>1</value>
     </param>
@@ -2287,12 +2522,8 @@
       <value>0.10</value>
     </param>
     <param>
-      <key>entags</key>
-      <value>True</value>
-    </param>
-    <param>
       <key>gui_hint</key>
-      <value>0,0,1,1</value>
+      <value>0,1,1,1</value>
     </param>
     <param>
       <key>tr_mode</key>
@@ -2304,11 +2535,7 @@
     </param>
     <param>
       <key>tr_level</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>tr_delay</key>
-      <value>0.1</value>
+      <value>0</value>
     </param>
     <param>
       <key>tr_chan</key>
@@ -2332,11 +2559,11 @@
     </param>
     <param>
       <key>style1</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker1</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha1</key>
@@ -2356,11 +2583,11 @@
     </param>
     <param>
       <key>style2</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker2</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha2</key>
@@ -2376,15 +2603,15 @@
     </param>
     <param>
       <key>color3</key>
-      <value>"green"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style3</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker3</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha3</key>
@@ -2400,15 +2627,15 @@
     </param>
     <param>
       <key>color4</key>
-      <value>"black"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style4</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker4</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha4</key>
@@ -2424,15 +2651,15 @@
     </param>
     <param>
       <key>color5</key>
-      <value>"cyan"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style5</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker5</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha5</key>
@@ -2448,15 +2675,15 @@
     </param>
     <param>
       <key>color6</key>
-      <value>"magenta"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style6</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker6</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha6</key>
@@ -2472,15 +2699,15 @@
     </param>
     <param>
       <key>color7</key>
-      <value>"yellow"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style7</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker7</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha7</key>
@@ -2496,15 +2723,15 @@
     </param>
     <param>
       <key>color8</key>
-      <value>"dark red"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style8</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker8</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha8</key>
@@ -2520,15 +2747,15 @@
     </param>
     <param>
       <key>color9</key>
-      <value>"dark green"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style9</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker9</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha9</key>
@@ -2544,27 +2771,31 @@
     </param>
     <param>
       <key>color10</key>
-      <value>"blue"</value>
+      <value>"red"</value>
     </param>
     <param>
       <key>style10</key>
-      <value>1</value>
+      <value>0</value>
     </param>
     <param>
       <key>marker10</key>
-      <value>-1</value>
+      <value>0</value>
     </param>
     <param>
       <key>alpha10</key>
       <value>1.0</value>
     </param>
     <param>
+      <key>alias</key>
+      <value></value>
+    </param>
+    <param>
       <key>affinity</key>
-      <value>0</value>
+      <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1398, 370)</value>
+      <value>(1399, 283)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -2572,65 +2803,42 @@
     </param>
   </block>
   <block>
-    <key>digital_costas_loop_cc</key>
+    <key>qtgui_time_sink_x</key>
     <param>
       <key>id</key>
-      <value>digital_costas_loop_cc_0</value>
+      <value>qtgui_time_sink_x_0</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>w</key>
-      <value>1*3.14/50.0</value>
-    </param>
-    <param>
-      <key>order</key>
-      <value>2</value>
+      <key>type</key>
+      <value>complex</value>
     </param>
     <param>
-      <key>affinity</key>
+      <key>name</key>
       <value></value>
     </param>
     <param>
-      <key>minoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>maxoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(1091, 303)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>qtgui_const_sink_x</key>
-    <param>
-      <key>id</key>
-      <value>qtgui_const_sink_x_0</value>
+      <key>ylabel</key>
+      <value>Amplitude</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>yunit</key>
+      <value>""</value>
     </param>
     <param>
-      <key>type</key>
-      <value>complex</value>
+      <key>size</key>
+      <value>50000</value>
     </param>
     <param>
-      <key>name</key>
-      <value></value>
+      <key>srate</key>
+      <value>samp_rate</value>
     </param>
     <param>
-      <key>size</key>
-      <value>1000</value>
+      <key>grid</key>
+      <value>False</value>
     </param>
     <param>
       <key>autoscale</key>
@@ -2645,14 +2853,6 @@
       <value>2</value>
     </param>
     <param>
-      <key>xmin</key>
-      <value>-2</value>
-    </param>
-    <param>
-      <key>xmax</key>
-      <value>2</value>
-    </param>
-    <param>
       <key>nconnections</key>
       <value>1</value>
     </param>
@@ -2661,8 +2861,12 @@
       <value>0.10</value>
     </param>
     <param>
+      <key>entags</key>
+      <value>True</value>
+    </param>
+    <param>
       <key>gui_hint</key>
-      <value>0,1,1,1</value>
+      <value>0,0,1,1</value>
     </param>
     <param>
       <key>tr_mode</key>
@@ -2674,7 +2878,11 @@
     </param>
     <param>
       <key>tr_level</key>
-      <value>0</value>
+      <value>1</value>
+    </param>
+    <param>
+      <key>tr_delay</key>
+      <value>0.1</value>
     </param>
     <param>
       <key>tr_chan</key>
@@ -2698,11 +2906,11 @@
     </param>
     <param>
       <key>style1</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker1</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha1</key>
@@ -2722,11 +2930,11 @@
     </param>
     <param>
       <key>style2</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker2</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha2</key>
@@ -2742,15 +2950,15 @@
     </param>
     <param>
       <key>color3</key>
-      <value>"red"</value>
+      <value>"green"</value>
     </param>
     <param>
       <key>style3</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker3</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha3</key>
@@ -2766,15 +2974,15 @@
     </param>
     <param>
       <key>color4</key>
-      <value>"red"</value>
+      <value>"black"</value>
     </param>
     <param>
       <key>style4</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker4</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha4</key>
@@ -2790,15 +2998,15 @@
     </param>
     <param>
       <key>color5</key>
-      <value>"red"</value>
+      <value>"cyan"</value>
     </param>
     <param>
       <key>style5</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker5</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha5</key>
@@ -2814,15 +3022,15 @@
     </param>
     <param>
       <key>color6</key>
-      <value>"red"</value>
+      <value>"magenta"</value>
     </param>
     <param>
       <key>style6</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker6</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha6</key>
@@ -2838,15 +3046,15 @@
     </param>
     <param>
       <key>color7</key>
-      <value>"red"</value>
+      <value>"yellow"</value>
     </param>
     <param>
       <key>style7</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker7</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha7</key>
@@ -2862,15 +3070,15 @@
     </param>
     <param>
       <key>color8</key>
-      <value>"red"</value>
+      <value>"dark red"</value>
     </param>
     <param>
       <key>style8</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker8</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha8</key>
@@ -2886,15 +3094,15 @@
     </param>
     <param>
       <key>color9</key>
-      <value>"red"</value>
+      <value>"dark green"</value>
     </param>
     <param>
       <key>style9</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker9</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha9</key>
@@ -2910,27 +3118,31 @@
     </param>
     <param>
       <key>color10</key>
-      <value>"red"</value>
+      <value>"blue"</value>
     </param>
     <param>
       <key>style10</key>
-      <value>0</value>
+      <value>1</value>
     </param>
     <param>
       <key>marker10</key>
-      <value>0</value>
+      <value>-1</value>
     </param>
     <param>
       <key>alpha10</key>
       <value>1.0</value>
     </param>
     <param>
-      <key>affinity</key>
+      <key>alias</key>
       <value></value>
     </param>
     <param>
+      <key>affinity</key>
+      <value>0</value>
+    </param>
+    <param>
       <key>_coordinate</key>
-      <value>(1399, 283)</value>
+      <value>(1398, 370)</value>
     </param>
     <param>
       <key>_rotation</key>
diff --git a/gr-qtgui/grc/qtgui_number_sink.xml 
b/gr-qtgui/grc/qtgui_number_sink.xml
index af74bca..e7b232e 100644
--- a/gr-qtgui/grc/qtgui_number_sink.xml
+++ b/gr-qtgui/grc/qtgui_number_sink.xml
@@ -18,11 +18,16 @@ qtgui.number_sink(
        $nconnections
 )
 self.$(id).set_update_time($update_time)
+self.$(id).set_title($name)
 
 labels = [$label1, $label2, $label3, $label4, $label5,
           $label6, $label7, $label8, $label9, $label10]
+units = [$unit1, $unit2, $unit3, $unit4, $unit5,
+          $unit6, $unit7, $unit8, $unit9, $unit10]
 colors = [$color1, $color2, $color3, $color4, $color5,
           $color6, $color7, $color8, $color9, $color10]
+factor = [$factor1, $factor2, $factor3, $factor4, $factor5,
+          $factor6, $factor7, $factor8, $factor9, $factor10]
 for i in xrange($nconnections):
     self.$(id).set_min(i, $min)
     self.$(id).set_max(i, $max)
@@ -31,6 +36,8 @@ for i in xrange($nconnections):
         self.$(id).set_label(i, "Data {0}".format(i))
     else:
         self.$(id).set_label(i, labels[i])
+    self.$(id).set_unit(i, units[i])
+    self.$(id).set_factor(i, factor[i])
 
 self.$(id).enable_autoscale($autoscale)
 self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget)
@@ -43,6 +50,14 @@ $(gui_hint()($win))</make>
   </param_tab_order>
 
   <param>
+    <name>Name</name>
+    <key>name</key>
+    <value>""</value>
+    <type>string</type>
+    <hide>#if len($name()) > 0 then 'none' else 'part'#</hide>
+  </param>
+
+  <param>
     <name>Input Type</name>
     <key>type</key>
     <type>enum</type>
@@ -162,6 +177,14 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <name>Line 1 Unit</name>
+    <key>unit1</key>
+    <type>string</type>
+    <hide>#if int($nconnections()) >= 1 then 'part' else 'all'#</hide>
+    <tab>Config</tab>
+  </param>
+
+  <param>
     <name>Line 1 Color</name>
     <key>color1</key>
     <type>enum</type>
@@ -189,6 +212,15 @@ $(gui_hint()($win))</make>
     <tab>Config</tab>
   </param>
 
+  <param>
+    <name>Line 1 Factor</name>
+    <key>factor1</key>
+    <value>1</value>
+    <type>float</type>
+    <hide>#if int($nconnections()) >= 1 then 'part' else 'all'#</hide>
+    <tab>Config</tab>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -198,12 +230,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 2 Unit</name>
+    <key>unit2</key>
+    <hide>#if int($nconnections()) >= 2 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 2 Color</name>
     <key>color2</key>
     <hide>#if int($nconnections()) >= 2 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 2 Factor</name>
+    <key>factor2</key>
+    <hide>#if int($nconnections()) >= 2 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -213,12 +259,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 3 Unit</name>
+    <key>unit3</key>
+    <hide>#if int($nconnections()) >= 3 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 3 Color</name>
     <key>color3</key>
     <hide>#if int($nconnections()) >= 3 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 3 Factor</name>
+    <key>factor3</key>
+    <hide>#if int($nconnections()) >= 3 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -228,12 +288,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 4 Unit</name>
+    <key>unit4</key>
+    <hide>#if int($nconnections()) >= 4 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 4 Color</name>
     <key>color4</key>
     <hide>#if int($nconnections()) >= 4 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 4 Factor</name>
+    <key>factor4</key>
+    <hide>#if int($nconnections()) >= 4 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -243,12 +317,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 5 Unit</name>
+    <key>unit5</key>
+    <hide>#if int($nconnections()) >= 5 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 5 Color</name>
     <key>color5</key>
     <hide>#if int($nconnections()) >= 5 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 5 Factor</name>
+    <key>factor5</key>
+    <hide>#if int($nconnections()) >= 5 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -258,12 +346,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 6 Unit</name>
+    <key>unit6</key>
+    <hide>#if int($nconnections()) >= 6 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 6 Color</name>
     <key>color6</key>
     <hide>#if int($nconnections()) >= 6 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 6 Factor</name>
+    <key>factor6</key>
+    <hide>#if int($nconnections()) >= 6 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -273,12 +375,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 7 Unit</name>
+    <key>unit7</key>
+    <hide>#if int($nconnections()) >= 7 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 7 Color</name>
     <key>color7</key>
     <hide>#if int($nconnections()) >= 7 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 7 Factor</name>
+    <key>factor7</key>
+    <hide>#if int($nconnections()) >= 7 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -288,12 +404,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 8 Unit</name>
+    <key>unit8</key>
+    <hide>#if int($nconnections()) >= 8 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 8 Color</name>
     <key>color8</key>
     <hide>#if int($nconnections()) >= 8 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 8 Factor</name>
+    <key>factor8</key>
+    <hide>#if int($nconnections()) >= 8 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -303,12 +433,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 9 Unit</name>
+    <key>unit9</key>
+    <hide>#if int($nconnections()) >= 9 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 9 Color</name>
     <key>color9</key>
     <hide>#if int($nconnections()) >= 9 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 9 Factor</name>
+    <key>factor9</key>
+    <hide>#if int($nconnections()) >= 9 then 'part' else 'all'#</hide>
+  </param>
+
 
   <param>
     <base_key>label1</base_key>
@@ -318,12 +462,26 @@ $(gui_hint()($win))</make>
   </param>
 
   <param>
+    <base_key>unit1</base_key>
+    <name>Line 10 Unit</name>
+    <key>unit10</key>
+    <hide>#if int($nconnections()) >= 10 then 'part' else 'all'#</hide>
+  </param>
+
+  <param>
     <base_key>color1</base_key>
     <name>Line 10 Color</name>
     <key>color10</key>
     <hide>#if int($nconnections()) >= 10 then 'part' else 'all'#</hide>
   </param>
 
+  <param>
+    <base_key>factor1</base_key>
+    <name>Line 10 Factor</name>
+    <key>factor10</key>
+    <hide>#if int($nconnections()) >= 10 then 'part' else 'all'#</hide>
+  </param>
+
 
   <sink>
     <name>in</name>
diff --git a/gr-qtgui/include/gnuradio/qtgui/form_menus.h 
b/gr-qtgui/include/gnuradio/qtgui/form_menus.h
index d22577e..7783406 100644
--- a/gr-qtgui/include/gnuradio/qtgui/form_menus.h
+++ b/gr-qtgui/include/gnuradio/qtgui/form_menus.h
@@ -1542,4 +1542,68 @@ private:
 /********************************************************************/
 
 
+class ItemFloatAct: public QAction
+{
+  Q_OBJECT
+
+public:
+  ItemFloatAct(int which, QString title, QWidget *parent)
+    : QAction(title, parent), d_which(which)
+  {
+    d_diag = new QDialog(parent);
+    d_diag->setWindowTitle(title);
+    d_diag->setModal(true);
+
+    d_text = new QLineEdit();
+
+    QGridLayout *layout = new QGridLayout(d_diag);
+    QPushButton *btn_ok = new QPushButton(tr("OK"));
+    QPushButton *btn_cancel = new QPushButton(tr("Cancel"));
+
+    layout->addWidget(d_text, 0, 0, 1, 2);
+    layout->addWidget(btn_ok, 1, 0);
+    layout->addWidget(btn_cancel, 1, 1);
+
+    connect(btn_ok, SIGNAL(clicked()), this, SLOT(getText()));
+    connect(btn_cancel, SIGNAL(clicked()), d_diag, SLOT(close()));
+
+    connect(this, SIGNAL(triggered()), this, SLOT(getTextDiag()));
+  }
+
+  ~ItemFloatAct()
+  {}
+
+  void setText(float f)
+  {
+    d_text->setText(QString("%1").arg(f));
+  }
+
+
+signals:
+  void whichTrigger(int which, float data);
+
+public slots:
+  void getTextDiag()
+  {
+    d_diag->show();
+  }
+
+private slots:
+  void getText()
+  {
+    emit whichTrigger(d_which, d_text->text().toFloat());
+    d_diag->accept();
+  }
+
+private:
+  int d_which;
+  QDialog *d_diag;
+  QLineEdit *d_text;
+};
+
+
+
+/********************************************************************/
+
+
 #endif /* FORM_MENUS_H */
diff --git a/gr-qtgui/include/gnuradio/qtgui/number_sink.h 
b/gr-qtgui/include/gnuradio/qtgui/number_sink.h
index a34eab3..c814100 100644
--- a/gr-qtgui/include/gnuradio/qtgui/number_sink.h
+++ b/gr-qtgui/include/gnuradio/qtgui/number_sink.h
@@ -85,6 +85,9 @@ namespace gr {
       virtual void set_label(int which, const std::string &label) = 0;
       virtual void set_min(int which, float min) = 0;
       virtual void set_max(int which, float max) = 0;
+      virtual void set_title(const std::string &title) = 0;
+      virtual void set_unit(int which, const std::string &unit) = 0;
+      virtual void set_factor(int which, float factor) = 0;
 
       virtual float average() const = 0;
       virtual graph_t graph_type() const = 0;
@@ -93,6 +96,9 @@ namespace gr {
       virtual std::string label(int which) const = 0;
       virtual float min(int which) const = 0;
       virtual float max(int which) const = 0;
+      virtual std::string title() const = 0;
+      virtual std::string unit(int which) const = 0;
+      virtual float factor(int which) const = 0;
 
       virtual void enable_menu(bool en=true) = 0;
       virtual void enable_autoscale(bool en=true) = 0;
diff --git a/gr-qtgui/include/gnuradio/qtgui/numberdisplayform.h 
b/gr-qtgui/include/gnuradio/qtgui/numberdisplayform.h
index c33f9b4..6f90766 100644
--- a/gr-qtgui/include/gnuradio/qtgui/numberdisplayform.h
+++ b/gr-qtgui/include/gnuradio/qtgui/numberdisplayform.h
@@ -51,6 +51,9 @@ class NumberDisplayForm : public QWidget
   float updateTime() const;
   int scaleMin(int which);
   int scaleMax(int which);
+  std::string title() const;
+  std::string unit(int which) const;
+  float factor(int which) const;
 
 public slots:
   void mousePressEvent(QMouseEvent * e);
@@ -71,6 +74,9 @@ public slots:
   void setScaleMin(int which, int min);
   void setScaleMax(int which, int max);
   void autoScale(bool on);
+  void setTitle(const std::string &title);
+  void setUnit(int which, const std::string &unit);
+  void setFactor(int which, float factor);
 
 private slots:
   void newData(const QEvent*);
@@ -93,6 +99,7 @@ private:
   QAction *d_stop_act;
   QList<QMenu*> d_label_menu;
   std::vector<LineTitleAction*> d_label_act;
+  std::vector<ItemFloatAct*> d_factor_act;
   FFTAverageMenu *d_avg_menu;
   NumberLayoutMenu *d_layout_menu;
   std::vector<NumberColorMapMenu*> d_color_menu;
@@ -100,6 +107,10 @@ private:
   QAction *d_autoscale_act;
   PopupMenu *d_update_time_menu;
   QAction *d_save_act;
+
+  QLabel *d_title;
+  std::vector<std::string> d_unit;
+  std::vector<float> d_factor;
 };
 
 #endif /* NUMBER_DISPLAY_FORM_H */
diff --git a/gr-qtgui/lib/number_sink_impl.cc b/gr-qtgui/lib/number_sink_impl.cc
index abfb872..e5966ac 100644
--- a/gr-qtgui/lib/number_sink_impl.cc
+++ b/gr-qtgui/lib/number_sink_impl.cc
@@ -196,7 +196,25 @@ namespace gr {
     void
     number_sink_impl::set_max(int which, float max)
     {
-      return d_main_gui->setScaleMax(which, max);
+      d_main_gui->setScaleMax(which, max);
+    }
+
+    void
+    number_sink_impl::set_title(const std::string &title)
+    {
+      d_main_gui->setTitle(title);
+    }
+
+    void
+    number_sink_impl::set_unit(int which, const std::string &unit)
+    {
+      d_main_gui->setUnit(which, unit);
+    }
+
+    void
+    number_sink_impl::set_factor(int which, float factor)
+    {
+      d_main_gui->setFactor(which, factor);
     }
 
     float
@@ -241,6 +259,24 @@ namespace gr {
       return d_main_gui->scaleMax(which);
     }
 
+    std::string
+    number_sink_impl::title() const
+    {
+      return d_main_gui->title();
+    }
+
+    std::string
+    number_sink_impl::unit(int which) const
+    {
+      return d_main_gui->unit(which);
+    }
+
+    float
+    number_sink_impl::factor(int which) const
+    {
+      return d_main_gui->factor(which);
+    }
+
     void
     number_sink_impl::enable_menu(bool en)
     {
diff --git a/gr-qtgui/lib/number_sink_impl.h b/gr-qtgui/lib/number_sink_impl.h
index 0f4fd48..7c8a084 100644
--- a/gr-qtgui/lib/number_sink_impl.h
+++ b/gr-qtgui/lib/number_sink_impl.h
@@ -92,6 +92,9 @@ namespace gr {
       void set_label(int which, const std::string &label);
       void set_min(int which, float min);
       void set_max(int which, float max);
+      void set_title(const std::string &title);
+      void set_unit(int which, const std::string &unit);
+      void set_factor(int which, float factor);
 
       float average() const;
       graph_t graph_type() const;
@@ -100,6 +103,9 @@ namespace gr {
       std::string label(int which) const;
       float min(int which) const;
       float max(int which) const;
+      std::string title() const;
+      std::string unit(int which) const;
+      float factor(int which) const;
 
       void enable_menu(bool en);
       void enable_autoscale(bool en=true);
diff --git a/gr-qtgui/lib/numberdisplayform.cc 
b/gr-qtgui/lib/numberdisplayform.cc
index b2b3fe4..0fb30cd 100644
--- a/gr-qtgui/lib/numberdisplayform.cc
+++ b/gr-qtgui/lib/numberdisplayform.cc
@@ -32,11 +32,15 @@ NumberDisplayForm::NumberDisplayForm(int nplots, 
gr::qtgui::graph_t type,
   : QWidget(parent)
 {
   d_nplots = nplots;
+  d_graph_type = type;
+  d_title = new QLabel(QString(""));
   d_layout = new QGridLayout(this);
   for(int i = 0; i < d_nplots; i++) {
     d_min.push_back(+1e32);
     d_max.push_back(-1e32);
     d_label.push_back(new QLabel(QString("Data %1").arg(i)));
+    d_unit.push_back("");
+    d_factor.push_back(1);
     d_text_box.push_back(new QLabel(QString("0")));
 
     d_indicator.push_back(new QwtThermo());
@@ -105,6 +109,11 @@ NumberDisplayForm::NumberDisplayForm(int nplots, 
gr::qtgui::graph_t type,
             this, SLOT(setColor(int, const QColor&, const QColor&)));
     d_label_menu[i]->addMenu(d_color_menu[i]);
 
+    d_factor_act.push_back(new ItemFloatAct(i, "Factor", this));
+    connect(d_factor_act[i], SIGNAL(whichTrigger(int, float)),
+            this, SLOT(setFactor(int, float)));
+    d_label_menu[i]->addAction(d_factor_act[i]);
+
     d_menu->addMenu(d_label_menu[i]);
   }
 
@@ -230,10 +239,12 @@ NumberDisplayForm::newData(const QEvent* updateEvent)
     const std::vector<float> samples = tevent->getSamples();
 
     for(int i = 0; i < d_nplots; i++) {
-      d_text_box[i]->setText(QString("%1").arg(samples[i], 4, ' '));
-      d_indicator[i]->setValue(samples[i]);
-      d_min[i] = std::min(d_min[i], samples[i]);
-      d_max[i] = std::max(d_max[i], samples[i]);
+      float f = d_factor[i]*samples[i];
+      d_text_box[i]->setText(QString("%1 %2").arg(f, 4, ' ').\
+                             arg(QString(d_unit[i].c_str())));
+      d_indicator[i]->setValue(f);
+      d_min[i] = std::min(d_min[i], f);
+      d_max[i] = std::max(d_max[i], f);
 
       if(d_autoscale_state) {
         d_indicator[i]->setScale(d_min[i], d_max[i]);
@@ -254,12 +265,23 @@ NumberDisplayForm::customEvent(QEvent * e)
 void
 NumberDisplayForm::setGraphType(const gr::qtgui::graph_t type)
 {
+  int off = 0;
+
+  // Remove all widgets from the layout
+  QLayoutItem *item;
+  while((item = d_layout->takeAt(0)) != NULL) {
+    d_layout->removeItem(item);
+  }
+
+  // If we have a title, add it at the 0,0 grid point (top left)
+  // set off = 1 to offset the rest of the widgets
+  if(d_title->text().length() > 0) {
+    d_layout->addWidget(d_title, 0, 0);
+    off = 1;
+  }
+
   d_graph_type = type;
   for(int i = 0; i < d_nplots; i++) {
-    d_layout->removeWidget(d_indicator[i]);
-    d_layout->removeWidget(d_label[i]);
-    d_layout->removeWidget(d_text_box[i]);
-
     switch(d_graph_type) {
     case(gr::qtgui::NUM_GRAPH_HORIZ):
 #if QWT_VERSION < 0x060100
@@ -268,9 +290,9 @@ NumberDisplayForm::setGraphType(const gr::qtgui::graph_t 
type)
       d_indicator[i]->setOrientation(Qt::Horizontal);
 #endif /* if QWT_VERSION < 0x060100 */
       d_indicator[i]->setVisible(true);
-      d_layout->addWidget(d_label[i], 2*i, 0);
-      d_layout->addWidget(d_text_box[i], 2*i, 1);
-      d_layout->addWidget(d_indicator[i], 2*i+1, 1);
+      d_layout->addWidget(d_label[i], 2*i+off, 0);
+      d_layout->addWidget(d_text_box[i], 2*i+off, 1);
+      d_layout->addWidget(d_indicator[i], 2*i+1+off, 1);
       break;
     case(gr::qtgui::NUM_GRAPH_VERT):
 #if QWT_VERSION < 0x060100
@@ -279,15 +301,15 @@ NumberDisplayForm::setGraphType(const gr::qtgui::graph_t 
type)
       d_indicator[i]->setOrientation(Qt::Vertical);
 #endif /* if QWT_VERSION < 0x060100 */
       d_indicator[i]->setVisible(true);
-      d_layout->addWidget(d_label[i], 0, i);
-      d_layout->addWidget(d_text_box[i], 1, i);
-      d_layout->addWidget(d_indicator[i], 2, i);
+      d_layout->addWidget(d_label[i], 0+off, i);
+      d_layout->addWidget(d_text_box[i], 1+off, i);
+      d_layout->addWidget(d_indicator[i], 2+off, i);
       break;
     case(gr::qtgui::NUM_GRAPH_NONE):
     default:
       d_indicator[i]->setVisible(false);
-      d_layout->addWidget(d_label[i], 0, i);
-      d_layout->addWidget(d_text_box[i], 1, i);
+      d_layout->addWidget(d_label[i], 0+off, i);
+      d_layout->addWidget(d_text_box[i], 1+off, i);
       break;
     }
   }
@@ -439,3 +461,55 @@ NumberDisplayForm::autoScale(bool on)
     d_max.push_back(-1e32);
   }
 }
+
+std::string
+NumberDisplayForm::title() const
+{
+  return d_title->text().toStdString();
+}
+
+void
+NumberDisplayForm::setTitle(const std::string &title)
+{
+  std::string t = title;
+  if(t.length() > 0)
+    t = "<b><FONT SIZE=4>" + title + "</b>";
+  d_title->setText(QString(t.c_str()));
+  setGraphType(d_graph_type);
+}
+
+std::string
+NumberDisplayForm::unit(int which) const
+{
+  if(static_cast<size_t>(which) >= d_unit.size())
+    throw std::runtime_error("NumberDisplayForm::units: invalid 'which'.\n");
+
+  return d_unit[which];
+}
+
+void
+NumberDisplayForm::setUnit(int which, const std::string &unit)
+{
+  if(static_cast<size_t>(which) >= d_unit.size())
+    throw std::runtime_error("NumberDisplayForm::setUnits: invalid 
'which'.\n");
+
+  d_unit[which] = unit;
+}
+
+float
+NumberDisplayForm::factor(int which) const
+{
+  if(static_cast<size_t>(which) >= d_factor.size())
+    throw std::runtime_error("NumberDisplayForm::factor: invalid 'which'.\n");
+
+  return d_factor[which];
+}
+
+void
+NumberDisplayForm::setFactor(int which, float factor)
+{
+  if(static_cast<size_t>(which) >= d_factor.size())
+    throw std::runtime_error("NumberDisplayForm::setFactor: invalid 
'which'.\n");
+
+  d_factor[which] = factor;
+}



reply via email to

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