summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 910bb8c..af65f14 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -17,98 +17,98 @@
17 17
18#include "bluebase.h" 18#include "bluebase.h"
19#include "scandialog.h" 19#include "scandialog.h"
20 20
21#include <qframe.h> 21#include <qframe.h>
22#include <qlabel.h> 22#include <qlabel.h>
23#include <qpushbutton.h> 23#include <qpushbutton.h>
24#include <qlayout.h> 24#include <qlayout.h>
25#include <qvariant.h> 25#include <qvariant.h>
26#include <qwhatsthis.h> 26#include <qwhatsthis.h>
27#include <qimage.h> 27#include <qimage.h>
28#include <qpixmap.h> 28#include <qpixmap.h>
29#include <qtabwidget.h> 29#include <qtabwidget.h>
30#include <qscrollview.h> 30#include <qscrollview.h>
31#include <qvbox.h> 31#include <qvbox.h>
32#include <qmessagebox.h> 32#include <qmessagebox.h>
33#include <qapplication.h> 33#include <qapplication.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qlineedit.h> 35#include <qlineedit.h>
36#include <qlistview.h> 36#include <qlistview.h>
37#include <qdir.h> 37#include <qdir.h>
38#include <qpopupmenu.h> 38#include <qpopupmenu.h>
39 39
40#include <qpe/resource.h> 40#include <qpe/resource.h>
41#include <qpe/config.h> 41#include <qpe/config.h>
42 42
43#include <remotedevice.h> 43#include <remotedevice.h>
44 44
45 45
46namespace OpieTooth { 46namespace OpieTooth {
47 47
48 48
49 BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) 49 BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
50 : BluetoothBase( parent, name, fl ) { 50 : BluetoothBase( parent, name, fl ) {
51 51
52 localDevice = new Manager( "hci0" ); 52 localDevice = new Manager( "hci0" );
53 53
54 connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); 54 connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) );
55 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); 55 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) );
56 // not good since lib is async 56 // not good since lib is async
57 // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ), 57 // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ),
58 // this, SLOT( addServicesToDevice( QListViewItem * ) ) ); 58 // this, SLOT( addServicesToDevice( QListViewItem * ) ) );
59 connect( ListView2, SIGNAL( clicked( QListViewItem* )), 59 connect( ListView2, SIGNAL( clicked( QListViewItem* )),
60 this, SLOT( startServiceActionClicked( QListViewItem* ) ) ); 60 this, SLOT( startServiceActionClicked( QListViewItem* ) ) );
61 connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ), 61 connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ),
62 this, SLOT(startServiceActionHold( BTListItem *, const QPoint &, int) ) ); 62 this, SLOT(startServiceActionHold( BTListItem *, const QPoint &, int) ) );
63 connect( localDevice , SIGNAL( foundServices( const QString& , Services::ValueList ) ), 63 connect( localDevice , SIGNAL( foundServices( const QString& , Services::ValueList ) ),
64 this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) ); 64 this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) );
65 connect( localDevice, SIGNAL( available( const QString& device, bool connected ) ), 65 connect( localDevice, SIGNAL( available( const QString&, bool ) ),
66 this, SLOT( deviceActive( const QString& mac, bool connected ) ) ); 66 this, SLOT( deviceActive( const QString& , bool ) ) );
67 67
68 //Load all icons needed 68 //Load all icons needed
69 69
70 offPix = Resource::loadPixmap( "editdelete" ); 70 offPix = Resource::loadPixmap( "editdelete" );
71 onPix = Resource::loadPixmap( "installed" ); 71 onPix = Resource::loadPixmap( "installed" );
72 72
73 QPalette pal = this->palette(); 73 QPalette pal = this->palette();
74 QColor col = pal.color( QPalette::Active, QColorGroup::Background ); 74 QColor col = pal.color( QPalette::Active, QColorGroup::Background );
75 pal.setColor( QPalette::Active, QColorGroup::Button, col ); 75 pal.setColor( QPalette::Active, QColorGroup::Button, col );
76 pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); 76 pal.setColor( QPalette::Inactive, QColorGroup::Button, col );
77 pal.setColor( QPalette::Normal, QColorGroup::Button, col ); 77 pal.setColor( QPalette::Normal, QColorGroup::Button, col );
78 pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); 78 pal.setColor( QPalette::Disabled, QColorGroup::Button, col );
79 this->setPalette( pal ); 79 this->setPalette( pal );
80 80
81 setCaption( tr( "Bluetooth Manager" ) ); 81 setCaption( tr( "Bluetooth Manager" ) );
82 82
83 readConfig(); 83 readConfig();
84 initGui(); 84 initGui();
85 85
86 //TESTING 86 //TESTING
87 ListView2->setRootIsDecorated(true); 87 ListView2->setRootIsDecorated(true);
88 88
89 BTListItem *topLV2 = new BTListItem( ListView2, "Siemens S45", "", "device" ); 89 BTListItem *topLV2 = new BTListItem( ListView2, "Siemens S45", "", "device" );
90 topLV2->setPixmap( 1, onPix ); 90 topLV2->setPixmap( 1, onPix );
91 (void) new BTListItem( topLV2, "Serial" ,"", "service" ); 91 (void) new BTListItem( topLV2, "Serial" ,"", "service" );
92 (void) new BTListItem( topLV2, "BlueNiC" , "", "service" ); 92 (void) new BTListItem( topLV2, "BlueNiC" , "", "service" );
93 } 93 }
94 94
95 95
96 /** 96 /**
97 * Reads all options from the config file 97 * Reads all options from the config file
98 */ 98 */
99 void BlueBase::readConfig() { 99 void BlueBase::readConfig() {
100 100
101 Config cfg( "bluetoothmanager" ); 101 Config cfg( "bluetoothmanager" );
102 cfg.setGroup( "bluezsettings" ); 102 cfg.setGroup( "bluezsettings" );
103 103
104 104
105 deviceName = cfg.readEntry( "name" , "No name" ); // name the device should identify with 105 deviceName = cfg.readEntry( "name" , "No name" ); // name the device should identify with
106 defaultPasskey = cfg.readEntryCrypt( "passkey" , "" ); // <- hmm, look up how good the trolls did that, maybe too weak 106 defaultPasskey = cfg.readEntryCrypt( "passkey" , "" ); // <- hmm, look up how good the trolls did that, maybe too weak
107 useEncryption = cfg.readNumEntry( "useEncryption" , 1 ); 107 useEncryption = cfg.readNumEntry( "useEncryption" , 1 );
108 enableAuthentification = cfg.readNumEntry( "enableAuthentification" , 1 ); 108 enableAuthentification = cfg.readNumEntry( "enableAuthentification" , 1 );
109 enablePagescan = cfg.readNumEntry( "enablePagescan" , 1 ); 109 enablePagescan = cfg.readNumEntry( "enablePagescan" , 1 );
110 enableInquiryscan = cfg.readNumEntry( "enableInquiryscan" , 1 ); 110 enableInquiryscan = cfg.readNumEntry( "enableInquiryscan" , 1 );
111 111
112 } 112 }
113 113
114 /** 114 /**