00001 #include <qtopia/qcopenvelope_qws.h> 00002 #include <qlistview.h> 00003 #include <qcheckbox.h> 00004 00005 #include <GUIUtils.h> 00006 #include "bluetoothBNEPedit.h" 00007 00008 00009 BluetoothBNEPEdit::BluetoothBNEPEdit( QWidget * Parent ) : BluetoothBNEPGUI( Parent ){ 00010 00011 } 00012 00013 QString BluetoothBNEPEdit::acceptable( void ) { 00014 if( ( ! AnyPAN_CB->isChecked() ) && 00015 BTPANServers_LV->firstChild() == 0 ) { 00016 return tr("<p>No bluetooth device addresses specified</p>"); 00017 } 00018 00019 return QString(); 00020 } 00021 00022 bool BluetoothBNEPEdit::commit( BluetoothBNEPData & Data ) { 00023 QListViewItem * it = BTPANServers_LV->firstChild(); 00024 Data.BDAddress.clear(); 00025 while( it ) { 00026 Data.BDAddress << it->text(0); 00027 it = it->nextSibling(); 00028 } 00029 return 0; 00030 } 00031 00032 void BluetoothBNEPEdit::showData( BluetoothBNEPData & Data ) { 00033 QListViewItem * lvit; 00034 BTPANServers_LV->clear(); 00035 00036 for ( QStringList::Iterator it = Data.BDAddress.begin(); 00037 it != Data.BDAddress.end(); 00038 ++it ) { 00039 lvit = new QListViewItem(BTPANServers_LV); 00040 lvit->setText( 0, (*it) ); 00041 } 00042 } 00043 00044 void BluetoothBNEPEdit::SLOT_StartBTMgr( void ) { 00045 QCopEnvelope e( "QPE/System", "execute(QString)" ); 00046 e << QString( "bluetooth-manager" ); 00047 00048 }
1.4.2