summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/bluebase.cpp
Unidiff
Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index 3d446f0..c905ea3 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -29,24 +29,28 @@
29#include <qpixmap.h> 29#include <qpixmap.h>
30#include <qtabwidget.h> 30#include <qtabwidget.h>
31#include <qscrollview.h> 31#include <qscrollview.h>
32#include <qvbox.h> 32#include <qvbox.h>
33#include <qmessagebox.h> 33#include <qmessagebox.h>
34#include <qapplication.h> 34#include <qapplication.h>
35#include <qcheckbox.h> 35#include <qcheckbox.h>
36#include <qlineedit.h> 36#include <qlineedit.h>
37 37
38#include <qpe/resource.h> 38#include <qpe/resource.h>
39#include <qpe/config.h> 39#include <qpe/config.h>
40 40
41
42namespace OpieTooth {
43
44
41BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) 45BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl )
42 : BluetoothBase( parent, name, fl ) { 46 : BluetoothBase( parent, name, fl ) {
43 47
44 48
45 QObject::connect( (QObject*) PushButton2, SIGNAL( clicked() ), this, SLOT(startScan())); 49 QObject::connect( (QObject*) PushButton2, SIGNAL( clicked() ), this, SLOT(startScan()));
46 QObject::connect((QObject*)configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges())); 50 QObject::connect((QObject*)configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges()));
47 51
48 QPalette pal = this->palette(); 52 QPalette pal = this->palette();
49 QColor col = pal.color(QPalette::Active, QColorGroup::Background); 53 QColor col = pal.color(QPalette::Active, QColorGroup::Background);
50 pal.setColor(QPalette::Active, QColorGroup::Button, col); 54 pal.setColor(QPalette::Active, QColorGroup::Button, col);
51 pal.setColor(QPalette::Inactive, QColorGroup::Button, col); 55 pal.setColor(QPalette::Inactive, QColorGroup::Button, col);
52 pal.setColor(QPalette::Normal, QColorGroup::Button, col); 56 pal.setColor(QPalette::Normal, QColorGroup::Button, col);
@@ -82,43 +86,40 @@ void BlueBase::writeConfig() {
82 86
83 87
84 Config cfg("bluetoothmanager"); 88 Config cfg("bluetoothmanager");
85 cfg.setGroup("bluezsettings"); 89 cfg.setGroup("bluezsettings");
86 90
87 91
88 cfg.writeEntry("name", deviceName); 92 cfg.writeEntry("name", deviceName);
89 cfg.writeEntryCrypt("passkey", defaultPasskey); 93 cfg.writeEntryCrypt("passkey", defaultPasskey);
90 cfg.writeEntry("useEncryption", useEncryption); 94 cfg.writeEntry("useEncryption", useEncryption);
91 cfg.writeEntry("enableAuthentification", enableAuthentification); 95 cfg.writeEntry("enableAuthentification", enableAuthentification);
92 cfg.writeEntry("enablePagescan",enablePagescan); 96 cfg.writeEntry("enablePagescan",enablePagescan);
93 cfg.writeEntry("enableInquiryscan", enableInquiryscan); 97 cfg.writeEntry("enableInquiryscan", enableInquiryscan);
94
95
96} 98}
97 99
98 100
99/** 101/**
100 * Set up the gui 102 * Set up the gui
101 */ 103 */
102void BlueBase::initGui() { 104void BlueBase::initGui() {
103 105
104 StatusLabel->setText(getStatus()); // maybe move it to getStatus() 106 StatusLabel->setText(getStatus()); // maybe move it to getStatus()
105 107
106 cryptCheckBox->setChecked(useEncryption); 108 cryptCheckBox->setChecked(useEncryption);
107 authCheckBox->setChecked(enableAuthentification); 109 authCheckBox->setChecked(enableAuthentification);
108 pagescanCheckBox->setChecked(enablePagescan); 110 pagescanCheckBox->setChecked(enablePagescan);
109 inquiryscanCheckBox->setChecked(enableInquiryscan); 111 inquiryscanCheckBox->setChecked(enableInquiryscan);
110 deviceNameLine->setText(deviceName); 112 deviceNameLine->setText(deviceName);
111 passkeyLine->setText(defaultPasskey); 113 passkeyLine->setText(defaultPasskey);
112
113} 114}
114 115
115 116
116/** 117/**
117 * Get the status informations and returns it 118 * Get the status informations and returns it
118 * @return QString the status informations gathered 119 * @return QString the status informations gathered
119 */ 120 */
120QString BlueBase::getStatus(){ 121QString BlueBase::getStatus(){
121 122
122 return ("manger.h need also a status method"); 123 return ("manger.h need also a status method");
123 124
124} 125}
@@ -134,32 +135,31 @@ void BlueBase::applyConfigChanges() {
134 useEncryption = cryptCheckBox->isChecked(); 135 useEncryption = cryptCheckBox->isChecked();
135 enableAuthentification = authCheckBox->isChecked(); 136 enableAuthentification = authCheckBox->isChecked();
136 enablePagescan = pagescanCheckBox->isChecked(); 137 enablePagescan = pagescanCheckBox->isChecked();
137 enableInquiryscan = inquiryscanCheckBox->isChecked(); 138 enableInquiryscan = inquiryscanCheckBox->isChecked();
138 139
139 writeConfig(); 140 writeConfig();
140 141
141 QMessageBox* box = new QMessageBox(this, "Test"); 142 QMessageBox* box = new QMessageBox(this, "Test");
142 box->setText(tr("Changes applied")); 143 box->setText(tr("Changes applied"));
143 box->show(); 144 box->show();
144 145
145 // falls nötig hcid killhupen - die funktionalität adden 146 // falls nötig hcid killhupen - die funktionalität adden
146
147
148} 147}
149 148
150 149
151/** 150/**
152 * Open the "scan for devices" dialog 151 * Open the "scan for devices" dialog
153 */ 152 */
154void BlueBase::startScan() { 153void BlueBase::startScan() {
155 ScanDialog *scan = new ScanDialog( this, "", true); 154 ScanDialog *scan = new ScanDialog( this, "", true);
156 scan->exec(); 155 scan->exec();
157} 156}
158 157
159/** 158/**
160 * Decontructor 159 * Decontructor
161 */ 160 */
162BlueBase::~BlueBase(){ 161BlueBase::~BlueBase(){
163} 162}
164 163
164}
165 165