author | zautrix <zautrix> | 2004-10-27 13:36:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-27 13:36:25 (UTC) |
commit | e099c37ac90e95c5a3110941aaae2be229bccb8e (patch) (unidiff) | |
tree | dad2ae54474767c4c5797e1780c4a3fee8c132e5 /kalarmd/simplealarmdaemonapplet.cpp | |
parent | 2f3396d84d2f3c92e1e0e420d677892c1f9c0778 (diff) | |
download | kdepimpi-e099c37ac90e95c5a3110941aaae2be229bccb8e.zip kdepimpi-e099c37ac90e95c5a3110941aaae2be229bccb8e.tar.gz kdepimpi-e099c37ac90e95c5a3110941aaae2be229bccb8e.tar.bz2 |
wn view enhancements
Diffstat (limited to 'kalarmd/simplealarmdaemonapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kalarmd/simplealarmdaemonapplet.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kalarmd/simplealarmdaemonapplet.cpp b/kalarmd/simplealarmdaemonapplet.cpp index 7e8125d..94d8428 100644 --- a/kalarmd/simplealarmdaemonapplet.cpp +++ b/kalarmd/simplealarmdaemonapplet.cpp | |||
@@ -1,57 +1,58 @@ | |||
1 | #include "simplealarmdaemonapplet.h" | 1 | #include "simplealarmdaemonapplet.h" |
2 | 2 | ||
3 | #include "simplealarmdaemonimpl.h" | 3 | #include "simplealarmdaemonimpl.h" |
4 | 4 | ||
5 | #include <qcopchannel_qws.h> | 5 | #include <qcopchannel_qws.h> |
6 | #include <qlabel.h> | 6 | #include <qlabel.h> |
7 | #include <qapp.h> | 7 | #include <qapp.h> |
8 | #include <qpe/resource.h> | 8 | #include <qpe/resource.h> |
9 | SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() | 9 | SimpleAlarmDaemonApplet::SimpleAlarmDaemonApplet() |
10 | : mApplet( 0 ), ref( 0 ) | 10 | : mApplet( 0 ), ref( 0 ) |
11 | { | 11 | { |
12 | 12 | ||
13 | } | 13 | } |
14 | 14 | ||
15 | SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() | 15 | SimpleAlarmDaemonApplet::~SimpleAlarmDaemonApplet() |
16 | { | 16 | { |
17 | delete mApplet; | 17 | delete mApplet; |
18 | mApplet = 0; | ||
18 | } | 19 | } |
19 | 20 | ||
20 | 21 | ||
21 | QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) | 22 | QWidget *SimpleAlarmDaemonApplet::applet( QWidget *parent ) |
22 | { | 23 | { |
23 | if ( !mApplet ) { | 24 | if ( !mApplet ) { |
24 | mApplet = new SimpleAlarmDaemonImpl( parent ); | 25 | mApplet = new SimpleAlarmDaemonImpl( parent ); |
25 | if ( QApplication::desktop()->width() < 480 ) | 26 | if ( QApplication::desktop()->width() < 480 ) |
26 | mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); | 27 | mApplet->setPixmap( Resource::loadPixmap( "ko16" ) ); |
27 | else | 28 | else |
28 | mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); | 29 | mApplet->setPixmap( Resource::loadPixmap( "ko24" ) ); |
29 | QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; | 30 | QCopChannel* c = new QCopChannel("koalarm",mApplet , "channel" ) ; |
30 | 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& ))); |
31 | mApplet->show(); | 32 | mApplet->show(); |
32 | } | 33 | } |
33 | return mApplet; | 34 | return mApplet; |
34 | } | 35 | } |
35 | 36 | ||
36 | int SimpleAlarmDaemonApplet::position() const | 37 | int SimpleAlarmDaemonApplet::position() const |
37 | { | 38 | { |
38 | return 7; | 39 | return 7; |
39 | } | 40 | } |
40 | 41 | ||
41 | QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) | 42 | QRESULT SimpleAlarmDaemonApplet::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) |
42 | { | 43 | { |
43 | *iface = 0; | 44 | *iface = 0; |
44 | if ( uuid == IID_QUnknown ) | 45 | if ( uuid == IID_QUnknown ) |
45 | *iface = this; | 46 | *iface = this; |
46 | else if ( uuid == IID_TaskbarApplet ) | 47 | else if ( uuid == IID_TaskbarApplet ) |
47 | *iface = this; | 48 | *iface = this; |
48 | 49 | ||
49 | if ( *iface ) | 50 | if ( *iface ) |
50 | (*iface)->addRef(); | 51 | (*iface)->addRef(); |
51 | return QS_OK; | 52 | return QS_OK; |
52 | } | 53 | } |
53 | 54 | ||
54 | Q_EXPORT_INTERFACE() | 55 | Q_EXPORT_INTERFACE() |
55 | { | 56 | { |
56 | Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) | 57 | Q_CREATE_INSTANCE( SimpleAlarmDaemonApplet ) |
57 | } | 58 | } |