-rw-r--r-- | libopie/oclickablelabel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/oclickablelabel.cpp b/libopie/oclickablelabel.cpp index 43a0524..5768529 100644 --- a/libopie/oclickablelabel.cpp +++ b/libopie/oclickablelabel.cpp | |||
@@ -4,33 +4,33 @@ | |||
4 | OClickableLabel::OClickableLabel(QWidget* parent, | 4 | OClickableLabel::OClickableLabel(QWidget* parent, |
5 | const char* name, | 5 | const char* name, |
6 | WFlags fl) : | 6 | WFlags fl) : |
7 | QLabel(parent,name,fl) | 7 | QLabel(parent,name,fl) |
8 | { | 8 | { |
9 | textInverted=false; | 9 | textInverted=false; |
10 | isToggle=false; | 10 | isToggle=false; |
11 | isDown=false; | 11 | isDown=false; |
12 | showState(false); | 12 | showState(false); |
13 | setFrameShadow(Sunken); | 13 | setFrameShadow(Sunken); |
14 | } | 14 | } |
15 | 15 | ||
16 | void OClickableLabel::setToggleButton(bool t) { | 16 | void OClickableLabel::setToggleButton(bool t) { |
17 | isToggle=t; | 17 | isToggle=t; |
18 | } | 18 | } |
19 | 19 | ||
20 | void OClickableLabel::mousePressEvent( QMouseEvent *e ) { | 20 | void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) { |
21 | if (isToggle && isDown) { | 21 | if (isToggle && isDown) { |
22 | showState(false); | 22 | showState(false); |
23 | } else { | 23 | } else { |
24 | showState(true); | 24 | showState(true); |
25 | } | 25 | } |
26 | } | 26 | } |
27 | 27 | ||
28 | void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { | 28 | void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { |
29 | if (rect().contains(e->pos()) && isToggle) isDown=!isDown; | 29 | if (rect().contains(e->pos()) && isToggle) isDown=!isDown; |
30 | 30 | ||
31 | if (isToggle && isDown) { | 31 | if (isToggle && isDown) { |
32 | showState(true); | 32 | showState(true); |
33 | } else { | 33 | } else { |
34 | showState(false); | 34 | showState(false); |
35 | } | 35 | } |
36 | 36 | ||