summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp28
1 files changed, 25 insertions, 3 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
index 9a3156b..195dbae 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
@@ -1,4 +1,6 @@
1#include <qtopia/qcopenvelope_qws.h> 1#include <qtopia/qcopenvelope_qws.h>
2#include <qlistview.h>
3#include <qcheckbox.h>
2 4
3#include <GUIUtils.h> 5#include <GUIUtils.h>
4#include "bluetoothBNEPedit.h" 6#include "bluetoothBNEPedit.h"
@@ -9,14 +11,34 @@ BluetoothBNEPEdit::BluetoothBNEPEdit( QWidget * Parent ) : BluetoothBNEPGUI( Par
9} 11}
10 12
11QString BluetoothBNEPEdit::acceptable( void ) { 13QString BluetoothBNEPEdit::acceptable( void ) {
14 if( ( ! AnyPAN_CB->isChecked() ) &&
15 BTPANServers_LV->firstChild() == 0 ) {
16 return tr("<p>No bluetooth device addresses specified</p>");
17 }
18
12 return QString(); 19 return QString();
13} 20}
14 21
15bool BluetoothBNEPEdit::commit( BluetoothBNEPData & ) { 22bool BluetoothBNEPEdit::commit( BluetoothBNEPData & Data ) {
16 return 0; 23 QListViewItem * it = BTPANServers_LV->firstChild();
24 Data.BDAddress.clear();
25 while( it ) {
26 Data.BDAddress << it->text(0);
27 it = it->nextSibling();
28 }
29 return 0;
17} 30}
18 31
19void BluetoothBNEPEdit::showData( BluetoothBNEPData & ) { 32void BluetoothBNEPEdit::showData( BluetoothBNEPData & Data ) {
33 QListViewItem * lvit;
34 BTPANServers_LV->clear();
35
36 for ( QStringList::Iterator it = Data.BDAddress.begin();
37 it != Data.BDAddress.end();
38 ++it ) {
39 lvit = new QListViewItem(BTPANServers_LV);
40 lvit->setText( 0, (*it) );
41 }
20} 42}
21 43
22void BluetoothBNEPEdit::SLOT_StartBTMgr( void ) { 44void BluetoothBNEPEdit::SLOT_StartBTMgr( void ) {