OTB  6.7.0
Orfeo Toolbox
mvdAbstractDragAndDropEventFilter.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 mvdAbstractDragAndDropEventFilter_h
22 #define mvdAbstractDragAndDropEventFilter_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 
50 
51 /*****************************************************************************/
52 /* PRE-DECLARATION SECTION */
53 
54 //
55 // External classes pre-declaration.
56 namespace
57 {
58 }
59 
60 namespace mvd
61 {
62 
63 //
64 // Internal classes pre-declaration.
65 
66 
67 /*****************************************************************************/
68 /* CLASS DEFINITION SECTION */
69 
78 class OTBMonteverdiGUI_EXPORT AbstractDragAndDropEventFilter :
79  public QObject
80 {
81 
82  /*-[ QOBJECT SECTION ]-----------------------------------------------------*/
83 
84  Q_OBJECT;
85 
86  /*-[ PUBLIC SECTION ]------------------------------------------------------*/
87 
88 //
89 // Public methods.
90 public:
91 
94 
95  //
96  // QObject overloads.
97 
101  bool eventFilter( QObject* watched, QEvent* event ) override;
102 
103  /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
104 
105 //
106 // Public SLOTS.
107 public slots:
108 
109  /*-[ SIGNALS SECTION ]-----------------------------------------------------*/
110 
111 //
112 // Signals.
113 signals:
114 
115  /*-[ PROTECTED SECTION ]---------------------------------------------------*/
116 
117 //
118 // Protected methods.
119 protected:
120 
122  AbstractDragAndDropEventFilter( QObject* p =NULL );
123 
127  virtual bool DragEnterEvent( QObject* object, QDragEnterEvent* event ) =0;
128 
132  virtual bool DragLeaveEvent( QObject* object, QDragLeaveEvent* event ) =0;
133 
137  virtual bool DragMoveEvent( QObject* object, QDragMoveEvent* event ) =0;
138 
142  virtual bool DropEvent( QObject* object, QDropEvent* event ) =0;
143 
144 //
145 // Protected attributes.
146 protected:
147 
148  /*-[ PRIVATE SECTION ]-----------------------------------------------------*/
149 
150 //
151 // Private methods.
152 private:
153 
154 //
155 // Private attributes.
156 private:
157 
158  /*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
159 
160 //
161 // Slots.
162 private slots:
163 };
164 
165 } // end namespace 'mvd'
166 
167 /*****************************************************************************/
168 /* INLINE SECTION */
169 
170 namespace mvd
171 {
172 } // end namespace 'mvd'
173 
174 #endif // mvdAbstractDragAndDropEventFilter_h
Widget template skeleton to copy-paste when adding a new widget class.