summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2015-05-10 20:02:23 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2015-05-10 20:02:23 -0700
commitfa247a9f587651dedfa74ac2b56dc9c3e86a171e (patch)
tree62c2bd45d9ce1e09ff089087f9db295e62265b31
parentef6485cbbec903250821bc4b70bd5ae70099d15e (diff)
parent6af7eb5d2db7cecca4aa18b3d0959af630ec00da (diff)
Merge branch 'maint'
-rw-r--r--gr-digital/grc/digital_header_payload_demux.xml1
-rw-r--r--gr-digital/grc/digital_packet_headerparser_b_default.xml2
-rw-r--r--gr-qtgui/include/gnuradio/qtgui/TimeDomainDisplayPlot.h16
-rw-r--r--gr-qtgui/include/gnuradio/qtgui/freqcontrolpanel.h3
-rw-r--r--gr-qtgui/include/gnuradio/qtgui/timecontrolpanel.h4
-rw-r--r--gr-qtgui/lib/TimeDomainDisplayPlot.cc50
-rw-r--r--gr-qtgui/lib/freqcontrolpanel.cc8
-rw-r--r--gr-qtgui/lib/freqdisplayform.cc2
-rw-r--r--gr-qtgui/lib/timecontrolpanel.cc8
-rw-r--r--gr-qtgui/lib/timedisplayform.cc2
-rw-r--r--gr-qtgui/themes/alt.qss6
-rw-r--r--gr-qtgui/themes/dark.qss8
12 files changed, 106 insertions, 4 deletions
diff --git a/gr-digital/grc/digital_header_payload_demux.xml b/gr-digital/grc/digital_header_payload_demux.xml
index 1037efde61..24c6c5b216 100644
--- a/gr-digital/grc/digital_header_payload_demux.xml
+++ b/gr-digital/grc/digital_header_payload_demux.xml
@@ -112,6 +112,7 @@
<sink>
<name>trigger</name>
<type>byte</type>
+ <optional>1</optional>
</sink>
<sink>
<name>header_data</name>
diff --git a/gr-digital/grc/digital_packet_headerparser_b_default.xml b/gr-digital/grc/digital_packet_headerparser_b_default.xml
index 415f4839f4..81a33ed774 100644
--- a/gr-digital/grc/digital_packet_headerparser_b_default.xml
+++ b/gr-digital/grc/digital_packet_headerparser_b_default.xml
@@ -19,7 +19,7 @@
<type>byte</type>
</sink>
<source>
- <name>out</name>
+ <name>header_data</name>
<type>message</type>
</source>
</block>
diff --git a/gr-qtgui/include/gnuradio/qtgui/TimeDomainDisplayPlot.h b/gr-qtgui/include/gnuradio/qtgui/TimeDomainDisplayPlot.h
index 4b743e0b92..47fc0b3c69 100644
--- a/gr-qtgui/include/gnuradio/qtgui/TimeDomainDisplayPlot.h
+++ b/gr-qtgui/include/gnuradio/qtgui/TimeDomainDisplayPlot.h
@@ -37,6 +37,10 @@ class TimeDomainDisplayPlot: public DisplayPlot
{
Q_OBJECT
+ Q_PROPERTY ( QColor tag_text_color READ getTagTextColor WRITE setTagTextColor )
+ Q_PROPERTY ( QColor tag_background_color READ getTagBackgroundColor WRITE setTagBackgroundColor )
+ Q_PROPERTY ( Qt::BrushStyle tag_background_style READ getTagBackgroundStyle WRITE setTagBackgroundStyle )
+
public:
TimeDomainDisplayPlot(int nplots, QWidget*);
virtual ~TimeDomainDisplayPlot();
@@ -52,6 +56,10 @@ public:
double sampleRate() const;
+ const QColor getTagTextColor();
+ const QColor getTagBackgroundColor();
+ const Qt::BrushStyle getTagBackgroundStyle();
+
public slots:
void setSampleRate(double sr, double units,
const std::string &strunits);
@@ -72,6 +80,10 @@ public slots:
void attachTriggerLines(bool en);
void setTriggerLines(double x, double y);
+ void setTagTextColor(QColor c);
+ void setTagBackgroundColor(QColor c);
+ void setTagBackgroundStyle(Qt::BrushStyle b);
+
private:
void _resetXAxisPoints();
void _autoScale(double bottom, double top);
@@ -88,6 +100,10 @@ private:
std::vector< std::vector<QwtPlotMarker*> > d_tag_markers;
std::vector<bool> d_tag_markers_en;
+ QColor d_tag_text_color;
+ QColor d_tag_background_color;
+ Qt::BrushStyle d_tag_background_style;
+
QwtPlotMarker *d_trigger_lines[2];
};
diff --git a/gr-qtgui/include/gnuradio/qtgui/freqcontrolpanel.h b/gr-qtgui/include/gnuradio/qtgui/freqcontrolpanel.h
index b7036d4d7c..ce0aeedf9f 100644
--- a/gr-qtgui/include/gnuradio/qtgui/freqcontrolpanel.h
+++ b/gr-qtgui/include/gnuradio/qtgui/freqcontrolpanel.h
@@ -53,9 +53,12 @@ public slots:
void toggleTriggerMode(gr::qtgui::trigger_mode mode);
+ void toggleStopButton();
+
signals:
void signalAvgSlider(float val);
void signalAvg(bool en);
+ void signalToggleStopButton();
private:
FreqDisplayForm *d_parent;
diff --git a/gr-qtgui/include/gnuradio/qtgui/timecontrolpanel.h b/gr-qtgui/include/gnuradio/qtgui/timecontrolpanel.h
index c8e4143dde..aabd890e6e 100644
--- a/gr-qtgui/include/gnuradio/qtgui/timecontrolpanel.h
+++ b/gr-qtgui/include/gnuradio/qtgui/timecontrolpanel.h
@@ -47,6 +47,10 @@ public slots:
void toggleGrid(bool en);
void toggleTriggerMode(gr::qtgui::trigger_mode mode);
void toggleTriggerSlope(gr::qtgui::trigger_slope slope);
+ void toggleStopButton();
+
+signals:
+ void signalToggleStopButton();
private:
TimeDisplayForm *d_parent;
diff --git a/gr-qtgui/lib/TimeDomainDisplayPlot.cc b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
index 16ba4a39c6..bc9f630235 100644
--- a/gr-qtgui/lib/TimeDomainDisplayPlot.cc
+++ b/gr-qtgui/lib/TimeDomainDisplayPlot.cc
@@ -135,6 +135,10 @@ TimeDomainDisplayPlot::TimeDomainDisplayPlot(int nplots, QWidget* parent)
d_xdata = new double[d_numPoints];
memset(d_xdata, 0x0, d_numPoints*sizeof(double));
+ d_tag_text_color = Qt::black;
+ d_tag_background_color = Qt::white;
+ d_tag_background_style = Qt::NoBrush;
+
d_zoomer = new TimeDomainDisplayZoomer(canvas(), 0);
#if QWT_VERSION < 0x060000
@@ -381,7 +385,14 @@ TimeDomainDisplayPlot::plotNewData(const std::vector<double*> dataPoints,
QString orig = (*mitr)->label().text();
s << std::endl;
orig.prepend(s.str().c_str());
- (*mitr)->setLabel(orig);
+
+ QwtText newtext(orig);
+ newtext.setColor(getTagTextColor());
+
+ QBrush brush(getTagBackgroundColor(), getTagBackgroundStyle());
+ newtext.setBackgroundBrush(brush);
+
+ (*mitr)->setLabel(newtext);
}
}
@@ -598,6 +609,43 @@ TimeDomainDisplayPlot::enableTagMarker(int which, bool en)
throw std::runtime_error("TimeDomainDisplayPlot: enabled tag marker does not exist.\n");
}
+const QColor
+TimeDomainDisplayPlot::getTagTextColor()
+{
+ return d_tag_text_color;
+}
+
+const QColor
+TimeDomainDisplayPlot::getTagBackgroundColor()
+{
+ return d_tag_background_color;
+}
+
+const Qt::BrushStyle
+TimeDomainDisplayPlot::getTagBackgroundStyle()
+{
+ return d_tag_background_style;
+}
+
+void
+TimeDomainDisplayPlot::setTagTextColor(QColor c)
+{
+ d_tag_text_color = c;
+}
+
+void
+TimeDomainDisplayPlot::setTagBackgroundColor(QColor c)
+{
+ d_tag_background_color = c;
+}
+
+void
+TimeDomainDisplayPlot::setTagBackgroundStyle(Qt::BrushStyle b)
+{
+ d_tag_background_style = b;
+}
+
+
void
TimeDomainDisplayPlot::setYLabel(const std::string &label,
const std::string &unit)
diff --git a/gr-qtgui/lib/freqcontrolpanel.cc b/gr-qtgui/lib/freqcontrolpanel.cc
index da68f722c0..269b88a23d 100644
--- a/gr-qtgui/lib/freqcontrolpanel.cc
+++ b/gr-qtgui/lib/freqcontrolpanel.cc
@@ -196,6 +196,8 @@ FreqControlPanel::FreqControlPanel(FreqDisplayForm *form)
connect(d_stop_button, SIGNAL(pressed(void)),
d_parent, SLOT(setStop(void)));
+ connect(this, SIGNAL(signalToggleStopButton(void)),
+ d_stop_button, SLOT(toggle(void)));
}
FreqControlPanel::~FreqControlPanel()
@@ -273,3 +275,9 @@ FreqControlPanel::toggleTriggerMode(gr::qtgui::trigger_mode mode)
{
d_trigger_mode_combo->setCurrentIndex(static_cast<int>(mode));
}
+
+void
+FreqControlPanel::toggleStopButton()
+{
+ emit signalToggleStopButton();
+}
diff --git a/gr-qtgui/lib/freqdisplayform.cc b/gr-qtgui/lib/freqdisplayform.cc
index 353c21e4f6..301d5a67cd 100644
--- a/gr-qtgui/lib/freqdisplayform.cc
+++ b/gr-qtgui/lib/freqdisplayform.cc
@@ -193,6 +193,8 @@ FreqDisplayForm::setupControlPanel()
d_controlpanel, SLOT(toggleTriggerMode(gr::qtgui::trigger_mode)));
connect(this, SIGNAL(signalTriggerMode(gr::qtgui::trigger_mode)),
d_controlpanel, SLOT(toggleTriggerMode(gr::qtgui::trigger_mode)));
+ connect(d_stop_act, SIGNAL(triggered()),
+ d_controlpanel, SLOT(toggleStopButton()));
d_layout->addLayout(d_controlpanel, 0, 1);
diff --git a/gr-qtgui/lib/timecontrolpanel.cc b/gr-qtgui/lib/timecontrolpanel.cc
index f02e536572..4c5a718f97 100644
--- a/gr-qtgui/lib/timecontrolpanel.cc
+++ b/gr-qtgui/lib/timecontrolpanel.cc
@@ -163,6 +163,8 @@ TimeControlPanel::TimeControlPanel(TimeDisplayForm *form)
d_parent, SLOT(autoScaleShot(void)));
connect(d_stop_button, SIGNAL(pressed(void)),
d_parent, SLOT(setStop(void)));
+ connect(this, SIGNAL(signalToggleStopButton(void)),
+ d_stop_button, SLOT(toggle(void)));
}
TimeControlPanel::~TimeControlPanel()
@@ -200,3 +202,9 @@ TimeControlPanel::toggleTriggerSlope(gr::qtgui::trigger_slope slope)
{
d_trigger_slope_combo->setCurrentIndex(static_cast<int>(slope));
}
+
+void
+TimeControlPanel::toggleStopButton()
+{
+ emit signalToggleStopButton();
+}
diff --git a/gr-qtgui/lib/timedisplayform.cc b/gr-qtgui/lib/timedisplayform.cc
index 160cf14d89..b8718c57de 100644
--- a/gr-qtgui/lib/timedisplayform.cc
+++ b/gr-qtgui/lib/timedisplayform.cc
@@ -196,6 +196,8 @@ TimeDisplayForm::setupControlPanel()
d_controlpanel, SLOT(toggleTriggerSlope(gr::qtgui::trigger_slope)));
connect(this, SIGNAL(signalTriggerSlope(gr::qtgui::trigger_slope)),
d_controlpanel, SLOT(toggleTriggerSlope(gr::qtgui::trigger_slope)));
+ connect(d_stop_act, SIGNAL(triggered()),
+ d_controlpanel, SLOT(toggleStopButton()));
d_layout->addLayout(d_controlpanel, 0, 1);
d_controlpanel->toggleAutoScale(d_autoscale_act->isChecked());
diff --git a/gr-qtgui/themes/alt.qss b/gr-qtgui/themes/alt.qss
index 29bec19157..fb15df3f5a 100644
--- a/gr-qtgui/themes/alt.qss
+++ b/gr-qtgui/themes/alt.qss
@@ -27,6 +27,12 @@ DisplayPlot {
qproperty-axes_label_font_size: 18;
}
+TimeDomainDisplayPlot {
+ qproperty-tag_text_color: blue;
+ qproperty-tag_background_color: grey;
+ qproperty-tag_background_style: Dense4Pattern;
+}
+
WaterfallDisplayPlot {
qproperty-intensity_color_map_type1: 5;
qproperty-low_intensity_color: black;
diff --git a/gr-qtgui/themes/dark.qss b/gr-qtgui/themes/dark.qss
index 8999bdae72..5b236fa3aa 100644
--- a/gr-qtgui/themes/dark.qss
+++ b/gr-qtgui/themes/dark.qss
@@ -21,6 +21,12 @@ DisplayPlot {
qproperty-axes_label_font_size: 18;
}
+TimeDomainDisplayPlot {
+ qproperty-tag_text_color: blue;
+ qproperty-tag_background_color: grey;
+ qproperty-tag_background_style: Dense4Pattern;
+}
+
WaterfallDisplayPlot {
qproperty-intensity_color_map_type1: 1;
qproperty-low_intensity_color: black;
@@ -122,5 +128,3 @@ QTabBar::tab:selected {
background-color: rgb(200, 200, 200);
color: black;
}
-
-