oclickablelabel.h
00001 #ifndef CLICKABLELABEL
00002 #define CLICKABLELABEL
00003
00004 #include <qlabel.h>
00005
00026 class OClickableLabel: public QLabel
00027 {
00028 Q_OBJECT
00029 public:
00030 OClickableLabel(QWidget* parent = 0, const char* name = 0,
00031 WFlags fl = 0);
00032 void setToggleButton(bool t);
00033
00034 protected:
00036 void mousePressEvent( QMouseEvent *e );
00038 void mouseReleaseEvent( QMouseEvent *e );
00040 void mouseMoveEvent( QMouseEvent *e );
00041
00042 public slots:
00043 void setOn(bool on);
00044 signals:
00048 void clicked();
00049
00054 void toggled(bool on);
00055 private:
00056 bool isToggle : 1;
00057 bool isDown : 1;
00058 bool textInverted : 1;
00059
00060 void showState(bool on);
00061 void setInverted(bool on);
00062
00063 private:
00064 class Private;
00065 Private *d;
00066 };
00067
00068 #endif
This file is part of the documentation for OPIE Version 1.1.