summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
Side-by-side diff
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 @@
#include <qtopia/qcopenvelope_qws.h>
+#include <qlistview.h>
+#include <qcheckbox.h>
#include <GUIUtils.h>
#include "bluetoothBNEPedit.h"
@@ -9,14 +11,34 @@ BluetoothBNEPEdit::BluetoothBNEPEdit( QWidget * Parent ) : BluetoothBNEPGUI( Par
}
QString BluetoothBNEPEdit::acceptable( void ) {
+ if( ( ! AnyPAN_CB->isChecked() ) &&
+ BTPANServers_LV->firstChild() == 0 ) {
+ return tr("<p>No bluetooth device addresses specified</p>");
+ }
+
return QString();
}
-bool BluetoothBNEPEdit::commit( BluetoothBNEPData & ) {
- return 0;
+bool BluetoothBNEPEdit::commit( BluetoothBNEPData & Data ) {
+ QListViewItem * it = BTPANServers_LV->firstChild();
+ Data.BDAddress.clear();
+ while( it ) {
+ Data.BDAddress << it->text(0);
+ it = it->nextSibling();
+ }
+ return 0;
}
-void BluetoothBNEPEdit::showData( BluetoothBNEPData & ) {
+void BluetoothBNEPEdit::showData( BluetoothBNEPData & Data ) {
+ QListViewItem * lvit;
+ BTPANServers_LV->clear();
+
+ for ( QStringList::Iterator it = Data.BDAddress.begin();
+ it != Data.BDAddress.end();
+ ++it ) {
+ lvit = new QListViewItem(BTPANServers_LV);
+ lvit->setText( 0, (*it) );
+ }
}
void BluetoothBNEPEdit::SLOT_StartBTMgr( void ) {