author | kergoth <kergoth> | 2003-05-13 20:02:32 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2003-05-13 20:02:32 (UTC) |
commit | 4dd58bba07b8bf3a52c3a0464675c39cc5153c85 (patch) (side-by-side diff) | |
tree | a9031549d675f3c108f05b06d2fcdd62f2433c7e /core/apps/oapp/oappplugin.cpp | |
parent | ad81c3ef20399c22663e67c5ac09aae4d0aeda21 (diff) | |
download | opie-4dd58bba07b8bf3a52c3a0464675c39cc5153c85.zip opie-4dd58bba07b8bf3a52c3a0464675c39cc5153c85.tar.gz opie-4dd58bba07b8bf3a52c3a0464675c39cc5153c85.tar.bz2 |
Add beginnings of a new plugin interface.
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 @@ +#include "oappinterface.h" +#include "oappplugin.h" +#include <qlist.h> +#include <qwidget.h> +#include <qpe/quuid.h> + +OAppPlugin::OAppPlugin(OAppPos pos) +{ + m_position = pos; +}; + +OAppPlugin::OAppPlugin(QWidget *widget, OAppPos pos) +{ + m_widgets.append( widget ); + m_position = pos; +}; + +OAppPlugin::~OAppPlugin() +{ +}; + +QList<QWidget> OAppPlugin::widgets() +{ + return m_widgets; +}; + +OAppPos OAppPlugin::position() const +{ + return m_position; +} + +QRESULT OAppPlugin::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) +{ + *iface = 0; + if ( uuid == IID_QUnknown ) + *iface = this; + else if ( uuid == IID_OAppInterface ) + *iface = this; + + if ( *iface ) + (*iface)->addRef(); + return QS_OK; +} |