Diffstat (limited to 'noncore/net/opietooth/applet/bluezapplet.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 16 |
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 | |||
@@ -24,55 +24,55 @@ | |||
24 | Inc., 59 Temple Place - Suite 330, | 24 | Inc., 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | 29 | ||
30 | #include "bluezapplet.h" | 30 | #include "bluezapplet.h" |
31 | 31 | ||
32 | /* OPIE */ | 32 | /* OPIE */ |
33 | #include <opie2/otaskbarapplet.h> | 33 | #include <opie2/otaskbarapplet.h> |
34 | #include <opie2/odevice.h> | 34 | #include <opie2/odevice.h> |
35 | #include <opie2/odebug.h> | 35 | #include <opie2/odebug.h> |
36 | #include <opie2/oresource.h> | ||
36 | #include <qpe/applnk.h> | 37 | #include <qpe/applnk.h> |
37 | #include <qpe/qcopenvelope_qws.h> | 38 | #include <qpe/qcopenvelope_qws.h> |
38 | #include <qpe/config.h> | 39 | #include <qpe/config.h> |
39 | #include <qpe/resource.h> | ||
40 | using namespace Opie::Core; | 40 | using namespace Opie::Core; |
41 | 41 | ||
42 | /* QT */ | 42 | /* QT */ |
43 | #include <qapplication.h> | 43 | #include <qapplication.h> |
44 | #include <qpoint.h> | 44 | #include <qpoint.h> |
45 | #include <qpainter.h> | 45 | #include <qpainter.h> |
46 | #include <qlayout.h> | 46 | #include <qlayout.h> |
47 | #include <qframe.h> | 47 | #include <qframe.h> |
48 | #include <qpixmap.h> | 48 | #include <qpixmap.h> |
49 | #include <qstring.h> | 49 | #include <qstring.h> |
50 | #include <qtimer.h> | 50 | #include <qtimer.h> |
51 | #include <qpopupmenu.h> | 51 | #include <qpopupmenu.h> |
52 | 52 | ||
53 | /* STD */ | 53 | /* STD */ |
54 | #include <device.h> | 54 | #include <device.h> |
55 | 55 | ||
56 | namespace OpieTooth { | 56 | namespace OpieTooth { |
57 | 57 | ||
58 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { | 58 | BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { |
59 | setFixedHeight( AppLnk::smallIconSize() ); | 59 | setFixedHeight( AppLnk::smallIconSize() ); |
60 | setFixedWidth( AppLnk::smallIconSize() ); | 60 | setFixedWidth( AppLnk::smallIconSize() ); |
61 | bluezOnPixmap = Resource::loadImage( "bluetoothapplet/bluezon" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 61 | bluezOnPixmap = OResource::loadImage( "bluetoothapplet/bluezon", OResource::SmallIcon ); |
62 | bluezOffPixmap = Resource::loadImage( "bluetoothapplet/bluezoff" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); | 62 | bluezOffPixmap = OResource::loadImage( "bluetoothapplet/bluezoff", Opie::Core::OResource::SmallIcon ); |
63 | //bluezDiscoveryOnPixmap = Resource::loadImage( "bluetoothapplet/magglass" )smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize()); | 63 | bluezDiscoveryOnPixmap = OResource::loadImage( "bluetoothapplet/bluezondiscovery", Opie::Core::OResource::SmallIcon ); |
64 | startTimer(4000); | 64 | startTimer(4000); |
65 | btDevice = 0; | 65 | btDevice = 0; |
66 | btManager = 0; | 66 | btManager = 0; |
67 | bluezactive = false; | 67 | bluezactive = false; |
68 | bluezDiscoveryActive = false; | 68 | bluezDiscoveryActive = false; |
69 | 69 | ||
70 | // TODO: determine whether this channel has to be closed at destruction time. | 70 | // TODO: determine whether this channel has to be closed at destruction time. |
71 | QCopChannel* chan = new QCopChannel("QPE/Bluetooth", this ); | 71 | QCopChannel* chan = new QCopChannel("QPE/Bluetooth", this ); |
72 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), | 72 | connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), |
73 | this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); | 73 | this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); |
74 | } | 74 | } |
75 | 75 | ||
76 | BluezApplet::~BluezApplet() { | 76 | BluezApplet::~BluezApplet() { |
77 | if ( btDevice ) { | 77 | if ( btDevice ) { |
78 | delete btDevice; | 78 | delete btDevice; |
@@ -261,25 +261,25 @@ int BluezApplet::position() | |||
261 | } | 261 | } |
262 | } | 262 | } |
263 | 263 | ||
264 | /** | 264 | /** |
265 | * Implementation of the paint event | 265 | * Implementation of the paint event |
266 | * @param the QPaintEvent | 266 | * @param the QPaintEvent |
267 | */ | 267 | */ |
268 | void BluezApplet::paintEvent( QPaintEvent* ) { | 268 | void BluezApplet::paintEvent( QPaintEvent* ) { |
269 | QPainter p(this); | 269 | QPainter p(this); |
270 | odebug << "paint bluetooth pixmap" << oendl; | 270 | odebug << "paint bluetooth pixmap" << oendl; |
271 | 271 | ||
272 | if (bluezactive > 0) { | 272 | if (bluezactive > 0) { |
273 | p.drawPixmap( 0, 1, bluezOnPixmap ); | 273 | p.drawPixmap( 0, 0, bluezOnPixmap ); |
274 | } else { | 274 | } else { |
275 | p.drawPixmap( 0, 1, bluezOffPixmap ); | 275 | p.drawPixmap( 0, 0, bluezOffPixmap ); |
276 | } | 276 | } |
277 | 277 | ||
278 | if (bluezDiscoveryActive > 0) { | 278 | if (bluezDiscoveryActive > 0) { |
279 | p.drawPixmap( 0, 1, bluezDiscoveryOnPixmap ); | 279 | p.drawPixmap( 0, 0, bluezDiscoveryOnPixmap ); |
280 | } | 280 | } |
281 | } | 281 | } |
282 | }; | 282 | }; |
283 | 283 | ||
284 | EXPORT_OPIE_APPLET_v1( OpieTooth::BluezApplet ) | 284 | EXPORT_OPIE_APPLET_v1( OpieTooth::BluezApplet ) |
285 | 285 | ||