General Purpose Geodetic Library
SgGuiQTreeWidgetExt.h
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 
24 #ifndef SG_GUI_QTREE_WIDGET_EXT_H
25 #define SG_GUI_QTREE_WIDGET_EXT_H
26 
27 
28 #ifdef HAVE_CONFIG_H
29 # include <config.h>
30 #endif
31 
32 
33 #include <QtCore/QString>
34 
35 #if QT_VERSION >= 0x050000
36 # include <QtWidgets/QTreeWidget>
37 # include <QtWidgets/QTreeWidgetItem>
38 #else
39 # include <QtGui/QTreeWidget>
40 # include <QtGui/QTreeWidgetItem>
41 #endif
42 
43 
44 
45 
46 // a little bit extended version of QTreeWidget
47 
48 
49 /*================================================================================================*/
51 {
52  Q_OBJECT
53 
54 public:
57 
58  signals:
59  void moveUponItem(QTreeWidgetItem*, int, Qt::MouseButton, Qt::KeyboardModifiers);
60 
61  private
62  slots:
63  void movingStarted(QTreeWidgetItem*, int);
64 
65 private:
66  bool isMoving_;
67  int mCol_;
69  Qt::MouseButton mouseButtonState_;
70 
71 protected:
72  void mouseMoveEvent(QMouseEvent*);
73  //void contentsMouseMoveEvent(QMouseEvent*);
74  void mousePressEvent(QMouseEvent*);
75 // void contentsMousePressEvent(QMouseEvent*);
76  void mouseReleaseEvent(QMouseEvent*);
77 // void contentsMouseReleaseEvent(QMouseEvent*);
78 };
79 /*================================================================================================*/
80 
81 
82 /*================================================================================================*/
83 #endif // SG_GUI_QTREE_WIDGET_EXT_H
void movingStarted(QTreeWidgetItem *, int)
void mouseReleaseEvent(QMouseEvent *)
void mousePressEvent(QMouseEvent *)
void moveUponItem(QTreeWidgetItem *, int, Qt::MouseButton, Qt::KeyboardModifiers)
SgGuiQTreeWidgetExt(QWidget *=0)
void mouseMoveEvent(QMouseEvent *)
QTreeWidgetItem * mItem_
Qt::MouseButton mouseButtonState_