From 2ebf36bb85cb9a38348286b31492adf65fa792e3 Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 04 Jan 2004 12:14:32 +0000 Subject: beginning of the mail taskbar applet --- (limited to 'noncore/net/mail/taskbarapplet/mailappletimpl.cpp') diff --git a/noncore/net/mail/taskbarapplet/mailappletimpl.cpp b/noncore/net/mail/taskbarapplet/mailappletimpl.cpp new file mode 100644 index 0000000..26f6a6f --- a/dev/null +++ b/noncore/net/mail/taskbarapplet/mailappletimpl.cpp @@ -0,0 +1,33 @@ +#include "mailappletimpl.h" +#include "mailapplet.h" + +MailAppletImpl::MailAppletImpl() + : m_mailApplet(0), ref(0) { + +} + +MailAppletImpl::~MailAppletImpl() { + delete m_mailApplet; +} + +QWidget *MailAppletImpl::applet(QWidget *parent) { + if (!m_mailApplet) m_mailApplet = new MailApplet(parent); + return m_mailApplet; +} + +int MailAppletImpl::position() const { + return 4; +} + +QRESULT MailAppletImpl::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( MailAppletImpl ) +} -- cgit v0.9.0.2