00001 #include "bluetoothBNEPedit.h" 00002 #include "bluetoothBNEP_NNI.h" 00003 #include "bluetoothBNEP_NN.h" 00004 00005 ABluetoothBNEP::ABluetoothBNEP( BluetoothBNEPNetNode * PNN ) : 00006 ANetNodeInstance( PNN ), Data() { 00007 GUI = 0; 00008 RT = 0; 00009 Data.AllowAll = 1; 00010 } 00011 00012 void ABluetoothBNEP::setSpecificAttribute( QString & S, QString & A ) { 00013 if( S == "bdaddress" ) { 00014 Data.BDAddress << A; 00015 } else if ( S == "allowall" ) { 00016 Data.AllowAll = 1; 00017 } 00018 } 00019 00020 void ABluetoothBNEP::saveSpecificAttribute( QTextStream & TS ) { 00021 TS << "allowall=" << Data.AllowAll << endl; 00022 for ( QStringList::Iterator it = Data.BDAddress.begin(); 00023 it != Data.BDAddress.end(); 00024 ++it ) { 00025 TS << "bdaddress=" << (*it) << endl; 00026 } 00027 } 00028 00029 QWidget * ABluetoothBNEP::edit( QWidget * parent ) { 00030 GUI = new BluetoothBNEPEdit( parent ); 00031 GUI->showData( Data ); 00032 return GUI; 00033 } 00034 00035 QString ABluetoothBNEP::acceptable( void ) { 00036 return ( GUI ) ? GUI->acceptable( ) : QString(); 00037 } 00038 00039 void ABluetoothBNEP::commit( void ) { 00040 if( GUI && GUI->commit( Data ) ) 00041 setModified( 1 ); 00042 }
1.4.2