summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonapplet.cpp
authorzautrix <zautrix>2004-10-27 15:32:48 (UTC)
committer zautrix <zautrix>2004-10-27 15:32:48 (UTC)
commitfd728bc89b6a04fac0bbc590da7dd6f488822ef6 (patch) (side-by-side diff)
tree74e0cb5f3b06348971aac8f3f236926358eb3437 /kalarmd/simplealarmdaemonapplet.cpp
parente099c37ac90e95c5a3110941aaae2be229bccb8e (diff)
downloadkdepimpi-fd728bc89b6a04fac0bbc590da7dd6f488822ef6.zip
kdepimpi-fd728bc89b6a04fac0bbc590da7dd6f488822ef6.tar.gz
kdepimpi-fd728bc89b6a04fac0bbc590da7dd6f488822ef6.tar.bz2
fixed apalm apllet
Diffstat (limited to 'kalarmd/simplealarmdaemonapplet.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonapplet.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp
index 94d8428..38a744f 100644
--- a/kalarmd/simplealarmdaemonapplet.cpp
+++ b/kalarmd/simplealarmdaemonapplet.cpp
@@ -1,58 +1,59 @@
#include "simplealarmdaemonapplet.h"
#include "simplealarmdaemonimpl.h"
#include <qcopchannel_qws.h>
#include <qlabel.h>
#include <qapp.h>
#include <qpe/resource.h>
SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet()
: mApplet( 0 ), ref( 0 )
{
}
SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet()
{
delete mApplet;
mApplet = 0;
}
QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent )
{
if ( !mApplet ) {
mApplet = new SimpleAlarmDaemonImpl( parent );
if ( QApplication::desktop()->width() < 480 )
mApplet->setPixmap( Resource::loadPixmap( "ko16" ) );
else
mApplet->setPixmap( Resource::loadPixmap( "ko24" ) );
QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ;
QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& )));
mApplet->show();
}
return mApplet;
}
int SimpleAlarmDaemonApplet::position() const
{
return 7;
}
QRESULT SimpleAlarmDaemonApplet::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();
+ if ( *iface ) {
+ //(*iface)->addRef();
return QS_OK;
}
+ return QE_NOCOMPONENT;
+}
Q_EXPORT_INTERFACE()
{
Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet )
}