summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/activateprofile.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings2/activateprofile.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings2/activateprofile.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/activateprofile.cpp b/noncore/settings/networksettings2/activateprofile.cpp
new file mode 100644
index 0000000..ba726bb
--- a/dev/null
+++ b/noncore/settings/networksettings2/activateprofile.cpp
@@ -0,0 +1,29 @@
1#include <qlistbox.h>
2#include "activateprofile.h"
3
4ActivateProfile::ActivateProfile( const char * Interface ) :
5 ActivateProfileGUI( 0, 0, TRUE ), NSD() {
6
7 Possible = NSD.collectPossible( Interface );
8
9 Profiles_LB->clear();
10 for( NodeCollection * NC = Possible.first();
11 NC;
12 NC = Possible.next() ) {
13 Profiles_LB->insertItem( NC->devicePixmap(),
14 NC->name() );
15 }
16}
17
18ActivateProfile::~ActivateProfile( void ) {
19}
20
21long ActivateProfile::selectedProfile( void ) {
22 for( unsigned int i = 0 ; i < Profiles_LB->count(); i ++ ) {
23 if( Profiles_LB->isSelected(i) ) {
24 return Possible.at(i)->number();
25
26 }
27 }
28 return -1;
29}