summaryrefslogtreecommitdiff
path: root/libopie/oclickablelabel.h
authormickeyl <mickeyl>2004-11-16 19:14:18 (UTC)
committer mickeyl <mickeyl>2004-11-16 19:14:18 (UTC)
commitea3945a9bd8f9830f70b1efa133f9df13b19362f (patch) (unidiff)
treef2ea22cc50e9aa8aa73ee7dea148f41c563c9666 /libopie/oclickablelabel.h
parent1c6f490e8541626f68422e0a3a7c7281d7f5b7d3 (diff)
downloadopie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.zip
opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.gz
opie-ea3945a9bd8f9830f70b1efa133f9df13b19362f.tar.bz2
libopie1 goes into unsupported
Diffstat (limited to 'libopie/oclickablelabel.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/oclickablelabel.h68
1 files changed, 0 insertions, 68 deletions
diff --git a/libopie/oclickablelabel.h b/libopie/oclickablelabel.h
deleted file mode 100644
index f93ade0..0000000
--- a/libopie/oclickablelabel.h
+++ b/dev/null
@@ -1,68 +0,0 @@
1#ifndef CLICKABLELABEL
2#define CLICKABLELABEL
3
4#include <qlabel.h>
5
6/**
7 * This class is a special QLabel which can behave
8 * as a QPushButton or QToggleButton.
9 * The reason to use a clickable is if you want to save space
10 * or you want to skip the border of a normal button
11 *
12 * <pre>
13 * QLabel* lbl = new OClickableLabel( parent, "PushLabel" );
14 * lbl->setPixmap( "config" );
15 * QWhatsThis::add( lbl, tr("Click here to do something") );
16 * </pre>
17 *
18 * @short A Label behaving as button
19 * @author Hakan Ardo, Maximillian Reiß ( harlekin@handhelds.org )
20 * @see QLabel
21 * @see QPushButton
22 * @see QToggleButton
23 * @version 1.0
24 */
25
26class OClickableLabel: public QLabel
27{
28 Q_OBJECT
29public:
30 OClickableLabel(QWidget* parent = 0, const char* name = 0,
31 WFlags fl = 0);
32 void setToggleButton(bool t);
33
34 protected:
35 /** @internal */
36 void mousePressEvent( QMouseEvent *e );
37 /** @internal */
38 void mouseReleaseEvent( QMouseEvent *e );
39 /** @internal */
40 void mouseMoveEvent( QMouseEvent *e );
41
42 public slots:
43 void setOn(bool on);
44 signals:
45 /**
46 * emitted when the labels gets clicked
47 */
48 void clicked();
49
50 /**
51 * emitted when the labels gets toggled
52 * @param on the new new state of the label
53 */
54 void toggled(bool on);
55 private:
56 bool isToggle : 1;
57 bool isDown : 1;
58 bool textInverted : 1;
59
60 void showState(bool on);
61 void setInverted(bool on);
62
63 private:
64 class Private;
65 Private *d; // private d pointer
66};
67
68#endif