summaryrefslogtreecommitdiff
path: root/examples/applet/simpleimpl.h
authorzecke <zecke>2004-03-14 20:08:59 (UTC)
committer zecke <zecke>2004-03-14 20:08:59 (UTC)
commit0d79c003839718ae70b3b997162044abd5c26bf6 (patch) (unidiff)
tree19708b041da3a09df8f3b571cd634a846f4ad6d7 /examples/applet/simpleimpl.h
parent05c8d999941989a97a581fb5822437034ec10fd7 (diff)
downloadopie-0d79c003839718ae70b3b997162044abd5c26bf6.zip
opie-0d79c003839718ae70b3b997162044abd5c26bf6.tar.gz
opie-0d79c003839718ae70b3b997162044abd5c26bf6.tar.bz2
Update the Examples
Diffstat (limited to 'examples/applet/simpleimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/applet/simpleimpl.h23
1 files changed, 2 insertions, 21 deletions
diff --git a/examples/applet/simpleimpl.h b/examples/applet/simpleimpl.h
index f58e2af..90c632f 100644
--- a/examples/applet/simpleimpl.h
+++ b/examples/applet/simpleimpl.h
@@ -14,12 +14,13 @@
14 * a dynamic shared object ( dso / plugin ) 14 * a dynamic shared object ( dso / plugin )
15 * For tasks like loading Applications, InputMethods, Today, MenuButton, 15 * For tasks like loading Applications, InputMethods, Today, MenuButton,
16 * Taskbar, Style, Email Client there are specefic Interfaces you 16 * Taskbar, Style, Email Client there are specefic Interfaces you
17 * need to implement. The interfaces inherits from QUnknownInterface and 17 * need to implement. The interfaces inherits from QUnknownInterface and
18 * you'll need inherit from the interface. 18 * you'll need inherit from the interface.
19 * As example we will use the Taskbar interface 19 * As example we will use the Taskbar interface
20 * the OTaskBarAppletWrapper implements the factory for us
20 */ 21 */
21 22
22#ifndef SIMPLE_OPIE_EXAMPLE_APPLET_H 23#ifndef SIMPLE_OPIE_EXAMPLE_APPLET_H
23#define SIMPLE_OPIE_EXAMPLE_APPLET_H 24#define SIMPLE_OPIE_EXAMPLE_APPLET_H
24 25
25/* 26/*
@@ -42,36 +43,16 @@
42 */ 43 */
43class SimpleApplet : public QWidget { 44class SimpleApplet : public QWidget {
44 Q_OBJECT 45 Q_OBJECT
45public: 46public:
46 SimpleApplet(QWidget *parent); 47 SimpleApplet(QWidget *parent);
47 ~SimpleApplet(); 48 ~SimpleApplet();
49 static int position();
48private: 50private:
49 void mousePressEvent( QMouseEvent* ); 51 void mousePressEvent( QMouseEvent* );
50 void paintEvent( QPaintEvent* ); 52 void paintEvent( QPaintEvent* );
51 QPixmap *m_pix; 53 QPixmap *m_pix;
52}; 54};
53 55
54class SimpleAppletImpl : public TaskbarAppletInterface {
55public:
56
57 SimpleAppletImpl();
58 virtual ~SimpleAppletImpl();
59
60 QRESULT queryInterface( const QUuid&, QUnknownInterface** );
61
62 QWidget *applet( QWidget* parent );
63 int position()const;
64
65 /*
66 * macro for reference countint
67 * if reference drops to zero
68 * delete this is called
69 */
70 Q_REFCOUNT
71
72private:
73 QList<SimpleApplet> m_applets;
74};
75 56
76 57
77#endif 58#endif