summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/cardmon/cardmon.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp
index ffead4d..e94f1dc 100644
--- a/core/applets/cardmon/cardmon.cpp
+++ b/core/applets/cardmon/cardmon.cpp
@@ -44,49 +44,49 @@ CardMonitor::CardMonitor( QWidget *parent ) : QWidget( parent ),
44 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) { 44 pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) {
45 45
46 QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this ); 46 QCopChannel* pcmciaChannel = new QCopChannel( "QPE/Card", this );
47 connect( pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)), 47 connect( pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)),
48 this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); 48 this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
49 49
50 QCopChannel* sdChannel = new QCopChannel( "QPE/Card", this ); 50 QCopChannel* sdChannel = new QCopChannel( "QPE/Card", this );
51 connect( sdChannel, SIGNAL(received(const QCString &, const QByteArray &)), 51 connect( sdChannel, SIGNAL(received(const QCString &, const QByteArray &)),
52 this, SLOT(cardMessage( const QCString &, const QByteArray &)) ); 52 this, SLOT(cardMessage( const QCString &, const QByteArray &)) );
53 53
54 cardInPcmcia0 = FALSE; 54 cardInPcmcia0 = FALSE;
55 cardInPcmcia1 = FALSE; 55 cardInPcmcia1 = FALSE;
56 56
57 setFixedSize( pm.size() ); 57 setFixedSize( pm.size() );
58 getStatusPcmcia(TRUE); 58 getStatusPcmcia(TRUE);
59 getStatusSd(TRUE); 59 getStatusSd(TRUE);
60 repaint(FALSE); 60 repaint(FALSE);
61 popupMenu = 0; 61 popupMenu = 0;
62} 62}
63 63
64CardMonitor::~CardMonitor() { 64CardMonitor::~CardMonitor() {
65 if( popupMenu ) { delete popupMenu; } 65 if( popupMenu ) { delete popupMenu; }
66} 66}
67 67
68void CardMonitor::popUp( QString message, QString icon = QString::null ) { 68void CardMonitor::popUp( QString message, QString icon ) {
69 if ( ! popupMenu ) { 69 if ( ! popupMenu ) {
70 popupMenu = new QPopupMenu(); 70 popupMenu = new QPopupMenu();
71 } 71 }
72 popupMenu->clear(); 72 popupMenu->clear();
73 if( icon.isEmpty() ) { 73 if( icon.isEmpty() ) {
74 popupMenu->insertItem( message, 0 ); 74 popupMenu->insertItem( message, 0 );
75 } else { 75 } else {
76 popupMenu->insertItem( QIconSet ( Resource::loadPixmap ( icon )), 76 popupMenu->insertItem( QIconSet ( Resource::loadPixmap ( icon )),
77 message, 0 ); 77 message, 0 );
78 } 78 }
79 79
80 QPoint p = mapToGlobal ( QPoint ( 0, 0 )); 80 QPoint p = mapToGlobal ( QPoint ( 0, 0 ));
81 QSize s = popupMenu->sizeHint ( ); 81 QSize s = popupMenu->sizeHint ( );
82 popupMenu->popup( QPoint ( 82 popupMenu->popup( QPoint (
83 p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), 83 p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ),
84 p. y ( ) - s. height ( ) ), 0); 84 p. y ( ) - s. height ( ) ), 0);
85 85
86 QTimer::singleShot( 2000, this, SLOT(popupTimeout()) ); 86 QTimer::singleShot( 2000, this, SLOT(popupTimeout()) );
87} 87}
88 88
89void CardMonitor::popupTimeout() { 89void CardMonitor::popupTimeout() {
90 popupMenu->hide(); 90 popupMenu->hide();
91} 91}
92 92