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,2 +1,4 @@
1#include <qtopia/qcopenvelope_qws.h> 1#include <qtopia/qcopenvelope_qws.h>
2#include <qlistview.h>
3#include <qcheckbox.h>
2 4
@@ -11,2 +13,7 @@ BluetoothBNEPEdit::BluetoothBNEPEdit( QWidget * Parent ) : BluetoothBNEPGUI( Par
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();
@@ -14,7 +21,22 @@ QString BluetoothBNEPEdit::acceptable( void ) {
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}