OTB  6.7.0
Orfeo Toolbox
mvdColorBandDynamicsWidget.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef mvdColorBandDynamicsWidget_h
22 #define mvdColorBandDynamicsWidget_h
23 
24 //
25 // Configuration include.
27 #include "ConfigureMonteverdi.h"
28 
29 
30 /*****************************************************************************/
31 /* INCLUDE SECTION */
32 
33 //
34 // Qt includes (sorted by alphabetic order)
36 #include <QtWidgets>
37 
38 //
39 // System includes (sorted by alphabetic order)
40 
41 //
42 // ITK includes (sorted by alphabetic order)
43 
44 //
45 // OTB includes (sorted by alphabetic order)
46 #include "OTBMonteverdiGUIExport.h"
47 //
48 // Monteverdi includes (sorted by alphabetic order)
49 #include "mvdCore.h"
50 
51 
52 /*****************************************************************************/
53 /* PRE-DECLARATION SECTION */
54 
55 //
56 // External classes pre-declaration.
57 namespace
58 {
59 }
60 
61 namespace mvd
62 {
63 class DoubleValidator;
64 //
65 // Internal classes pre-declaration.
66 namespace Ui
67 {
68 class ColorBandDynamicsWidget;
69 };
70 
71 
72 /*****************************************************************************/
73 /* CLASS DEFINITION SECTION */
74 
80 class OTBMonteverdiGUI_EXPORT ColorBandDynamicsWidget :
81  public QWidget
82 {
83 
84  /*-[ QOBJECT SECTION ]-----------------------------------------------------*/
85 
86  Q_OBJECT;
87 
89  Q_PROPERTY( RgbwChannel channelLabel
90  READ GetChannelLabel
91  WRITE SetChannelLabel );
92 
95  Q_PROPERTY( double minIntensity
96  READ GetMinIntensity
97  WRITE SetMinIntensity );
98 
101  Q_PROPERTY( double maxIntensity
102  READ GetMaxIntensity
103  WRITE SetMaxIntensity );
104 
107  Q_PROPERTY( double lowIntensity
108  READ GetLowIntensity
109  WRITE SetLowIntensity );
110 
113  Q_PROPERTY( double highIntensity
114  READ GetHighIntensity
115  WRITE SetHighIntensity );
116 
119  Q_PROPERTY( double lowQuantile
120  READ GetLowQuantile
121  WRITE SetLowQuantile );
122 
125  Q_PROPERTY( double highQuantile
126  READ GetHighQuantile
127  WRITE SetHighQuantile );
128 
131  Q_PROPERTY( bool isBounded
132  READ IsBounded()
133  WRITE SetBounded() );
134 
135  /*-[ PUBLIC SECTION ]------------------------------------------------------*/
136 
137 //
138 // Public methods.
139 public:
140 
142  ColorBandDynamicsWidget( QWidget* p =NULL, Qt::WindowFlags flags =0 );
143 
145  ~ColorBandDynamicsWidget() override;
146 
148  RgbwChannel GetChannelLabel() const;
149 
151  void SetChannelLabel( RgbwChannel );
152 
154  double GetMinIntensity() const;
155 
157  void SetMinIntensity( double );
158 
160  double GetMaxIntensity() const;
161 
163  void SetMaxIntensity( double );
164 
166  double GetLowIntensity() const;
167 
169  void SetLowIntensity( double );
170 
172  double GetHighIntensity() const;
173 
175  void SetHighIntensity( double );
176 
178  double GetLowQuantile() const;
179 
181  void SetLowQuantile( double );
182 
184  double GetHighQuantile() const;
185 
187  void SetHighQuantile( double );
188 
191  bool IsBounded() const;
192 
195  void SetBounded( bool enabled );
196 
199  void SetLinkButtonEnabled( bool );
200 
203  void SetDefaultsButtonEnabled( bool );
204 
205  /*-[ SIGNALS SECTION ]-----------------------------------------------------*/
206 
207 //
208 // Signals.
209 signals:
211  void LowQuantileChanged( RgbwChannel, double );
212 
214  void HighQuantileChanged( RgbwChannel, double );
215 
217  void LowIntensityChanged( RgbwChannel, double );
218 
220  void HighIntensityChanged( RgbwChannel, double );
221 
223  void ResetIntensityClicked( RgbwChannel );
224 
226  void ResetQuantileClicked( RgbwChannel );
227 
229  void ApplyAllClicked( RgbwChannel, double, double);
230 
233  void LinkToggled( RgbwChannel, bool );
234 
235 
236  /*-[ PROTECTED SECTION ]---------------------------------------------------*/
237 
238 //
239 // Protected methods.
240 protected:
241 
242 //
243 // Protected attributes.
244 protected:
245 
246  /*-[ PRIVATE SECTION ]-----------------------------------------------------*/
247 
248 //
249 // Private methods.
250 private:
251 
252 //
253 // Private attributes.
254 private:
258  Ui::ColorBandDynamicsWidget* m_UI;
259 
263 
267 
270 
271  /*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
272 
273 //
274 // Slots.
275 private slots:
276  void on_lowIntensityLineEdit_editingFinished();
277  void on_highIntensityLineEdit_editingFinished();
278 
279  void on_lowQuantileSpinBox_valueChanged( double );
280  void on_highQuantileSpinBox_valueChanged( double );
281 
282  void on_minMaxButton_clicked();
283  void on_defaultsButton_clicked();
284  void on_applyAllButton_clicked();
285 
286  void on_linkButton_toggled( bool );
287 };
288 
289 } // end namespace 'mvd'.
290 
291 #endif // mvdColorBandDynamicsWidget_h
RgbwChannel
Definition: mvdCore.h:80
Ui::ColorBandDynamicsWidget * m_UI