-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 @@ -1,52 +1,52 @@ #include "oclickablelabel.h" #include <stdio.h> OClickableLabel::OClickableLabel(QWidget* parent, const char* name, WFlags fl) : QLabel(parent,name,fl) { textInverted=false; isToggle=false; isDown=false; showState(false); setFrameShadow(Sunken); } void OClickableLabel::setToggleButton(bool t) { isToggle=t; } -void OClickableLabel::mousePressEvent( QMouseEvent *e ) { +void OClickableLabel::mousePressEvent( QMouseEvent * /*e*/ ) { if (isToggle && isDown) { showState(false); } else { showState(true); } } void OClickableLabel::mouseReleaseEvent( QMouseEvent *e ) { if (rect().contains(e->pos()) && isToggle) isDown=!isDown; if (isToggle && isDown) { showState(true); } else { showState(false); } if (rect().contains(e->pos())) { if (isToggle) { emit toggled(isDown); } emit clicked(); } } void OClickableLabel::mouseMoveEvent( QMouseEvent *e ) { if (rect().contains(e->pos())) { if (isToggle && isDown) { showState(false); } else { showState(true); } } else { |