OTB  6.7.0
Orfeo Toolbox
mvdShaderWidget.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 mvdShaderWidget_h
22 #define mvdShaderWidget_h
23 
24 //
25 // Configuration include.
27 #include "ConfigureMonteverdi.h"
28 #include "mvdImageSettings.h"
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)
50 
51 
52 /*****************************************************************************/
53 /* PRE-DECLARATION SECTION */
54 
55 //
56 // External classes pre-declaration.
57 namespace
58 {
59 }
60 
61 namespace mvd
62 {
63 
64 //
65 // Internal classes pre-declaration.
66 namespace Ui
67 {
68 class ShaderWidget;
69 };
70 
71 class ImageSettings;
72 
73 /*****************************************************************************/
74 /* CLASS DEFINITION SECTION */
75 
84 class OTBMonteverdiGUI_EXPORT ShaderWidget :
85  public QWidget,
87 {
88 
89  /*-[ QOBJECT SECTION ]-----------------------------------------------------*/
90 
91  Q_OBJECT;
92 
93  /*-[ PUBLIC SECTION ]------------------------------------------------------*/
94 
95 //
96 // Public methods.
97 public:
98 
100  ShaderWidget( QWidget * p =NULL,
101  Qt::WindowFlags flags =0 );
102 
104  ~ShaderWidget() override;
105 
108  void SetGLSLEnabled( bool );
109 
112  void SetGLSL140Enabled( bool );
113 
114  /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
115 
116 //
117 // Public SLOTS.
118 public slots:
119 
120  void GrayscaleActivated(bool status);
121 
122  /*-[ SIGNALS SECTION ]-----------------------------------------------------*/
123 
124 //
125 // Signals.
126 signals:
127  void SettingsChanged();
128 
129  /*-[ PROTECTED SECTION ]---------------------------------------------------*/
130 
131 //
132 // Protected methods.
133 protected:
134 
135  /*-[ PRIVATE SECTION ]-----------------------------------------------------*/
136 
137 //
138 // Protected attributes.
139 protected:
140 
141 //
142 // Private methods.
143 private:
144 
145  void SetEffectVisible(const Effect & effect, bool visible);
146 
148  void virtual_SetSettings( ImageSettings * ) override;
149 
156  void UpdateComboBoxEffectItems(ImageSettings *imageSettings) ;
157 
158 //
159 // Private attributes.
160 private:
164  Ui::ShaderWidget * m_UI;
165 
166  /*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
167 
168 //
169 // Slots.
170 private slots:
171  void on_effectComboBox_currentIndexChanged( const QString & );
172  void on_sizeSpinBox_valueChanged( int );
173  void on_valueLineEdit_editingFinished();
174 };
175 
176 } // end namespace 'mvd'
177 
178 /*****************************************************************************/
179 /* INLINE SECTION */
180 
181 namespace mvd
182 {
183 } // end namespace 'mvd'
184 
185 #endif // mvdShaderWidget_h
Widget template skeleton to copy-paste when adding a new widget class.
Effect
Definition: mvdCore.h:122
Ui::ShaderWidget * m_UI
uic generated.