summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/cardmon/cardmon.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp
index e8072c6..6090b68 100644
--- a/core/applets/cardmon/cardmon.cpp
+++ b/core/applets/cardmon/cardmon.cpp
@@ -25,48 +25,51 @@
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26 26
27/* QT */ 27/* QT */
28#include <qcopchannel_qws.h> 28#include <qcopchannel_qws.h>
29#include <qpainter.h> 29#include <qpainter.h>
30#include <qfile.h> 30#include <qfile.h>
31#include <qtextstream.h> 31#include <qtextstream.h>
32#include <qsound.h> 32#include <qsound.h>
33#include <qtimer.h> 33#include <qtimer.h>
34 34
35/* STD */ 35/* STD */
36#include <stdio.h> 36#include <stdio.h>
37#include <unistd.h> 37#include <unistd.h>
38#include <stdlib.h> 38#include <stdlib.h>
39#include <string.h> 39#include <string.h>
40#include <fcntl.h> 40#include <fcntl.h>
41 41
42#if defined(_OS_LINUX_) || defined(Q_OS_LINUX) 42#if defined(_OS_LINUX_) || defined(Q_OS_LINUX)
43#include <sys/vfs.h> 43#include <sys/vfs.h>
44#include <mntent.h> 44#include <mntent.h>
45#endif 45#endif
46 46
47using namespace Opie; 47using namespace Opie;
48 48
49using namespace Opie::Ui;
50using namespace Opie::Core;
51
49CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), 52CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ),
50 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) 53 pm( Resource::loadPixmap( "cardmon/pcmcia" ) )
51{ 54{
52 55
53 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); 56 QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this );
54 connect( pcmciaChannel, 57 connect( pcmciaChannel,
55 SIGNAL( received(const QCString&,const QByteArray&) ), this, 58 SIGNAL( received(const QCString&,const QByteArray&) ), this,
56 SLOT( cardMessage(const QCString&,const QByteArray&) ) ); 59 SLOT( cardMessage(const QCString&,const QByteArray&) ) );
57 60
58 QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this ); 61 QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this );
59 connect( sdChannel, 62 connect( sdChannel,
60 SIGNAL( received(const QCString&,const QByteArray&) ), this, 63 SIGNAL( received(const QCString&,const QByteArray&) ), this,
61 SLOT( cardMessage(const QCString&,const QByteArray&) ) ); 64 SLOT( cardMessage(const QCString&,const QByteArray&) ) );
62 65
63 cardInPcmcia0 = FALSE; 66 cardInPcmcia0 = FALSE;
64 cardInPcmcia1 = FALSE; 67 cardInPcmcia1 = FALSE;
65 cardInSd = FALSE; 68 cardInSd = FALSE;
66 69
67 setFocusPolicy( NoFocus ); 70 setFocusPolicy( NoFocus );
68 71
69 setFixedWidth ( AppLnk::smallIconSize() ); 72 setFixedWidth ( AppLnk::smallIconSize() );
70 setFixedHeight ( AppLnk::smallIconSize() ); 73 setFixedHeight ( AppLnk::smallIconSize() );
71 74
72 getStatusPcmcia( TRUE ); 75 getStatusPcmcia( TRUE );
@@ -397,27 +400,27 @@ bool CardMonitor::getStatusSd( int showPopUp )
397void CardMonitor::paintEvent( QPaintEvent * ) 400void CardMonitor::paintEvent( QPaintEvent * )
398{ 401{
399 402
400 QPainter p( this ); 403 QPainter p( this );
401 404
402 if ( cardInPcmcia0 || cardInPcmcia1 || cardInSd ) 405 if ( cardInPcmcia0 || cardInPcmcia1 || cardInSd )
403 { 406 {
404 p.drawPixmap( 0, 0, pm ); 407 p.drawPixmap( 0, 0, pm );
405 show(); 408 show();
406 } 409 }
407 else 410 else
408 { 411 {
409 //p.eraseRect(rect()); 412 //p.eraseRect(rect());
410 hide(); 413 hide();
411 } 414 }
412} 415}
413 416
414int CardMonitor::position() 417int CardMonitor::position()
415{ 418{
416 return 7; 419 return 7;
417} 420}
418 421
419Q_EXPORT_INTERFACE() 422Q_EXPORT_INTERFACE()
420{ 423{
421 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<CardMonitor> ); 424 Q_CREATE_INSTANCE( Opie::Ui::Private::OTaskbarAppletWrapper<CardMonitor> );
422} 425}
423 426