Diffstat (limited to 'core/applets/cardmon/cardmon.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/applets/cardmon/cardmon.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index f3f9044..b8c4553 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp @@ -20,12 +20,14 @@ #include "cardmon.h" #include <qpe/resource.h> #include <opie/odevice.h> +#include <qpe/applnk.h> + #include <qcopchannel_qws.h> #include <qpainter.h> #include <qmessagebox.h> #include <qfile.h> #include <qtextstream.h> #include <qtimer.h> @@ -43,14 +45,13 @@ #include <mntent.h> #endif using namespace Opie; CardMonitor::CardMonitor(QWidget * parent):QWidget(parent), -pm(Resource:: - loadPixmap("cardmon/pcmcia")) + pm( Resource::loadPixmap("cardmon/pcmcia") ) { QCopChannel *pcmciaChannel = new QCopChannel("QPE/Card", this); connect(pcmciaChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(cardMessage(const QCString &, const QByteArray &))); @@ -61,13 +62,17 @@ pm(Resource:: SLOT(cardMessage(const QCString &, const QByteArray &))); cardInPcmcia0 = FALSE; cardInPcmcia1 = FALSE; cardInSd = FALSE; - setFixedSize(pm.size()); + setFocusPolicy( NoFocus ); + + setFixedWidth ( AppLnk::smallIconSize() ); + setFixedHeight ( AppLnk::smallIconSize() ); + getStatusPcmcia(TRUE); getStatusSd(TRUE); repaint(FALSE); popupMenu = 0; } @@ -332,13 +337,13 @@ bool CardMonitor::getStatusSd(int showPopUp) void CardMonitor::paintEvent(QPaintEvent *) { QPainter p(this); if ( cardInPcmcia0 || cardInPcmcia1 || cardInSd ) { - p.drawPixmap(0, 0, pm); + p.drawPixmap(0, 0, pm ); show(); } else { //p.eraseRect(rect()); hide(); } } |