summaryrefslogtreecommitdiff
path: root/core/applets/cardmon/cardmonimpl.cpp
authorharlekin <harlekin>2002-05-27 23:48:06 (UTC)
committer harlekin <harlekin>2002-05-27 23:48:06 (UTC)
commitac5b5e7ecd8972f867aa4c3fa2b055f5789842c1 (patch) (side-by-side diff)
treeeee536a678c92265122f980d94ea5a0f5448d840 /core/applets/cardmon/cardmonimpl.cpp
parenta184f648795a3fa27ad8ce1d1ac3cd4a30c7b8ba (diff)
downloadopie-ac5b5e7ecd8972f867aa4c3fa2b055f5789842c1.zip
opie-ac5b5e7ecd8972f867aa4c3fa2b055f5789842c1.tar.gz
opie-ac5b5e7ecd8972f867aa4c3fa2b055f5789842c1.tar.bz2
new cf/pcmcia/sd/mmc applet, not finished yet, but working (kind off ,-) ) , will replace the old cardmon and sdmon when ready
Diffstat (limited to 'core/applets/cardmon/cardmonimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/cardmon/cardmonimpl.cpp40
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 @@
+#include "cardmon.h"
+#include "cardmonimpl.h"
+
+
+CardMonitorImpl::CardMonitorImpl()
+ : cardMonitor(0), ref(0) {
+}
+
+CardMonitorImpl::~CardMonitorImpl() {
+ delete cardMonitor;
+}
+
+QWidget *CardMonitorImpl::applet( QWidget *parent ) {
+ if ( !cardMonitor ) {
+ cardMonitor = new CardMonitor( parent );
+ }
+ return cardMonitor;
+}
+
+int CardMonitorImpl::position() const {
+ return 7;
+}
+
+QRESULT CardMonitorImpl::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( CardMonitorImpl )
+}