diff --git a/gui/include/Visualization/ColorScaleEditor.h b/gui/include/Visualization/ColorScaleEditor.h new file mode 100644 index 0000000..a0d2c7a --- /dev/null +++ b/gui/include/Visualization/ColorScaleEditor.h @@ -0,0 +1,24 @@ +#ifndef SCIQLOP_COLORSCALEEDITOR_H +#define SCIQLOP_COLORSCALEEDITOR_H + +#include + +namespace Ui { +class ColorScaleEditor; +} // Ui + +/** + * @brief The ColorScaleEditor class represents the widget to set properties of color scale's graphs + */ +class ColorScaleEditor : public QDialog { + Q_OBJECT + +public: + explicit ColorScaleEditor(QWidget *parent = 0); + virtual ~ColorScaleEditor() noexcept; + +private: + Ui::ColorScaleEditor *ui; +}; + +#endif // SCIQLOP_COLORSCALEEDITOR_H diff --git a/gui/meson.build b/gui/meson.build index 7748236..4106eb8 100644 --- a/gui/meson.build +++ b/gui/meson.build @@ -16,7 +16,8 @@ gui_moc_headers = [ 'include/Visualization/VisualizationWidget.h', 'include/Visualization/VisualizationZoneWidget.h', 'include/Visualization/VisualizationDragDropContainer.h', - 'include/Visualization/VisualizationDragWidget.h' + 'include/Visualization/VisualizationDragWidget.h', + 'include/Visualization/ColorScaleWidget.h' ] gui_ui_files = [ @@ -31,7 +32,8 @@ gui_ui_files = [ 'ui/Visualization/VisualizationGraphWidget.ui', 'ui/Visualization/VisualizationTabWidget.ui', 'ui/Visualization/VisualizationWidget.ui', - 'ui/Visualization/VisualizationZoneWidget.ui' + 'ui/Visualization/VisualizationZoneWidget.ui', + 'ui/Visualization/ColorScaleWidget.ui' ] gui_qresources = ['resources/sqpguiresources.qrc'] @@ -77,7 +79,8 @@ gui_sources = [ 'src/Visualization/AxisRenderingUtils.cpp', 'src/Visualization/PlottablesRenderingUtils.cpp', 'src/Visualization/MacScrollBarStyle.cpp', - 'src/Visualization/VisualizationCursorItem.cpp' + 'src/Visualization/VisualizationCursorItem.cpp', + 'src/Visualization/ColorScaleWidget.cpp' ] gui_inc = include_directories(['include']) diff --git a/gui/src/Visualization/ColorScaleEditor.cpp b/gui/src/Visualization/ColorScaleEditor.cpp new file mode 100644 index 0000000..8009d36 --- /dev/null +++ b/gui/src/Visualization/ColorScaleEditor.cpp @@ -0,0 +1,13 @@ +#include "Visualization/ColorScaleEditor.h" + +#include "ui_ColorScaleEditor.h" + +ColorScaleEditor::ColorScaleEditor(QWidget *parent) : QDialog{parent}, ui{new Ui::ColorScaleEditor} +{ + ui->setupUi(this); +} + +ColorScaleEditor::~ColorScaleEditor() noexcept +{ + delete ui; +} diff --git a/gui/ui/Visualization/ColorScaleEditor.ui b/gui/ui/Visualization/ColorScaleEditor.ui new file mode 100644 index 0000000..bdd36e0 --- /dev/null +++ b/gui/ui/Visualization/ColorScaleEditor.ui @@ -0,0 +1,169 @@ + + + ColorScaleEditor + + + + 0 + 0 + 258 + 232 + + + + Color scale editor + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + OK + + + true + + + + + + + Cancel + + + + + + + + + Preview + + + + + + + + + + + + + + Thresholds: + + + + + + + false + + + Automatic + + + true + + + false + + + + + + + Manual + + + + + + + Min: + + + + + + + Max: + + + + + + + true + + + + + + + true + + + + + + + Gradient: + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + QCustomPlot + QWidget +
Visualization/qcustomplot.h
+ 1 +
+
+ + gradientComboBox + thresholdAutoButton + okButton + thresholdManualButton + maxSpinBox + minSpinBox + cancelButton + + + +