[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 12/20: qtgui: Modified the qproperties to s
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 12/20: qtgui: Modified the qproperties to scale the colorbar title from the .qss file |
Date: |
Fri, 28 Aug 2015 19:19:52 +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 fb470503a4a15f0d185abd282210543e5bb0825b
Author: Bill Clark <address@hidden>
Date: Fri Aug 28 11:44:09 2015 -0400
qtgui: Modified the qproperties to scale the colorbar title from the .qss
file
---
gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h | 5 +++++
gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h | 4 ++++
gr-qtgui/lib/TimeRasterDisplayPlot.cc | 17 ++++++++++++++++-
gr-qtgui/lib/WaterfallDisplayPlot.cc | 16 +++++++++++++++-
4 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h
b/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h
index 7ef1ad2..88a64a9 100644
--- a/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h
+++ b/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h
@@ -47,6 +47,7 @@ class TimeRasterDisplayPlot: public DisplayPlot
Q_OBJECT
Q_PROPERTY(int intensity_color_map_type1 READ getIntensityColorMapType1
WRITE setIntensityColorMapType1)
+ Q_PROPERTY(int color_map_title_font_size READ getColorMapTitleFontSize WRITE
setColorMapTitleFontSize)
public:
TimeRasterDisplayPlot(int nplots,
@@ -85,6 +86,8 @@ public:
int getIntensityColorMapType1() const;
void setIntensityColorMapType(const int, const int, const QColor, const
QColor);
void setIntensityColorMapType1(int);
+ int getColorMapTitleFontSize() const;
+ void setColorMapTitleFontSize(int tfs);
const QColor getUserDefinedLowIntensityColor() const;
const QColor getUserDefinedHighIntensityColor() const;
@@ -107,6 +110,8 @@ private:
std::vector<int> d_color_map_type;
QColor d_low_intensity;
QColor d_high_intensity;
+
+ int d_color_bar_title_font_size;
};
#endif /* TIMERASTER_DISPLAY_PLOT_H */
diff --git a/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
b/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
index 287f1cf..e4db145 100644
--- a/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
+++ b/gr-qtgui/include/gnuradio/qtgui/WaterfallDisplayPlot.h
@@ -48,6 +48,7 @@ class WaterfallDisplayPlot: public DisplayPlot
Q_PROPERTY ( int intensity_color_map_type1 READ getIntensityColorMapType1
WRITE setIntensityColorMapType1 )
Q_PROPERTY ( QColor low_intensity_color READ getUserDefinedLowIntensityColor
WRITE setUserDefinedLowIntensityColor )
Q_PROPERTY ( QColor high_intensity_color READ
getUserDefinedHighIntensityColor WRITE setUserDefinedHighIntensityColor )
+ Q_PROPERTY(int color_map_title_font_size READ getColorMapTitleFontSize WRITE
setColorMapTitleFontSize)
public:
@@ -84,6 +85,7 @@ public:
int getIntensityColorMapType(int) const;
int getIntensityColorMapType1() const;
+ int getColorMapTitleFontSize() const;
const QColor getUserDefinedLowIntensityColor() const;
const QColor getUserDefinedHighIntensityColor() const;
@@ -95,6 +97,7 @@ public:
public slots:
void setIntensityColorMapType(const int, const int, const QColor, const
QColor);
void setIntensityColorMapType1(int);
+ void setColorMapTitleFontSize(int tfs);
void setUserDefinedLowIntensityColor(QColor);
void setUserDefinedHighIntensityColor(QColor);
void setPlotPosHalf(bool half);
@@ -129,6 +132,7 @@ private:
std::vector<int> d_intensity_color_map_type;
QColor d_user_defined_low_intensity_color;
QColor d_user_defined_high_intensity_color;
+ int d_color_bar_title_font_size;
};
#endif /* WATERFALL_DISPLAY_PLOT_H */
diff --git a/gr-qtgui/lib/TimeRasterDisplayPlot.cc
b/gr-qtgui/lib/TimeRasterDisplayPlot.cc
index 5cf736d3..e5e18b7 100644
--- a/gr-qtgui/lib/TimeRasterDisplayPlot.cc
+++ b/gr-qtgui/lib/TimeRasterDisplayPlot.cc
@@ -205,6 +205,7 @@ TimeRasterDisplayPlot::TimeRasterDisplayPlot(int nplots,
d_cols = cols;
d_rows = rows;
d_numPoints = d_cols;
+ d_color_bar_title_font_size = 18;
setAxisScaleDraw(QwtPlot::xBottom, new QwtXScaleDraw());
setAxisScaleDraw(QwtPlot::yLeft, new QwtYScaleDraw());
@@ -474,6 +475,18 @@ TimeRasterDisplayPlot::getIntensityColorMapType1() const
return getIntensityColorMapType(0);
}
+int
+TimeRasterDisplayPlot::getColorMapTitleFontSize() const
+{
+ return d_color_bar_title_font_size;
+}
+
+void
+TimeRasterDisplayPlot::setColorMapTitleFontSize(int tfs)
+{
+ d_color_bar_title_font_size = tfs;
+}
+
void
TimeRasterDisplayPlot::setIntensityColorMapType(const int which,
const int newType,
@@ -556,7 +569,9 @@ void
TimeRasterDisplayPlot::_updateIntensityRangeDisplay()
{
QwtScaleWidget *rightAxis = axisWidget(QwtPlot::yRight);
- rightAxis->setTitle("Intensity");
+ QwtText colorBarTitle("Intensity");
+ colorBarTitle.setFont(QFont("Arial",d_color_bar_title_font_size));
+ rightAxis->setTitle(colorBarTitle);
rightAxis->setColorBarEnabled(true);
for(int i = 0; i < d_nplots; i++) {
diff --git a/gr-qtgui/lib/WaterfallDisplayPlot.cc
b/gr-qtgui/lib/WaterfallDisplayPlot.cc
index d023bc1..4b7f34a 100644
--- a/gr-qtgui/lib/WaterfallDisplayPlot.cc
+++ b/gr-qtgui/lib/WaterfallDisplayPlot.cc
@@ -400,6 +400,18 @@ WaterfallDisplayPlot::getMaxIntensity(int which) const
return r.maxValue();
}
+int
+WaterfallDisplayPlot::getColorMapTitleFontSize() const
+{
+ return d_color_bar_title_font_size;
+}
+
+void
+WaterfallDisplayPlot::setColorMapTitleFontSize(int tfs)
+{
+ d_color_bar_title_font_size = tfs;
+}
+
void
WaterfallDisplayPlot::replot()
{
@@ -590,7 +602,9 @@ void
WaterfallDisplayPlot::_updateIntensityRangeDisplay()
{
QwtScaleWidget *rightAxis = axisWidget(QwtPlot::yRight);
- rightAxis->setTitle("Intensity (dB)");
+ QwtText colorBarTitle("Intensity (dB)");
+ colorBarTitle.setFont(QFont("Arial",d_color_bar_title_font_size));
+ rightAxis->setTitle(colorBarTitle);
rightAxis->setColorBarEnabled(true);
for(int i = 0; i < d_nplots; i++) {
- [Commit-gnuradio] [gnuradio] 16/20: Merge remote-tracking branch 'ckuethe/trap_import_errors', (continued)
- [Commit-gnuradio] [gnuradio] 16/20: Merge remote-tracking branch 'ckuethe/trap_import_errors', git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 17/20: Merge remote-tracking branch 'saikwolf/qt_themeing', git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 11/20: clarify missing module exception., git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 07/20: grc: move gui prefs file to ~/.gnuradio/grc.conf, git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 20/20: Merge branch 'maint', git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 19/20: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 04/20: grc: clean-up ActionHandler.py imports, git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 14/20: Merge remote-tracking branch 'estatz/qtgui_trigger_callbacks', git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 13/20: grc: super-secret, git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 10/20: grc: show cmdline when xterm is used, git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 12/20: qtgui: Modified the qproperties to scale the colorbar title from the .qss file,
git <=
- [Commit-gnuradio] [gnuradio] 18/20: Merge remote-tracking branch 'sdh11/complexity', git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 15/20: Merge remote-tracking branch 'tom/docs/sphinx_update', git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 03/20: grc: have cmake find a xterm executable on UNIX, git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 08/20: whitespace fixes and some minor adjustments for building the Python manual., git, 2015/08/28
- [Commit-gnuradio] [gnuradio] 09/20: docs: Reviving Python manual., git, 2015/08/28