Diffstat (limited to 'core/applets/cardmon/cardmonimpl.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/applets/cardmon/cardmonimpl.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/core/applets/cardmon/cardmonimpl.cpp b/core/applets/cardmon/cardmonimpl.cpp new file mode 100644 index 0000000..0aa55de --- a/dev/null +++ b/core/applets/cardmon/cardmonimpl.cpp | |||
@@ -0,0 +1,40 @@ | |||
1 | #include "cardmon.h" | ||
2 | #include "cardmonimpl.h" | ||
3 | |||
4 | |||
5 | CardMonitorImpl::CardMonitorImpl() | ||
6 | : cardMonitor(0), ref(0) { | ||
7 | } | ||
8 | |||
9 | CardMonitorImpl::~CardMonitorImpl() { | ||
10 | delete cardMonitor; | ||
11 | } | ||
12 | |||
13 | QWidget *CardMonitorImpl::applet( QWidget *parent ) { | ||
14 | if ( !cardMonitor ) { | ||
15 | cardMonitor = new CardMonitor( parent ); | ||
16 | } | ||
17 | return cardMonitor; | ||
18 | } | ||
19 | |||
20 | int CardMonitorImpl::position() const { | ||
21 | return 7; | ||
22 | } | ||
23 | |||
24 | QRESULT CardMonitorImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) { | ||
25 | *iface = 0; | ||
26 | if ( uuid == IID_QUnknown ) { | ||
27 | *iface = this; | ||
28 | } else if ( uuid == IID_TaskbarApplet ) { | ||
29 | *iface = this; | ||
30 | } | ||
31 | |||
32 | if ( *iface ) { | ||
33 | (*iface)->addRef(); | ||
34 | } | ||
35 | return QS_OK; | ||
36 | } | ||
37 | |||
38 | Q_EXPORT_INTERFACE() { | ||
39 | Q_CREATE_INSTANCE( CardMonitorImpl ) | ||
40 | } | ||