Diffstat (limited to 'examples/applet/simpleimpl.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | examples/applet/simpleimpl.h | 23 |
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 | |||
@@ -16,8 +16,9 @@ | |||
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 |
@@ -44,34 +45,14 @@ class SimpleApplet : public QWidget { | |||
44 | Q_OBJECT | 45 | Q_OBJECT |
45 | public: | 46 | public: |
46 | SimpleApplet(QWidget *parent); | 47 | SimpleApplet(QWidget *parent); |
47 | ~SimpleApplet(); | 48 | ~SimpleApplet(); |
49 | static int position(); | ||
48 | private: | 50 | private: |
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 | ||
54 | class SimpleAppletImpl : public TaskbarAppletInterface { | ||
55 | public: | ||
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 | |||
72 | private: | ||
73 | QList<SimpleApplet> m_applets; | ||
74 | }; | ||
75 | 56 | ||
76 | 57 | ||
77 | #endif | 58 | #endif |