##// END OF EJS Templates
Inits color scale widget
Alexandre Leroux -
r1001:8374414c3291
parent child
Show More
@@ -0,0 +1,24
1 #ifndef SCIQLOP_COLORSCALEEDITOR_H
2 #define SCIQLOP_COLORSCALEEDITOR_H
3
4 #include <QDialog>
5
6 namespace Ui {
7 class ColorScaleEditor;
8 } // Ui
9
10 /**
11 * @brief The ColorScaleEditor class represents the widget to set properties of color scale's graphs
12 */
13 class ColorScaleEditor : public QDialog {
14 Q_OBJECT
15
16 public:
17 explicit ColorScaleEditor(QWidget *parent = 0);
18 virtual ~ColorScaleEditor() noexcept;
19
20 private:
21 Ui::ColorScaleEditor *ui;
22 };
23
24 #endif // SCIQLOP_COLORSCALEEDITOR_H
@@ -0,0 +1,13
1 #include "Visualization/ColorScaleEditor.h"
2
3 #include "ui_ColorScaleEditor.h"
4
5 ColorScaleEditor::ColorScaleEditor(QWidget *parent) : QDialog{parent}, ui{new Ui::ColorScaleEditor}
6 {
7 ui->setupUi(this);
8 }
9
10 ColorScaleEditor::~ColorScaleEditor() noexcept
11 {
12 delete ui;
13 }
@@ -0,0 +1,169
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>ColorScaleEditor</class>
4 <widget class="QDialog" name="ColorScaleEditor">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>258</width>
10 <height>232</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>Color scale editor</string>
15 </property>
16 <layout class="QGridLayout" name="gridLayout">
17 <item row="3" column="0">
18 <layout class="QHBoxLayout" name="horizontalLayout">
19 <item>
20 <spacer name="horizontalSpacer">
21 <property name="orientation">
22 <enum>Qt::Horizontal</enum>
23 </property>
24 <property name="sizeHint" stdset="0">
25 <size>
26 <width>40</width>
27 <height>20</height>
28 </size>
29 </property>
30 </spacer>
31 </item>
32 <item>
33 <widget class="QPushButton" name="okButton">
34 <property name="text">
35 <string>OK</string>
36 </property>
37 <property name="default">
38 <bool>true</bool>
39 </property>
40 </widget>
41 </item>
42 <item>
43 <widget class="QPushButton" name="cancelButton">
44 <property name="text">
45 <string>Cancel</string>
46 </property>
47 </widget>
48 </item>
49 </layout>
50 </item>
51 <item row="1" column="0">
52 <widget class="QGroupBox" name="groupBox">
53 <property name="title">
54 <string>Preview</string>
55 </property>
56 <layout class="QGridLayout" name="gridLayout_3">
57 <item row="0" column="0">
58 <widget class="QCustomPlot" name="plot" native="true"/>
59 </item>
60 </layout>
61 </widget>
62 </item>
63 <item row="0" column="0">
64 <layout class="QGridLayout" name="gridLayout_2">
65 <item row="1" column="0">
66 <widget class="QLabel" name="thresholdLabel">
67 <property name="text">
68 <string>Thresholds:</string>
69 </property>
70 </widget>
71 </item>
72 <item row="1" column="1">
73 <widget class="QRadioButton" name="thresholdAutoButton">
74 <property name="enabled">
75 <bool>false</bool>
76 </property>
77 <property name="text">
78 <string>Automatic</string>
79 </property>
80 <property name="checkable">
81 <bool>true</bool>
82 </property>
83 <property name="checked">
84 <bool>false</bool>
85 </property>
86 </widget>
87 </item>
88 <item row="1" column="2">
89 <widget class="QRadioButton" name="thresholdManualButton">
90 <property name="text">
91 <string>Manual</string>
92 </property>
93 </widget>
94 </item>
95 <item row="2" column="0">
96 <widget class="QLabel" name="minLabel">
97 <property name="text">
98 <string>Min:</string>
99 </property>
100 </widget>
101 </item>
102 <item row="3" column="0">
103 <widget class="QLabel" name="maxLabel">
104 <property name="text">
105 <string>Max:</string>
106 </property>
107 </widget>
108 </item>
109 <item row="2" column="1" colspan="2">
110 <widget class="QDoubleSpinBox" name="minSpinBox">
111 <property name="showGroupSeparator" stdset="0">
112 <bool>true</bool>
113 </property>
114 </widget>
115 </item>
116 <item row="3" column="1" colspan="2">
117 <widget class="QDoubleSpinBox" name="maxSpinBox">
118 <property name="showGroupSeparator" stdset="0">
119 <bool>true</bool>
120 </property>
121 </widget>
122 </item>
123 <item row="0" column="0">
124 <widget class="QLabel" name="gradientLabel">
125 <property name="text">
126 <string>Gradient:</string>
127 </property>
128 </widget>
129 </item>
130 <item row="0" column="1" colspan="2">
131 <widget class="QComboBox" name="gradientComboBox"/>
132 </item>
133 </layout>
134 </item>
135 <item row="2" column="0">
136 <spacer name="verticalSpacer">
137 <property name="orientation">
138 <enum>Qt::Vertical</enum>
139 </property>
140 <property name="sizeHint" stdset="0">
141 <size>
142 <width>20</width>
143 <height>40</height>
144 </size>
145 </property>
146 </spacer>
147 </item>
148 </layout>
149 </widget>
150 <customwidgets>
151 <customwidget>
152 <class>QCustomPlot</class>
153 <extends>QWidget</extends>
154 <header>Visualization/qcustomplot.h</header>
155 <container>1</container>
156 </customwidget>
157 </customwidgets>
158 <tabstops>
159 <tabstop>gradientComboBox</tabstop>
160 <tabstop>thresholdAutoButton</tabstop>
161 <tabstop>okButton</tabstop>
162 <tabstop>thresholdManualButton</tabstop>
163 <tabstop>maxSpinBox</tabstop>
164 <tabstop>minSpinBox</tabstop>
165 <tabstop>cancelButton</tabstop>
166 </tabstops>
167 <resources/>
168 <connections/>
169 </ui>
@@ -16,7 +16,8 gui_moc_headers = [
16 'include/Visualization/VisualizationWidget.h',
16 'include/Visualization/VisualizationWidget.h',
17 'include/Visualization/VisualizationZoneWidget.h',
17 'include/Visualization/VisualizationZoneWidget.h',
18 'include/Visualization/VisualizationDragDropContainer.h',
18 'include/Visualization/VisualizationDragDropContainer.h',
19 'include/Visualization/VisualizationDragWidget.h'
19 'include/Visualization/VisualizationDragWidget.h',
20 'include/Visualization/ColorScaleWidget.h'
20 ]
21 ]
21
22
22 gui_ui_files = [
23 gui_ui_files = [
@@ -31,7 +32,8 gui_ui_files = [
31 'ui/Visualization/VisualizationGraphWidget.ui',
32 'ui/Visualization/VisualizationGraphWidget.ui',
32 'ui/Visualization/VisualizationTabWidget.ui',
33 'ui/Visualization/VisualizationTabWidget.ui',
33 'ui/Visualization/VisualizationWidget.ui',
34 'ui/Visualization/VisualizationWidget.ui',
34 'ui/Visualization/VisualizationZoneWidget.ui'
35 'ui/Visualization/VisualizationZoneWidget.ui',
36 'ui/Visualization/ColorScaleWidget.ui'
35 ]
37 ]
36
38
37 gui_qresources = ['resources/sqpguiresources.qrc']
39 gui_qresources = ['resources/sqpguiresources.qrc']
@@ -77,7 +79,8 gui_sources = [
77 'src/Visualization/AxisRenderingUtils.cpp',
79 'src/Visualization/AxisRenderingUtils.cpp',
78 'src/Visualization/PlottablesRenderingUtils.cpp',
80 'src/Visualization/PlottablesRenderingUtils.cpp',
79 'src/Visualization/MacScrollBarStyle.cpp',
81 'src/Visualization/MacScrollBarStyle.cpp',
80 'src/Visualization/VisualizationCursorItem.cpp'
82 'src/Visualization/VisualizationCursorItem.cpp',
83 'src/Visualization/ColorScaleWidget.cpp'
81 ]
84 ]
82
85
83 gui_inc = include_directories(['include'])
86 gui_inc = include_directories(['include'])
General Comments 0
You need to be logged in to leave comments. Login now