Diffstat (limited to 'noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp | 26 |
1 files changed, 24 insertions, 2 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,3 +1,5 @@ #include <qtopia/qcopenvelope_qws.h> +#include <qlistview.h> +#include <qcheckbox.h> #include <GUIUtils.h> @@ -10,12 +12,32 @@ 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 & ) { +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) ); + } } |