author | hakan <hakan> | 2002-05-07 10:43:49 (UTC) |
---|---|---|
committer | hakan <hakan> | 2002-05-07 10:43:49 (UTC) |
commit | cfe30703da090180b66bc571e85654c71a7ee8e0 (patch) (unidiff) | |
tree | d6954140f2208becb9a6beb5b8a21529bfd5bceb /libopie/oclickablelabel.h | |
parent | c9849cc04b668f1cda7a16d868299c436d1de042 (diff) | |
download | opie-cfe30703da090180b66bc571e85654c71a7ee8e0.zip opie-cfe30703da090180b66bc571e85654c71a7ee8e0.tar.gz opie-cfe30703da090180b66bc571e85654c71a7ee8e0.tar.bz2 |
Moved ClickableLabel to libopie/OClickableLabel
-rw-r--r-- | libopie/oclickablelabel.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libopie/oclickablelabel.h b/libopie/oclickablelabel.h new file mode 100644 index 0000000..f65c440 --- a/dev/null +++ b/libopie/oclickablelabel.h | |||
@@ -0,0 +1,30 @@ | |||
1 | #ifndef CLICKABLELABEL | ||
2 | #define CLICKABLELABEL | ||
3 | |||
4 | #include <qlabel.h> | ||
5 | |||
6 | class OClickableLabel: public QLabel | ||
7 | { | ||
8 | Q_OBJECT | ||
9 | public: | ||
10 | OClickableLabel(QWidget* parent = 0, const char* name = 0, | ||
11 | WFlags fl = 0); | ||
12 | void setToggleButton(bool t); | ||
13 | protected: | ||
14 | void mousePressEvent( QMouseEvent *e ); | ||
15 | void mouseReleaseEvent( QMouseEvent *e ); | ||
16 | void mouseMoveEvent( QMouseEvent *e ); | ||
17 | public slots: | ||
18 | void setOn(bool on); | ||
19 | signals: | ||
20 | void clicked(); | ||
21 | void toggled(bool on); | ||
22 | private: | ||
23 | bool isToggle; | ||
24 | bool isDown; | ||
25 | void showState(bool on); | ||
26 | bool textInverted; | ||
27 | void setInverted(bool on); | ||
28 | }; | ||
29 | |||
30 | #endif | ||