]> Creatis software - clitk.git/blob - vv/QTreePushButton.h
remove antique RCS headers
[clitk.git] / vv / QTreePushButton.h
1 /*=========================================================================
2
3  Program:   vv
4  Language:  C++
5  Author :   Pierre Seroul (pierre.seroul@gmail.com)
6
7 Copyright (C) 2008
8 Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr
9 CREATIS-LRMN http://www.creatis.insa-lyon.fr
10
11 This program is free software: you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation, version 3 of the License.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
23 =========================================================================*/
24 #ifndef QTreePushButton_h
25 #define QTreePushButton_h
26
27 #include <QObject>
28 #include <QPushButton>
29 #include <QTreeWidgetItem>
30
31 class QTreePushButton : public QPushButton
32 {
33     Q_OBJECT
34
35 public:
36     QTreePushButton();
37
38     void setIndex(int index) {
39         m_index = index;
40     }
41     void setItem(QTreeWidgetItem* item) {
42         m_item = item;
43     }
44     void setColumn(int column) {
45         m_column = column;
46     }
47
48 public slots:
49     void clickedIntoATree();
50
51 signals:
52     void clickedInto(QTreeWidgetItem* item,int column);
53     void clickedInto(int index,int column);
54
55 private:
56     QTreeWidgetItem* m_item;
57     int m_index;
58     int m_column;
59 };
60 #endif