summaryrefslogtreecommitdiff
path: root/noncore/applets/autorotateapplet/autorotateimpl.cpp
Unidiff
Diffstat (limited to 'noncore/applets/autorotateapplet/autorotateimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/autorotateapplet/autorotateimpl.cpp41
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 @@
1#include "autorotate.h"
2#include "autorotateimpl.h"
3
4
5AutoRotateImpl::AutoRotateImpl()
6 : autoRotate(0), ref(0) {
7 qDebug ("here");
8}
9
10AutoRotateImpl::~AutoRotateImpl() {
11 delete autoRotate;
12}
13
14QWidget *AutoRotateImpl::applet( QWidget *parent ) {
15 if ( !autoRotate ) {
16 autoRotate = new AutoRotate( parent );
17 }
18 return autoRotate;
19}
20
21int AutoRotateImpl::position() const {
22 return 7;
23}
24
25QRESULT AutoRotateImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) {
26 *iface = 0;
27 if ( uuid == IID_QUnknown ) {
28 *iface = this;
29 } else if ( uuid == IID_TaskbarApplet ) {
30 *iface = this;
31 }
32
33 if ( *iface ) {
34 (*iface)->addRef();
35 }
36 return QS_OK;
37}
38
39Q_EXPORT_INTERFACE() {
40 Q_CREATE_INSTANCE( AutoRotateImpl )
41}