OTB  6.7.0
Orfeo Toolbox
mvdTreeWidgetItemDragAndDropEventFilter.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 mvdTreeWidgetItemDragAndDropEventFilter_h
22 #define mvdTreeWidgetItemDragAndDropEventFilter_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)
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 TreeWidgetItemDragAndDropEventFilter :
80 {
81 
82  /*-[ QOBJECT SECTION ]-----------------------------------------------------*/
83 
84  Q_OBJECT;
85 
86  /*-[ PUBLIC SECTION ]------------------------------------------------------*/
87 
88 //
89 // Public methods.
90 public:
91 
93  TreeWidgetItemDragAndDropEventFilter( QObject* p =NULL );
94 
97 
98  /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
99 
100 //
101 // Public SLOTS.
102 public slots:
103 
104  /*-[ SIGNALS SECTION ]-----------------------------------------------------*/
105 
106 //
107 // Signals.
108 signals:
109 
112  void ItemDropped( QTreeWidgetItem* item );
113 
114 
115  /*-[ PROTECTED SECTION ]---------------------------------------------------*/
116 
117 //
118 // Protected methods.
119 protected:
120 
124  bool DragEnterEvent( QObject* object, QDragEnterEvent* event ) override;
125 
129  bool DragLeaveEvent( QObject* object, QDragLeaveEvent* event ) override;
130 
134  bool DragMoveEvent( QObject* object, QDragMoveEvent* event ) override;
135 
139  bool DropEvent( QObject* object, QDropEvent* event ) override;
140 
141 //
142 // Protected attributes.
143 protected:
144 
145  /*-[ PRIVATE SECTION ]-----------------------------------------------------*/
146 
147 //
148 // Private methods.
149 private:
150 
151 //
152 // Private attributes.
153 private:
154 
155  /*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
156 
157 //
158 // Slots.
159 private slots:
160 };
161 
162 } // end namespace 'mvd'
163 
164 /*****************************************************************************/
165 /* INLINE SECTION */
166 
167 namespace mvd
168 {
169 } // end namespace 'mvd'
170 
171 #endif // mvdTreeWidgetItemDragAndDropEventFilter_h
Widget template skeleton to copy-paste when adding a new widget class.
Widget template skeleton to copy-paste when adding a new widget class.