itom
Loading...
Searching...
No Matches
treeComboBox.h
1/* ********************************************************************
2 itom software
3 URL: http://www.uni-stuttgart.de/ito
4 Copyright (C) 2020, Institut für Technische Optik (ITO),
5 Universität Stuttgart, Germany
6
7 This file is part of itom and its software development toolkit (SDK).
8
9 itom is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Library General Public Licence as published by
11 the Free Software Foundation; either version 2 of the Licence, or (at
12 your option) any later version.
13
14 In addition, as a special exception, the Institut für Technische
15 Optik (ITO) gives you certain additional rights.
16 These rights are described in the ITO LGPL Exception version 1.0,
17 which can be found in the file LGPL_EXCEPTION.txt in this package.
18
19 itom is distributed in the hope that it will be useful, but
20 WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
22 General Public Licence for more details.
23
24 You should have received a copy of the GNU Library General Public License
25 along with itom. If not, see <http://www.gnu.org/licenses/>.
26
27 This file is a port and modified version of the
28 Common framework (http://www.commontk.org)
29*********************************************************************** */
30
31#ifndef TREECOMBOBOX_H
32#define TREECOMBOBOX_H
33
34// Qt includes
35#include <QComboBox>
36
37// CTK includes
38//#include <ctkPimpl.h>
39
40#include "commonWidgets.h"
41
43class QTreeView;
44
60class ITOMWIDGETS_EXPORT TreeComboBox : public QComboBox
61{
62 Q_OBJECT
65 Q_PROPERTY(int visibleModelColumn READ visibleModelColumn WRITE setVisibleModelColumn)
66public:
67 typedef QComboBox Superclass;
68 explicit TreeComboBox(QWidget* parent = 0);
69 virtual ~TreeComboBox();
70
71 int visibleModelColumn()const;
72 void setVisibleModelColumn(int index);
73
74 virtual bool eventFilter(QObject* object, QEvent* event);
75 virtual void showPopup();
76 virtual void hidePopup();
77
81 QTreeView* treeView()const;
82
83protected:
84 virtual void paintEvent(QPaintEvent*);
85
86protected Q_SLOTS:
87 void resizePopup();
88
89signals:
90 void popupShow();
91 void popupHide();
92
93protected:
94 QScopedPointer<TreeComboBoxPrivate> d_ptr;
95
96private:
97 Q_DECLARE_PRIVATE(TreeComboBox);
98 Q_DISABLE_COPY(TreeComboBox);
99};
100
101#endif
Definition treeComboBox.h:61
Definition treeComboBox.cpp:51