OTB  6.7.0
Orfeo Toolbox
mvdQtWidgetView.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 mvdWrapperQtWidgetView_h
22 #define mvdWrapperQtWidgetView_h
23 
24 //
25 // Configuration include.
27 #include "ConfigureMonteverdi.h"
28 
29 /*****************************************************************************/
30 /* INCLUDE SECTION */
31 
32 //
33 // Qt includes (sorted by alphabetic order)
35 #include <QtWidgets>
36 #include <QShortcut>
37 
38 //
39 // OTB includes (sorted by alphabetic order)
40 #include "otbWrapperQtWidgetView.h"
42 #include "OTBMonteverdiGUIExport.h"
43 
44 //
45 // Monteverdi includes (sorted by alphabetic order)
46 #include "mvdTypes.h"
47 
48 namespace mvd
49 {
50 namespace Wrapper
51 {
52 
53 /*****************************************************************************/
54 /* CLASS DEFINITION SECTION */
55 
64 class OTBMonteverdiGUI_EXPORT QtWidgetView :
66 {
67  Q_OBJECT
68 
69 public:
70 
71  static char const * const OBJECT_NAME;
72 
75  QWidget* p = nullptr,
76  Qt::WindowFlags flags =0 );
77 
79  ~QtWidgetView() override;
80 
81  bool BeforeExecuteButtonClicked() override;
82 
83 protected:
84  QWidget* CreateInputWidgets() override;
85 
86 private:
87 
88  QtWidgetView(const QtWidgetView&) = delete;
89  void operator=(const QtWidgetView&) = delete;
90 
91  void SetupParameterWidgets( QWidget* widget );
92 
93  void SetupFileSelectionWidget( QWidget * );
94 
95 private slots:
96 
97  // slot in charge of emitting a signal to the catalogue mainWindow.
98  // when received, the main application need to get the output
99  // image filename{s} set by the user in this OTB application (if any).
100  void OnApplicationExecutionDone( int );
101 
102  inline void OnFileSelectionWidgetAdded0( QWidget * );
103 
104  inline void OnFileSelectionWidgetAdded1( QWidget * );
105 };
106 
107 } // end namespace 'Wrapper'
108 
109 } // end namespace 'mvd'
110 
111 namespace mvd
112 {
113 
114 namespace Wrapper
115 {
116 
117 inline
118 void
120 ::OnFileSelectionWidgetAdded0( QWidget * widget )
121 {
122  SetupFileSelectionWidget( widget );
123 }
124 
125 inline
126 void
128 ::OnFileSelectionWidgetAdded1( QWidget * widget )
129 {
130  SetupFileSelectionWidget( widget );
131 }
132 
133 } // end namespace 'Wrapper'
134 
135 } // end namespace 'mvd'
136 
137 #endif
static char const *const OBJECT_NAME
void OnFileSelectionWidgetAdded1(QWidget *)
void OnFileSelectionWidgetAdded0(QWidget *)