[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 02/08: qtgui: toggle legend off in GRC prop
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 02/08: qtgui: toggle legend off in GRC properties. |
Date: |
Mon, 6 Apr 2015 06:03:45 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit b68ba8d358a19e91fc143f72772b17336a722f4b
Author: Tom Rondeau <address@hidden>
Date: Sat Apr 4 17:12:19 2015 -0400
qtgui: toggle legend off in GRC properties.
Supported in: time, ferq, waterfall, constellation, and historgram
plots
---
gr-qtgui/grc/qtgui_const_sink_x.xml | 21 +++++++++
gr-qtgui/grc/qtgui_histogram_sink_x.xml | 21 +++++++++
gr-qtgui/grc/qtgui_time_sink_x.xml | 55 +++++++++++++++-------
gr-qtgui/grc/qtgui_waterfall_sink_x.xml | 21 +++++++++
gr-qtgui/include/gnuradio/qtgui/const_sink_c.h | 1 +
gr-qtgui/include/gnuradio/qtgui/histogram_sink_f.h | 1 +
gr-qtgui/include/gnuradio/qtgui/time_sink_c.h | 1 +
gr-qtgui/include/gnuradio/qtgui/time_sink_f.h | 1 +
gr-qtgui/include/gnuradio/qtgui/waterfall_sink_c.h | 1 +
gr-qtgui/include/gnuradio/qtgui/waterfall_sink_f.h | 1 +
gr-qtgui/lib/const_sink_c_impl.cc | 6 +++
gr-qtgui/lib/const_sink_c_impl.h | 1 +
gr-qtgui/lib/histogram_sink_f_impl.cc | 6 +++
gr-qtgui/lib/histogram_sink_f_impl.h | 1 +
gr-qtgui/lib/time_sink_c_impl.cc | 6 +++
gr-qtgui/lib/time_sink_c_impl.h | 1 +
gr-qtgui/lib/time_sink_f_impl.cc | 6 +++
gr-qtgui/lib/time_sink_f_impl.h | 1 +
gr-qtgui/lib/waterfall_sink_c_impl.cc | 6 +++
gr-qtgui/lib/waterfall_sink_c_impl.h | 1 +
gr-qtgui/lib/waterfall_sink_f_impl.cc | 6 +++
gr-qtgui/lib/waterfall_sink_f_impl.h | 1 +
22 files changed, 150 insertions(+), 16 deletions(-)
diff --git a/gr-qtgui/grc/qtgui_const_sink_x.xml
b/gr-qtgui/grc/qtgui_const_sink_x.xml
index a6fb2af..a7e1ba1 100644
--- a/gr-qtgui/grc/qtgui_const_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_const_sink_x.xml
@@ -23,6 +23,9 @@ self.$(id).set_trigger_mode($tr_mode, $tr_slope, $tr_level,
$tr_chan, $tr_tag)
self.$(id).enable_autoscale($autoscale)
self.$(id).enable_grid($grid)
+if not $legend:
+ self.$(id).disable_legend()
+
labels = [$label1, $label2, $label3, $label4, $label5,
$label6, $label7, $label8, $label9, $label10]
widths = [$width1, $width2, $width3, $width4, $width5,
@@ -236,6 +239,24 @@ $(gui_hint()($win))</make>
+ <!-- Begin Config Tab items -->
+ <param>
+ <name>Legend</name>
+ <key>legend</key>
+ <value>True</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <tab>Config</tab>
+ </param>
+
<param>
<name>Line 1 Label</name>
<key>label1</key>
diff --git a/gr-qtgui/grc/qtgui_histogram_sink_x.xml
b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
index 7165fb8..ba04da1 100644
--- a/gr-qtgui/grc/qtgui_histogram_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_histogram_sink_x.xml
@@ -25,6 +25,9 @@ self.$(id).enable_autoscale($autoscale)
self.$(id).enable_accumulate($accum)
self.$(id).enable_grid($grid)
+if not $legend:
+ self.$(id).disable_legend()
+
labels = [$label1, $label2, $label3, $label4, $label5,
$label6, $label7, $label8, $label9, $label10]
widths = [$width1, $width2, $width3, $width4, $width5,
@@ -169,6 +172,24 @@ $(gui_hint()($win))
<hide>part</hide>
</param>
+ <!-- Begin Config Tab items -->
+ <param>
+ <name>Legend</name>
+ <key>legend</key>
+ <value>True</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <tab>Config</tab>
+ </param>
+
<param>
<name>Line 1 Label</name>
<key>label1</key>
diff --git a/gr-qtgui/grc/qtgui_time_sink_x.xml
b/gr-qtgui/grc/qtgui_time_sink_x.xml
index adcad50..9344ef4 100644
--- a/gr-qtgui/grc/qtgui_time_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_time_sink_x.xml
@@ -29,6 +29,9 @@ self.$(id).enable_autoscale($autoscale)
self.$(id).enable_grid($grid)
self.$(id).enable_control_panel($ctrlpanel)
+if not $legend:
+ self.$(id).disable_legend()
+
labels = [$label1, $label2, $label3, $label4, $label5,
$label6, $label7, $label8, $label9, $label10]
widths = [$width1, $width2, $width3, $width4, $width5,
@@ -194,22 +197,6 @@ $(gui_hint()($win))</make>
</param>
<param>
- <name>Control Panel</name>
- <key>ctrlpanel</key>
- <value>False</value>
- <type>enum</type>
- <hide>part</hide>
- <option>
- <name>Yes</name>
- <key>True</key>
- </option>
- <option>
- <name>No</name>
- <key>False</key>
- </option>
- </param>
-
- <param>
<name>Disp. Tags</name>
<key>entags</key>
<value>True</value>
@@ -314,6 +301,42 @@ $(gui_hint()($win))</make>
+ <!-- Begin Config Tab items -->
+
+ <param>
+ <name>Control Panel</name>
+ <key>ctrlpanel</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <tab>Config</tab>
+ </param>
+
+ <param>
+ <name>Legend</name>
+ <key>legend</key>
+ <value>True</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <tab>Config</tab>
+ </param>
+
<param>
<name>Line 1 Label</name>
<key>label1</key>
diff --git a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
index 3b6e37e..3857cb5 100644
--- a/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
+++ b/gr-qtgui/grc/qtgui_waterfall_sink_x.xml
@@ -23,6 +23,9 @@ qtgui.$(type.fcn)(
self.$(id).set_update_time($update_time)
self.$(id).enable_grid($grid)
+if not $legend:
+ self.$(id).disable_legend()
+
if $type == type(float()):
self.$(id).set_plot_pos_half(not $freqhalf)
@@ -217,6 +220,24 @@ $(gui_hint()($win))</make>
</param>
+ <!-- Begin Config Tab items -->
+ <param>
+ <name>Legend</name>
+ <key>legend</key>
+ <value>True</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <tab>Config</tab>
+ </param>
+
<param>
<name>Line 1 Label</name>
<key>label1</key>
diff --git a/gr-qtgui/include/gnuradio/qtgui/const_sink_c.h
b/gr-qtgui/include/gnuradio/qtgui/const_sink_c.h
index b942032..14f9319 100644
--- a/gr-qtgui/include/gnuradio/qtgui/const_sink_c.h
+++ b/gr-qtgui/include/gnuradio/qtgui/const_sink_c.h
@@ -133,6 +133,7 @@ namespace gr {
virtual void enable_menu(bool en=true) = 0;
virtual void enable_autoscale(bool en) = 0;
virtual void enable_grid(bool en) = 0;
+ virtual void disable_legend() = 0;
virtual int nsamps() const = 0;
virtual void reset() = 0;
diff --git a/gr-qtgui/include/gnuradio/qtgui/histogram_sink_f.h
b/gr-qtgui/include/gnuradio/qtgui/histogram_sink_f.h
index bedaf10..926b9ac 100644
--- a/gr-qtgui/include/gnuradio/qtgui/histogram_sink_f.h
+++ b/gr-qtgui/include/gnuradio/qtgui/histogram_sink_f.h
@@ -129,6 +129,7 @@ namespace gr {
virtual void set_line_alpha(int which, double alpha) = 0;
virtual void set_nsamps(const int newsize) = 0;
virtual void set_bins(const int bins) = 0;
+ virtual void disable_legend() = 0;
};
} /* namespace qtgui */
diff --git a/gr-qtgui/include/gnuradio/qtgui/time_sink_c.h
b/gr-qtgui/include/gnuradio/qtgui/time_sink_c.h
index 907fd3f..53e3d2a 100644
--- a/gr-qtgui/include/gnuradio/qtgui/time_sink_c.h
+++ b/gr-qtgui/include/gnuradio/qtgui/time_sink_c.h
@@ -159,6 +159,7 @@ namespace gr {
virtual void enable_semilogy(bool en=true) = 0;
virtual void enable_control_panel(bool en=true) = 0;
virtual void enable_tags(int which, bool en) = 0;
+ virtual void disable_legend() = 0;
virtual int nsamps() const = 0;
virtual void reset() = 0;
diff --git a/gr-qtgui/include/gnuradio/qtgui/time_sink_f.h
b/gr-qtgui/include/gnuradio/qtgui/time_sink_f.h
index f4bb415..a47261b 100644
--- a/gr-qtgui/include/gnuradio/qtgui/time_sink_f.h
+++ b/gr-qtgui/include/gnuradio/qtgui/time_sink_f.h
@@ -149,6 +149,7 @@ namespace gr {
virtual void enable_semilogy(bool en=true) = 0;
virtual void enable_control_panel(bool en=true) = 0;
virtual void enable_tags(int which, bool en) = 0;
+ virtual void disable_legend() = 0;
virtual int nsamps() const = 0;
virtual void reset() = 0;
diff --git a/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_c.h
b/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_c.h
index 9229682..aca4509 100644
--- a/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_c.h
+++ b/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_c.h
@@ -139,6 +139,7 @@ namespace gr {
virtual void enable_menu(bool en=true) = 0;
virtual void enable_grid(bool en=true) = 0;
+ virtual void disable_legend() = 0;
QApplication *d_qApplication;
};
diff --git a/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_f.h
b/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_f.h
index 0bbd7e0..13c7b98 100644
--- a/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_f.h
+++ b/gr-qtgui/include/gnuradio/qtgui/waterfall_sink_f.h
@@ -145,6 +145,7 @@ namespace gr {
virtual void enable_menu(bool en=true) = 0;
virtual void enable_grid(bool en=true) = 0;
+ virtual void disable_legend() = 0;
QApplication *d_qApplication;
};
diff --git a/gr-qtgui/lib/const_sink_c_impl.cc
b/gr-qtgui/lib/const_sink_c_impl.cc
index 10b342d..0711315 100644
--- a/gr-qtgui/lib/const_sink_c_impl.cc
+++ b/gr-qtgui/lib/const_sink_c_impl.cc
@@ -360,6 +360,12 @@ namespace gr {
}
void
+ const_sink_c_impl::disable_legend()
+ {
+ d_main_gui->disableLegend();
+ }
+
+ void
const_sink_c_impl::reset()
{
gr::thread::scoped_lock lock(d_setlock);
diff --git a/gr-qtgui/lib/const_sink_c_impl.h b/gr-qtgui/lib/const_sink_c_impl.h
index a7f0096..fc3706e 100644
--- a/gr-qtgui/lib/const_sink_c_impl.h
+++ b/gr-qtgui/lib/const_sink_c_impl.h
@@ -115,6 +115,7 @@ namespace gr {
void enable_menu(bool en);
void enable_autoscale(bool en);
void enable_grid(bool en);
+ void disable_legend();
void reset();
int work(int noutput_items,
diff --git a/gr-qtgui/lib/histogram_sink_f_impl.cc
b/gr-qtgui/lib/histogram_sink_f_impl.cc
index 56a4177..cdaf5cf 100644
--- a/gr-qtgui/lib/histogram_sink_f_impl.cc
+++ b/gr-qtgui/lib/histogram_sink_f_impl.cc
@@ -363,6 +363,12 @@ namespace gr {
}
void
+ histogram_sink_f_impl::disable_legend()
+ {
+ d_main_gui->disableLegend();
+ }
+
+ void
histogram_sink_f_impl::autoscalex()
{
d_main_gui->autoScaleX();
diff --git a/gr-qtgui/lib/histogram_sink_f_impl.h
b/gr-qtgui/lib/histogram_sink_f_impl.h
index a5409a2..e8ae1ac 100644
--- a/gr-qtgui/lib/histogram_sink_f_impl.h
+++ b/gr-qtgui/lib/histogram_sink_f_impl.h
@@ -102,6 +102,7 @@ namespace gr {
void enable_semilogx(bool en);
void enable_semilogy(bool en);
void enable_accumulate(bool en);
+ void disable_legend();
void autoscalex();
int nsamps() const;
int bins() const;
diff --git a/gr-qtgui/lib/time_sink_c_impl.cc b/gr-qtgui/lib/time_sink_c_impl.cc
index 5260f7e..fe33a09 100644
--- a/gr-qtgui/lib/time_sink_c_impl.cc
+++ b/gr-qtgui/lib/time_sink_c_impl.cc
@@ -434,6 +434,12 @@ namespace gr {
}
void
+ time_sink_c_impl::disable_legend()
+ {
+ d_main_gui->disableLegend();
+ }
+
+ void
time_sink_c_impl::reset()
{
gr::thread::scoped_lock lock(d_setlock);
diff --git a/gr-qtgui/lib/time_sink_c_impl.h b/gr-qtgui/lib/time_sink_c_impl.h
index 3a836a3..f29d847 100644
--- a/gr-qtgui/lib/time_sink_c_impl.h
+++ b/gr-qtgui/lib/time_sink_c_impl.h
@@ -127,6 +127,7 @@ namespace gr {
void enable_semilogy(bool en);
void enable_control_panel(bool en);
void enable_tags(int which, bool en);
+ void disable_legend();
void reset();
diff --git a/gr-qtgui/lib/time_sink_f_impl.cc b/gr-qtgui/lib/time_sink_f_impl.cc
index 3c83983..d0cafd4 100644
--- a/gr-qtgui/lib/time_sink_f_impl.cc
+++ b/gr-qtgui/lib/time_sink_f_impl.cc
@@ -430,6 +430,12 @@ namespace gr {
}
void
+ time_sink_f_impl::disable_legend()
+ {
+ d_main_gui->disableLegend();
+ }
+
+ void
time_sink_f_impl::reset()
{
gr::thread::scoped_lock lock(d_setlock);
diff --git a/gr-qtgui/lib/time_sink_f_impl.h b/gr-qtgui/lib/time_sink_f_impl.h
index 4f8193e..1d42f36 100644
--- a/gr-qtgui/lib/time_sink_f_impl.h
+++ b/gr-qtgui/lib/time_sink_f_impl.h
@@ -127,6 +127,7 @@ namespace gr {
void enable_semilogy(bool en);
void enable_control_panel(bool en);
void enable_tags(int which, bool en);
+ void disable_legend();
void reset();
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.cc
b/gr-qtgui/lib/waterfall_sink_c_impl.cc
index e5d43f4..1675b80 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.cc
@@ -346,6 +346,12 @@ namespace gr {
}
void
+ waterfall_sink_c_impl::disable_legend()
+ {
+ d_main_gui->disableLegend();
+ }
+
+ void
waterfall_sink_c_impl::fft(float *data_out, const gr_complex *data_in, int
size)
{
if(d_window.size()) {
diff --git a/gr-qtgui/lib/waterfall_sink_c_impl.h
b/gr-qtgui/lib/waterfall_sink_c_impl.h
index 6ab09bd..e21de88 100644
--- a/gr-qtgui/lib/waterfall_sink_c_impl.h
+++ b/gr-qtgui/lib/waterfall_sink_c_impl.h
@@ -125,6 +125,7 @@ namespace gr {
void enable_menu(bool en);
void enable_grid(bool en);
+ void disable_legend();
int work(int noutput_items,
gr_vector_const_void_star &input_items,
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.cc
b/gr-qtgui/lib/waterfall_sink_f_impl.cc
index adae592..7bb2a09 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.cc
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.cc
@@ -351,6 +351,12 @@ namespace gr {
}
void
+ waterfall_sink_f_impl::disable_legend()
+ {
+ d_main_gui->disableLegend();
+ }
+
+ void
waterfall_sink_f_impl::fft(float *data_out, const float *data_in, int size)
{
// float to complex conversion
diff --git a/gr-qtgui/lib/waterfall_sink_f_impl.h
b/gr-qtgui/lib/waterfall_sink_f_impl.h
index 2710f30..8be0003 100644
--- a/gr-qtgui/lib/waterfall_sink_f_impl.h
+++ b/gr-qtgui/lib/waterfall_sink_f_impl.h
@@ -126,6 +126,7 @@ namespace gr {
void enable_menu(bool en);
void enable_grid(bool en);
+ void disable_legend();
int work(int noutput_items,
gr_vector_const_void_star &input_items,
- [Commit-gnuradio] [gnuradio] branch master updated (cce2347 -> 93c25bc), git, 2015/04/06
- [Commit-gnuradio] [gnuradio] 04/08: qtgui: fixed an issue setting up control panel at runtime., git, 2015/04/06
- [Commit-gnuradio] [gnuradio] 06/08: qtgui: fixed stray variable; also problem between qwt 6.0 and 6.1., git, 2015/04/06
- [Commit-gnuradio] [gnuradio] 07/08: qtgui: added stop button to freq control panel., git, 2015/04/06
- [Commit-gnuradio] [gnuradio] 02/08: qtgui: toggle legend off in GRC properties.,
git <=
- [Commit-gnuradio] [gnuradio] 05/08: qtgui: enable/disable waterfall legend., git, 2015/04/06
- [Commit-gnuradio] [gnuradio] 03/08: qtgui: added trigger line and controlpanel settings., git, 2015/04/06
- [Commit-gnuradio] [gnuradio] 08/08: Merge remote-tracking branch 'tom/qtgui/freq_control_panel', git, 2015/04/06
- [Commit-gnuradio] [gnuradio] 01/08: qtgui: adds control panel to frequency sinks., git, 2015/04/06