summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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/lib/TimeDomainDisplayPlot.cc50
-rw-r--r--gr-qtgui/themes/alt.qss6
-rw-r--r--gr-qtgui/themes/dark.qss8
m---------volk0
7 files changed, 79 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/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/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;
}
-
-
diff --git a/volk b/volk
-Subproject f28a8be8af974d1a55a176009cb0b7927bc2222
+Subproject afd7878bd44c1e58be528acc2016ab16da05cc6