summaryrefslogtreecommitdiff
path: root/noncore/net/mail/taskbarapplet/mailappletimpl.cpp
blob: 26f6a6f41205ac84879895b6409d7cf69766b80d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 )
}