summaryrefslogtreecommitdiff
path: root/noncore
authorwimpie <wimpie>2004-04-03 21:46:43 (UTC)
committer wimpie <wimpie>2004-04-03 21:46:43 (UTC)
commite7f2c080698c5a053e17e9614c25a32c8f842dc6 (patch) (side-by-side diff)
treee5d187709b6a64c380e215872b202677b5adcd76 /noncore
parentfc6fce8cd45068f371b66b1b6d4fa0bcee3d8810 (diff)
downloadopie-e7f2c080698c5a053e17e9614c25a32c8f842dc6.zip
opie-e7f2c080698c5a053e17e9614c25a32c8f842dc6.tar.gz
opie-e7f2c080698c5a053e17e9614c25a32c8f842dc6.tar.bz2
*** empty log message ***
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/activateprofile.cpp29
-rw-r--r--noncore/settings/networksettings2/activateprofile.h19
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 @@
+#include <qlistbox.h>
+#include "activateprofile.h"
+
+ActivateProfile::ActivateProfile( const char * Interface ) :
+ ActivateProfileGUI( 0, 0, TRUE ), NSD() {
+
+ Possible = NSD.collectPossible( Interface );
+
+ Profiles_LB->clear();
+ for( NodeCollection * NC = Possible.first();
+ NC;
+ NC = Possible.next() ) {
+ Profiles_LB->insertItem( NC->devicePixmap(),
+ NC->name() );
+ }
+}
+
+ActivateProfile::~ActivateProfile( void ) {
+}
+
+long ActivateProfile::selectedProfile( void ) {
+ for( unsigned int i = 0 ; i < Profiles_LB->count(); i ++ ) {
+ if( Profiles_LB->isSelected(i) ) {
+ return Possible.at(i)->number();
+
+ }
+ }
+ return -1;
+}
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 @@
+#include "activateprofileGUI.h"
+#include "nsdata.h"
+
+class ActivateProfile : public ActivateProfileGUI {
+
+ Q_OBJECT
+
+public :
+
+ ActivateProfile( const char * interface );
+ ~ActivateProfile( void );
+
+ long selectedProfile( void );
+
+private :
+
+ NetworkSettingsData NSD;
+ QList<NodeCollection> Possible;
+};