author | harlekin <harlekin> | 2003-03-20 18:20:20 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-20 18:20:20 (UTC) |
commit | e8be90134f3d0d79abe55ed10897309a548376eb (patch) (side-by-side diff) | |
tree | 0f66457ea3c2748bf4fc46d58e140d20a81f5a4e /noncore/net/opietooth/applet/bluezapplet.cpp | |
parent | cbc495e56737838263e8f4470710e0a4338f5620 (diff) | |
download | opie-e8be90134f3d0d79abe55ed10897309a548376eb.zip opie-e8be90134f3d0d79abe55ed10897309a548376eb.tar.gz opie-e8be90134f3d0d79abe55ed10897309a548376eb.tar.bz2 |
added support for 39xx ipaq
Diffstat (limited to 'noncore/net/opietooth/applet/bluezapplet.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index f1618ae..39c15ab 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -26,35 +26,39 @@ */ #include "bluezapplet.h" #include <qapplication.h> #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> #include <qpe/config.h> +#include <opie/odevice.h> + #include <qpoint.h> #include <qpainter.h> #include <qlayout.h> #include <qframe.h> #include <qpixmap.h> #include <qstring.h> #include <qtimer.h> #include <qpopupmenu.h> #include <device.h> +using namespace Opie; + namespace OpieTooth { BluezApplet::BluezApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedHeight( 18 ); setFixedWidth( 14 ); bluezOnPixmap = Resource::loadPixmap( "bluetoothapplet/bluezon" ); bluezOffPixmap = Resource::loadPixmap( "bluetoothapplet/bluezoff" ); // bluezDiscoveryOnPixmap = Resource::loadPixmap( "bluetoothapplet/magglass" ); startTimer(4000); btDevice = 0; bluezactive = false; bluezDiscoveryActive = false; @@ -73,25 +77,33 @@ namespace OpieTooth { return true; } else { return false; } } else { return false; } } int BluezApplet::setBluezStatus(int c) { if (c == 1) { + switch ( ODevice::inst()->model() ) { + case Model_iPAQ_H39xx: + btDevice = new Device( "/dev/tts/1", "bcsp", "921600" ); + break; + + default: btDevice = new Device("/dev/ttySB0", "bcsp", "230400" ); + break; + } } else { if (btDevice) { delete btDevice; btDevice = 0; } } return 0; } int BluezApplet::checkBluezDiscoveryStatus() { } @@ -108,26 +120,26 @@ namespace OpieTooth { timerEvent( 0 ); if (bluezactive) { menu->insertItem( tr("Disable Bluetooth"), 0 ); } else { menu->insertItem( tr("Enable Bluetooth"), 1 ); } menu->insertItem( tr("Launch manager"), 2 ); menu->insertSeparator(6); - menu->insertItem( tr("Signal strength"), signal, 5); - menu->insertSeparator(8); + //menu->insertItem( tr("Signal strength"), signal, 5); + //menu->insertSeparator(8); if (bluezDiscoveryActive) { menu->insertItem( tr("Disable discovery"), 3 ); } else { menu->insertItem( tr("Enable discovery"), 4 ); } QPoint p = mapToGlobal( QPoint(1, -menu->sizeHint().height()-1) ); ret = menu->exec(p, 0); switch(ret) { |