Diffstat (limited to 'libopie2/opieui/oclickablelabel.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opieui/oclickablelabel.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libopie2/opieui/oclickablelabel.h b/libopie2/opieui/oclickablelabel.h index b224d61..90859a0 100644 --- a/libopie2/opieui/oclickablelabel.h +++ b/libopie2/opieui/oclickablelabel.h | |||
@@ -12,50 +12,50 @@ | |||
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
26 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
27 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef OCLICKABLELABEL_H | 30 | #ifndef OCLICKABLELABEL_H |
31 | #define OCLICKABLELABEL_H | 31 | #define OCLICKABLELABEL_H |
32 | 32 | ||
33 | /* QT */ | 33 | /* QT */ |
34 | #include <qlabel.h> | 34 | #include <qlabel.h> |
35 | 35 | ||
36 | namespace Opie | 36 | namespace Opie{ |
37 | { | 37 | namespace Ui { |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * This class is a special QLabel which can behave | 40 | * This class is a special QLabel which can behave |
41 | * as a QPushButton or QToggleButton. | 41 | * as a QPushButton or QToggleButton. |
42 | * The reason to use a clickable is if you want to save space | 42 | * The reason to use a clickable is if you want to save space |
43 | * or you want to skip the border of a normal button | 43 | * or you want to skip the border of a normal button |
44 | * | 44 | * |
45 | * <pre> | 45 | * <pre> |
46 | * QLabel* lbl = new OClickableLabel( parent, "PushLabel" ); | 46 | * QLabel* lbl = new OClickableLabel( parent, "PushLabel" ); |
47 | * lbl->setPixmap( "config" ); | 47 | * lbl->setPixmap( "config" ); |
48 | * QWhatsThis::add( lbl, tr("Click here to do something") ); | 48 | * QWhatsThis::add( lbl, tr("Click here to do something") ); |
49 | * </pre> | 49 | * </pre> |
50 | * | 50 | * |
51 | * @short A Label behaving as button | 51 | * @short A Label behaving as button |
52 | * @author Hakan Ardo, Maximillian Reiß ( harlekin@handhelds.org ) | 52 | * @author Hakan Ardo, Maximillian Reiß ( harlekin@handhelds.org ) |
53 | * @see QLabel | 53 | * @see QLabel |
54 | * @see QPushButton | 54 | * @see QPushButton |
55 | * @see QToggleButton | 55 | * @see QToggleButton |
56 | * @version 1.0 | 56 | * @version 1.0 |
57 | */ | 57 | */ |
58 | 58 | ||
59 | class OClickableLabel: public QLabel | 59 | class OClickableLabel: public QLabel |
60 | { | 60 | { |
61 | Q_OBJECT | 61 | Q_OBJECT |
@@ -77,27 +77,28 @@ public slots: | |||
77 | signals: | 77 | signals: |
78 | /** | 78 | /** |
79 | * emitted when the labels gets clicked | 79 | * emitted when the labels gets clicked |
80 | */ | 80 | */ |
81 | void clicked(); | 81 | void clicked(); |
82 | 82 | ||
83 | /** | 83 | /** |
84 | * emitted when the labels gets toggled | 84 | * emitted when the labels gets toggled |
85 | * @param on the new new state of the label | 85 | * @param on the new new state of the label |
86 | */ | 86 | */ |
87 | void toggled(bool on); | 87 | void toggled(bool on); |
88 | private: | 88 | private: |
89 | bool isToggle : 1; | 89 | bool isToggle : 1; |
90 | bool isDown : 1; | 90 | bool isDown : 1; |
91 | bool textInverted : 1; | 91 | bool textInverted : 1; |
92 | 92 | ||
93 | void showState(bool on); | 93 | void showState(bool on); |
94 | void setInverted(bool on); | 94 | void setInverted(bool on); |
95 | 95 | ||
96 | private: | 96 | private: |
97 | class Private; | 97 | class Private; |
98 | Private *d; // private d pointer | 98 | Private *d; // private d pointer |
99 | }; | 99 | }; |
100 | 100 | ||
101 | }; | 101 | } |
102 | } | ||
102 | 103 | ||
103 | #endif | 104 | #endif |