author | treke <treke> | 2003-12-09 03:23:20 (UTC) |
---|---|---|
committer | treke <treke> | 2003-12-09 03:23:20 (UTC) |
commit | 1538a521b674d2eff02b926c0d82fa6184dd99db (patch) (side-by-side diff) | |
tree | c4e0c870e034275c31c901578f1e09527bc3361d /noncore/applets/autorotateapplet/autorotateimpl.cpp | |
parent | 0526dfbd3053dd89706f615e2549adfea8b87553 (diff) | |
download | opie-1538a521b674d2eff02b926c0d82fa6184dd99db.zip opie-1538a521b674d2eff02b926c0d82fa6184dd99db.tar.gz opie-1538a521b674d2eff02b926c0d82fa6184dd99db.tar.bz2 |
Applet for turning on and off automatic rotation
Diffstat (limited to 'noncore/applets/autorotateapplet/autorotateimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/autorotateapplet/autorotateimpl.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/noncore/applets/autorotateapplet/autorotateimpl.cpp b/noncore/applets/autorotateapplet/autorotateimpl.cpp new file mode 100644 index 0000000..01d8a01 --- a/dev/null +++ b/noncore/applets/autorotateapplet/autorotateimpl.cpp @@ -0,0 +1,41 @@ +#include "autorotate.h" +#include "autorotateimpl.h" + + +AutoRotateImpl::AutoRotateImpl() + : autoRotate(0), ref(0) { + qDebug ("here"); +} + +AutoRotateImpl::~AutoRotateImpl() { + delete autoRotate; +} + +QWidget *AutoRotateImpl::applet( QWidget *parent ) { + if ( !autoRotate ) { + autoRotate = new AutoRotate( parent ); + } + return autoRotate; +} + +int AutoRotateImpl::position() const { + return 7; +} + +QRESULT AutoRotateImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { + *iface = 0; + if ( uuid == IID_QUnknown ) { + *iface = this; + } else if ( uuid == IID_TaskbarApplet ) { + *iface = this; + } + + if ( *iface ) { + (*iface)->addRef(); + } + return QS_OK; +} + +Q_EXPORT_INTERFACE() { + Q_CREATE_INSTANCE( AutoRotateImpl ) +} |