Diffstat (limited to 'noncore/net/mail/taskbarapplet/mailappletimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/taskbarapplet/mailappletimpl.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
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 @@ | |||
1 | #include "mailappletimpl.h" | ||
2 | #include "mailapplet.h" | ||
3 | |||
4 | MailAppletImpl::MailAppletImpl() | ||
5 | : m_mailApplet(0), ref(0) { | ||
6 | |||
7 | } | ||
8 | |||
9 | MailAppletImpl::~MailAppletImpl() { | ||
10 | delete m_mailApplet; | ||
11 | } | ||
12 | |||
13 | QWidget *MailAppletImpl::applet(QWidget *parent) { | ||
14 | if (!m_mailApplet) m_mailApplet = new MailApplet(parent); | ||
15 | return m_mailApplet; | ||
16 | } | ||
17 | |||
18 | int MailAppletImpl::position() const { | ||
19 | return 4; | ||
20 | } | ||
21 | |||
22 | QRESULT MailAppletImpl::queryInterface(const QUuid &uuid, QUnknownInterface **iface) { | ||
23 | *iface = 0; | ||
24 | if (uuid == IID_QUnknown) *iface = this; | ||
25 | else if (uuid == IID_TaskbarApplet) *iface = this; | ||
26 | |||
27 | if (*iface) (*iface)->addRef(); | ||
28 | return QS_OK; | ||
29 | } | ||
30 | |||
31 | Q_EXPORT_INTERFACE() { | ||
32 | Q_CREATE_INSTANCE( MailAppletImpl ) | ||
33 | } | ||