diff options
author | Tom Rondeau <tom@trondeau.com> | 2014-06-24 18:58:47 -0400 |
---|---|---|
committer | Tom Rondeau <tom@trondeau.com> | 2014-06-26 14:16:48 -0400 |
commit | 1beb26555301221476fa9293300d00f565f11a3e (patch) | |
tree | c4e74f403052d1e2e645e9bcac719dc7f935f3ea | |
parent | 40b9339f9c891574d02399fa91c66f32fab65779 (diff) |
qtgui: adds an alternative qss file.
-rw-r--r-- | gr-qtgui/examples/CMakeLists.txt | 1 | ||||
-rw-r--r-- | gr-qtgui/examples/alt.qss | 126 | ||||
-rw-r--r-- | gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h | 6 | ||||
-rw-r--r-- | gr-qtgui/lib/TimeRasterDisplayPlot.cc | 12 |
4 files changed, 144 insertions, 1 deletions
diff --git a/gr-qtgui/examples/CMakeLists.txt b/gr-qtgui/examples/CMakeLists.txt index 8d3b29957b..cd6de245d6 100644 --- a/gr-qtgui/examples/CMakeLists.txt +++ b/gr-qtgui/examples/CMakeLists.txt @@ -39,6 +39,7 @@ GR_PYTHON_INSTALL(PROGRAMS install( FILES dark.qss + alt.qss qtgui_tags_viewing.grc DESTINATION ${GR_PKG_QTGUI_EXAMPLES_DIR} COMPONENT "qtgui_python" diff --git a/gr-qtgui/examples/alt.qss b/gr-qtgui/examples/alt.qss new file mode 100644 index 0000000000..c310b80a65 --- /dev/null +++ b/gr-qtgui/examples/alt.qss @@ -0,0 +1,126 @@ +QWidget +{ + color: white; + background-color: black; +} + +QwtPlot +{ + padding: 10px; + font-size: 18px; +} + +DisplayPlot { + qproperty-zoomer_color: green; + qproperty-line_color1: #00FF00; + qproperty-line_color2: magenta; + qproperty-line_color3: #FF6905; + qproperty-line_style1: SolidLine; + qproperty-line_style2: DashLine; + qproperty-line_style3: DotLine; + qproperty-line_width1: 2; + qproperty-line_width2: 2; + qproperty-line_width3: 2; + qproperty-axes_label_font_size: 18; +} + +WaterfallDisplayPlot { + qproperty-intensity_color_map_type1: 5; + qproperty-low_intensity_color: black; + qproperty-high_intensity_color: green; +} + +TimeRasterDisplayPlot { + qproperty-intensity_color_map_type1: 6; +} + +FrequencyDisplayPlot { + qproperty-line_color1: cyan; + qproperty-line_color2: magenta; + qproperty-line_color3: purple; + qproperty-line_style1: SolidLine; + qproperty-line_style2: DashLine; + qproperty-line_style3: DotLine; + qproperty-max_fft_color: palegreen; + qproperty-min_fft_color: darkblue; + qproperty-marker_lower_intensity_color: white; + qproperty-marker_upper_intensity_color: red; + qproperty-marker_lower_intensity_visible: false; + qproperty-marker_upper_intensity_visible: false; + qproperty-marker_noise_floor_amplitude_color: red; + qproperty-marker_noise_floor_amplitude_visible: false; +} + +QwtPlotCanvas +{ + border: 1px solid White; + border-radius: 10px; +} + +QwtScaleWidget +{ + font-size: 14px; +} + +QwtLegend +{ + padding: 3px; + margin: 3px; + font-size: 14px; +} + +QwtLegendItem +{ + padding: 2px; + margin: 2px; +} + +QLineEdit, +QPlainTextEdit, +QComboBox, +QMenu { + selection-color: black; + selection-background-color: lightgrey; + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 black, stop: 1 rgb(128, 128, 128)); + border: 1px solid gray; + padding: 2px; + border-radius: 3px; +} + +QPushButton, +QToolButton { + selection-color: black; + selection-background-color: white; + background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 black, stop: 1 rgb(128, 128, 128)); + border: 1px solid gray; + padding: 2px; + border-radius: 3px; +} + +QTabWidget::pane { + border: 1px solid white; +} + +QTabBar { + margin: 20px; + padding: 20px; +} + +QTabBar::tab { + background-color: rgb(100, 100, 100); + border: 1px solid white; + padding: 5px; +} + +QTabBar::tab:first { + border-top-left-radius: 4px; +} + +QTabBar::tab:last { + border-top-right-radius: 4px; +} + +QTabBar::tab:selected { + background-color: rgb(200, 200, 200); + color: black; +} diff --git a/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h b/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h index f22028c3c9..7ef1ad2d75 100644 --- a/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h +++ b/gr-qtgui/include/gnuradio/qtgui/TimeRasterDisplayPlot.h @@ -46,6 +46,8 @@ class TimeRasterDisplayPlot: public DisplayPlot { Q_OBJECT + Q_PROPERTY(int intensity_color_map_type1 READ getIntensityColorMapType1 WRITE setIntensityColorMapType1) + public: TimeRasterDisplayPlot(int nplots, double samp_rate, @@ -67,7 +69,7 @@ public: void setPlotDimensions(const double rows, const double cols, const double units, const std::string &strunits); - + void plotNewData(const std::vector<double*> dataPoints, const int64_t numDataPoints); @@ -80,7 +82,9 @@ public: void replot(void); int getIntensityColorMapType(int) const; + int getIntensityColorMapType1() const; void setIntensityColorMapType(const int, const int, const QColor, const QColor); + void setIntensityColorMapType1(int); const QColor getUserDefinedLowIntensityColor() const; const QColor getUserDefinedHighIntensityColor() const; diff --git a/gr-qtgui/lib/TimeRasterDisplayPlot.cc b/gr-qtgui/lib/TimeRasterDisplayPlot.cc index 2d4ed41d96..5cf736d389 100644 --- a/gr-qtgui/lib/TimeRasterDisplayPlot.cc +++ b/gr-qtgui/lib/TimeRasterDisplayPlot.cc @@ -468,6 +468,12 @@ TimeRasterDisplayPlot::getIntensityColorMapType(int which) const return d_color_map_type[which]; } +int +TimeRasterDisplayPlot::getIntensityColorMapType1() const +{ + return getIntensityColorMapType(0); +} + void TimeRasterDisplayPlot::setIntensityColorMapType(const int which, const int newType, @@ -528,6 +534,12 @@ TimeRasterDisplayPlot::setIntensityColorMapType(const int which, } } +void +TimeRasterDisplayPlot::setIntensityColorMapType1(int newType) +{ + setIntensityColorMapType(0, newType, d_low_intensity, d_high_intensity); +} + const QColor TimeRasterDisplayPlot::getUserDefinedLowIntensityColor() const { |