summaryrefslogtreecommitdiffabout
path: root/kalarmd/simplealarmdaemonapplet.cpp
Unidiff
Diffstat (limited to 'kalarmd/simplealarmdaemonapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kalarmd/simplealarmdaemonapplet.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp
index bb89606..7e8125d 100644
--- a/kalarmd/simplealarmdaemonapplet.cpp
+++ b/kalarmd/simplealarmdaemonapplet.cpp
@@ -1,58 +1,57 @@
1#include "simplealarmdaemonapplet.h" 1#include "simplealarmdaemonapplet.h"
2 2
3#include "simplealarmdaemonimpl.h" 3#include "simplealarmdaemonimpl.h"
4 4
5#include <qpe/global.h>
6#include <qcopchannel_qws.h> 5#include <qcopchannel_qws.h>
7#include <qlabel.h> 6#include <qlabel.h>
8#include <qapp.h> 7#include <qapp.h>
9#include <qpe/resource.h> 8#include <qpe/resource.h>
10SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() 9SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet()
11 : mApplet( 0 ), ref( 0 ) 10 : mApplet( 0 ), ref( 0 )
12{ 11{
13 12
14} 13}
15 14
16SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() 15SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet()
17{ 16{
18 delete mApplet; 17 delete mApplet;
19} 18}
20 19
21 20
22QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) 21QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent )
23{ 22{
24 if ( !mApplet ) { 23 if ( !mApplet ) {
25 mApplet = new SimpleAlarmDaemonImpl( parent ); 24 mApplet = new SimpleAlarmDaemonImpl( parent );
26 if ( QApplication::desktop()->width() < 480 ) 25 if ( QApplication::desktop()->width() < 480 )
27 mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); 26 mApplet->setPixmap( Resource::loadPixmap( "ko16" ) );
28 else 27 else
29 mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); 28 mApplet->setPixmap( Resource::loadPixmap( "ko24" ) );
30 QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; 29 QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ;
31 QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& ))); 30 QObject::connect( c, SIGNAL (received ( const QCString &, const QByteArray & )),mApplet, SLOT(recieve( const QCString&, const QByteArray& )));
32 mApplet->show(); 31 mApplet->show();
33 } 32 }
34 return mApplet; 33 return mApplet;
35} 34}
36 35
37int SimpleAlarmDaemonApplet::position() const 36int SimpleAlarmDaemonApplet::position() const
38{ 37{
39 return 7; 38 return 7;
40} 39}
41 40
42QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 41QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
43{ 42{
44 *iface = 0; 43 *iface = 0;
45 if ( uuid == IID_QUnknown ) 44 if ( uuid == IID_QUnknown )
46 *iface = this; 45 *iface = this;
47 else if ( uuid == IID_TaskbarApplet ) 46 else if ( uuid == IID_TaskbarApplet )
48 *iface = this; 47 *iface = this;
49 48
50 if ( *iface ) 49 if ( *iface )
51 (*iface)->addRef(); 50 (*iface)->addRef();
52 return QS_OK; 51 return QS_OK;
53} 52}
54 53
55Q_EXPORT_INTERFACE() 54Q_EXPORT_INTERFACE()
56{ 55{
57 Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) 56 Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet )
58} 57}