summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/applet/bluezapplet.cpp
authormickeyl <mickeyl>2005-08-29 21:27:26 (UTC)
committer mickeyl <mickeyl>2005-08-29 21:27:26 (UTC)
commit142e7e82efa6dd45884805c34fadec2160225e4b (patch) (side-by-side diff)
tree6fcb324d0b3bc02f3a966119cee7780bbc4942b1 /noncore/net/opietooth/applet/bluezapplet.cpp
parent96298fa5b396be9309e9e45c86d55a5e7e1d8fc9 (diff)
downloadopie-142e7e82efa6dd45884805c34fadec2160225e4b.zip
opie-142e7e82efa6dd45884805c34fadec2160225e4b.tar.gz
opie-142e7e82efa6dd45884805c34fadec2160225e4b.tar.bz2
- paint discovery pixmap if applicable
- Resource -> OResource - fix off-by-one bug in paint()
Diffstat (limited to 'noncore/net/opietooth/applet/bluezapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp
index 48698b6..e1c2341 100644
--- a/noncore/net/opietooth/applet/bluezapplet.cpp
+++ b/noncore/net/opietooth/applet/bluezapplet.cpp
@@ -30,16 +30,16 @@
#include "bluezapplet.h"
/* OPIE */
#include <opie2/otaskbarapplet.h>
#include <opie2/odevice.h>
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qpe/applnk.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/config.h>
-#include <qpe/resource.h>
using namespace Opie::Core;
/* QT */
#include <qapplication.h>
#include <qpoint.h>
#include <qpainter.h>
@@ -55,18 +55,18 @@ using namespace Opie::Core;
namespace OpieTooth {
BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) {
setFixedHeight( AppLnk::smallIconSize() );
setFixedWidth( AppLnk::smallIconSize() );
- bluezOnPixmap = Resource::loadImage( "bluetoothapplet/bluezon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
- bluezOffPixmap = Resource::loadImage( "bluetoothapplet/bluezoff" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
- //bluezDiscoveryOnPixmap = Resource::loadImage( "bluetoothapplet/magglass" )smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize());
+ bluezOnPixmap = OResource::loadImage( "bluetoothapplet/bluezon", OResource::SmallIcon );
+ bluezOffPixmap = OResource::loadImage( "bluetoothapplet/bluezoff", Opie::Core::OResource::SmallIcon );
+ bluezDiscoveryOnPixmap = OResource::loadImage( "bluetoothapplet/bluezondiscovery", Opie::Core::OResource::SmallIcon );
startTimer(4000);
btDevice = 0;
- btManager = 0;
+ btManager = 0;
bluezactive = false;
bluezDiscoveryActive = false;
// TODO: determine whether this channel has to be closed at destruction time.
QCopChannel* chan = new QCopChannel("QPE/Bluetooth", this );
connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ),
@@ -267,19 +267,19 @@ int BluezApplet::position()
*/
void BluezApplet::paintEvent( QPaintEvent* ) {
QPainter p(this);
odebug << "paint bluetooth pixmap" << oendl;
if (bluezactive > 0) {
- p.drawPixmap( 0, 1, bluezOnPixmap );
+ p.drawPixmap( 0, 0, bluezOnPixmap );
} else {
- p.drawPixmap( 0, 1, bluezOffPixmap );
+ p.drawPixmap( 0, 0, bluezOffPixmap );
}
if (bluezDiscoveryActive > 0) {
- p.drawPixmap( 0, 1, bluezDiscoveryOnPixmap );
+ p.drawPixmap( 0, 0, bluezDiscoveryOnPixmap );
}
}
};
EXPORT_OPIE_APPLET_v1( OpieTooth::BluezApplet )