author | wimpie <wimpie> | 2004-04-03 21:46:43 (UTC) |
---|---|---|
committer | wimpie <wimpie> | 2004-04-03 21:46:43 (UTC) |
commit | e7f2c080698c5a053e17e9614c25a32c8f842dc6 (patch) (unidiff) | |
tree | e5d187709b6a64c380e215872b202677b5adcd76 | |
parent | fc6fce8cd45068f371b66b1b6d4fa0bcee3d8810 (diff) | |
download | opie-e7f2c080698c5a053e17e9614c25a32c8f842dc6.zip opie-e7f2c080698c5a053e17e9614c25a32c8f842dc6.tar.gz opie-e7f2c080698c5a053e17e9614c25a32c8f842dc6.tar.bz2 |
*** empty log message ***
-rw-r--r-- | noncore/settings/networksettings2/activateprofile.cpp | 29 | ||||
-rw-r--r-- | noncore/settings/networksettings2/activateprofile.h | 19 |
2 files changed, 48 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 | |||
4 | ActivateProfile::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 | |||
18 | ActivateProfile::~ActivateProfile( void ) { | ||
19 | } | ||
20 | |||
21 | long 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 | } | ||
diff --git a/noncore/settings/networksettings2/activateprofile.h b/noncore/settings/networksettings2/activateprofile.h new file mode 100644 index 0000000..dedeb51 --- a/dev/null +++ b/noncore/settings/networksettings2/activateprofile.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #include "activateprofileGUI.h" | ||
2 | #include "nsdata.h" | ||
3 | |||
4 | class ActivateProfile : public ActivateProfileGUI { | ||
5 | |||
6 | Q_OBJECT | ||
7 | |||
8 | public : | ||
9 | |||
10 | ActivateProfile( const char * interface ); | ||
11 | ~ActivateProfile( void ); | ||
12 | |||
13 | long selectedProfile( void ); | ||
14 | |||
15 | private : | ||
16 | |||
17 | NetworkSettingsData NSD; | ||
18 | QList<NodeCollection> Possible; | ||
19 | }; | ||