author | unc0rr |
Sun, 27 Feb 2011 21:06:28 +0300 | |
changeset 4968 | 8e1673f0dc05 |
parent 3061 | e129e4c3f30e |
child 4976 | 088d40d8aba2 |
permissions | -rw-r--r-- |
1932 | 1 |
/* |
2 |
* Hedgewars, a free turn based strategy game |
|
3 |
* Copyright (c) 2009 Kristian Lehmann <email@thexception.net> |
|
4 |
* |
|
5 |
* This program is free software; you can redistribute it and/or modify |
|
6 |
* it under the terms of the GNU General Public License as published by |
|
7 |
* the Free Software Foundation; version 2 of the License |
|
8 |
* |
|
9 |
* This program is distributed in the hope that it will be useful, |
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
12 |
* GNU General Public License for more details. |
|
13 |
* |
|
14 |
* You should have received a copy of the GNU General Public License |
|
15 |
* along with this program; if not, write to the Free Software |
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef TOGGLEBUTTONWIDGET_H |
|
20 |
#define TOGGLEBUTTONWIDGET_H |
|
21 |
||
22 |
#include <QWidget> |
|
23 |
#include <QPainter> |
|
24 |
#include <QPushButton> |
|
25 |
#include <QVBoxLayout> |
|
26 |
#include <QLabel> |
|
27 |
||
3061 | 28 |
class ToggleButtonWidget : public QPushButton |
1932 | 29 |
{ |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
1932
diff
changeset
|
30 |
Q_OBJECT |
1932 | 31 |
public: |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
1932
diff
changeset
|
32 |
ToggleButtonWidget(QWidget * parent, QString img); |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
1932
diff
changeset
|
33 |
~ToggleButtonWidget(); |
1932 | 34 |
private: |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
1932
diff
changeset
|
35 |
QPixmap pmChecked; |
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
1932
diff
changeset
|
36 |
QPixmap pmDisabled; |
1932 | 37 |
private slots: |
2948
3f21a9dc93d0
Replace tabs with spaces using 'expand -t 4' command
unc0rr
parents:
1932
diff
changeset
|
38 |
void eventToggled(bool checked); |
1932 | 39 |
}; |
40 |
||
41 |
#endif // TOGGLEBUTTONWIDGET_H |