00001 #include <qlistbox.h> 00002 #include <qlabel.h> 00003 #include "activateprofile.h" 00004 00005 ActivateProfile::ActivateProfile( const char * Interface ) : 00006 ActivateProfileGUI( 0, 0, TRUE ), NSD() { 00007 00008 Possible = NSD.collectPossible( Interface ); 00009 00010 DeviceName_LBL->setText( Interface ); 00011 Profiles_LB->clear(); 00012 for( NetworkSetup * NC = Possible.first(); 00013 NC; 00014 NC = Possible.next() ) { 00015 Profiles_LB->insertItem( NC->devicePixmap(), 00016 NC->name() ); 00017 } 00018 } 00019 00020 ActivateProfile::~ActivateProfile( void ) { 00021 } 00022 00023 long ActivateProfile::selectedProfile( void ) { 00024 for( unsigned int i = 0 ; i < Profiles_LB->count(); i ++ ) { 00025 if( Profiles_LB->isSelected(i) ) { 00026 return Possible.at(i)->number(); 00027 00028 } 00029 } 00030 return -1; 00031 }
1.4.2