Diffstat (limited to 'core/apps/oapp/oappplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/oapp/oappplugin.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/core/apps/oapp/oappplugin.cpp b/core/apps/oapp/oappplugin.cpp new file mode 100644 index 0000000..934594f --- a/dev/null +++ b/core/apps/oapp/oappplugin.cpp | |||
@@ -0,0 +1,43 @@ | |||
1 | #include "oappinterface.h" | ||
2 | #include "oappplugin.h" | ||
3 | #include <qlist.h> | ||
4 | #include <qwidget.h> | ||
5 | #include <qpe/quuid.h> | ||
6 | |||
7 | OAppPlugin::OAppPlugin(OAppPos pos) | ||
8 | { | ||
9 | m_position = pos; | ||
10 | }; | ||
11 | |||
12 | OAppPlugin::OAppPlugin(QWidget *widget, OAppPos pos) | ||
13 | { | ||
14 | m_widgets.append( widget ); | ||
15 | m_position = pos; | ||
16 | }; | ||
17 | |||
18 | OAppPlugin::~OAppPlugin() | ||
19 | { | ||
20 | }; | ||
21 | |||
22 | QList<QWidget> OAppPlugin::widgets() | ||
23 | { | ||
24 | return m_widgets; | ||
25 | }; | ||
26 | |||
27 | OAppPos OAppPlugin::position() const | ||
28 | { | ||
29 | return m_position; | ||
30 | } | ||
31 | |||
32 | QRESULT OAppPlugin::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | ||
33 | { | ||
34 | *iface = 0; | ||
35 | if ( uuid == IID_QUnknown ) | ||
36 | *iface = this; | ||
37 | else if ( uuid == IID_OAppInterface ) | ||
38 | *iface = this; | ||
39 | |||
40 | if ( *iface ) | ||
41 | (*iface)->addRef(); | ||
42 | return QS_OK; | ||
43 | } | ||