1 | /**
|
---|
2 | * Copyright (C) 2017
|
---|
3 | *
|
---|
4 | * This library is distributed under the MIT License. See notice at the end
|
---|
5 | * of this file.
|
---|
6 | *
|
---|
7 | * All code credit go to "Igor" from stackoverflow:
|
---|
8 | * http://stackoverflow.com/a/21285323
|
---|
9 | */
|
---|
10 |
|
---|
11 | #ifndef TREEVIEW_H
|
---|
12 | #define TREEVIEW_H
|
---|
13 |
|
---|
14 | #include <QTreeWidget>
|
---|
15 | #include <QTreeWidgetItem>
|
---|
16 | #include <QDropEvent>
|
---|
17 | #include <QSplitter>
|
---|
18 |
|
---|
19 | /***
|
---|
20 | * Custom Tree Widget - Same as QTreeWidget but allows to reorder the QTableWidgets using dragging.
|
---|
21 | * All code credit go to "Igor" from stackoverflow:
|
---|
22 | * http://stackoverflow.com/a/21285323
|
---|
23 | * */
|
---|
24 |
|
---|
25 | class CustomTreeWidget : public QTreeWidget
|
---|
26 | {
|
---|
27 | public:
|
---|
28 | CustomTreeWidget(QWidget* parent);
|
---|
29 | private:
|
---|
30 | void dropEvent(QDropEvent * event);
|
---|
31 | };
|
---|
32 |
|
---|
33 | #endif // TREEVIEW_H
|
---|
34 |
|
---|
35 | /**
|
---|
36 | * Copyright (c) 2017
|
---|
37 | *
|
---|
38 | * Permission is hereby granted, free of charge, to any person
|
---|
39 | * obtaining a copy of this software and associated documentation
|
---|
40 | * files (the "Software"), to deal in the Software without
|
---|
41 | * restriction, including without limitation the rights to use,
|
---|
42 | * copy, modify, merge, publish, distribute, sublicense, and/or sell
|
---|
43 | * copies of the Software, and to permit persons to whom the
|
---|
44 | * Software is furnished to do so, subject to the following
|
---|
45 | * conditions:
|
---|
46 | *
|
---|
47 | * The above copyright notice and this permission notice shall be
|
---|
48 | * included in all copies or substantial portions of the Software.
|
---|
49 | *
|
---|
50 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
51 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
---|
52 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
53 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
---|
54 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
---|
55 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
---|
56 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
---|
57 | * OTHER DEALINGS IN THE SOFTWARE.
|
---|
58 | */
|
---|