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) (unidiff)
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) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonapplet.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp
index 94d8428..38a744f 100644
--- a/kalarmd/simplealarmdaemonapplet.cpp
+++ b/kalarmd/simplealarmdaemonapplet.cpp
@@ -17,42 +17,43 @@ SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet()
17 delete mApplet; 17 delete mApplet;
18 mApplet = 0; 18 mApplet = 0;
19} 19}
20 20
21 21
22QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) 22QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent )
23{ 23{
24 if ( !mApplet ) { 24 if ( !mApplet ) {
25 mApplet = new SimpleAlarmDaemonImpl( parent ); 25 mApplet = new SimpleAlarmDaemonImpl( parent );
26 if ( QApplication::desktop()->width() < 480 ) 26 if ( QApplication::desktop()->width() < 480 )
27 mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); 27 mApplet->setPixmap( Resource::loadPixmap( "ko16" ) );
28 else 28 else
29 mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); 29 mApplet->setPixmap( Resource::loadPixmap( "ko24" ) );
30 QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; 30 QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ;
31 QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& ))); 31 QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& )));
32 mApplet->show(); 32 mApplet->show();
33 } 33 }
34 return mApplet; 34 return mApplet;
35} 35}
36 36
37int SimpleAlarmDaemonApplet::position() const 37int SimpleAlarmDaemonApplet::position() const
38{ 38{
39 return 7; 39 return 7;
40} 40}
41 41
42QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 42QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
43{ 43{
44 *iface = 0; 44 *iface = 0;
45 if ( uuid == IID_QUnknown ) 45 if ( uuid == IID_QUnknown )
46 *iface = this; 46 *iface = this;
47 else if ( uuid == IID_TaskbarApplet ) 47 else if ( uuid == IID_TaskbarApplet )
48 *iface = this; 48 *iface = this;
49 49 if ( *iface ) {
50 if ( *iface ) 50 //(*iface)->addRef();
51 (*iface)->addRef(); 51 return QS_OK;
52 return QS_OK; 52 }
53 return QE_NOCOMPONENT;
53} 54}
54 55
55Q_EXPORT_INTERFACE() 56Q_EXPORT_INTERFACE()
56{ 57{
57 Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) 58 Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet )
58} 59}