summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/activatevpn.cpp53
-rw-r--r--noncore/settings/networksettings2/activatevpn.h20
2 files changed, 73 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/activatevpn.cpp b/noncore/settings/networksettings2/activatevpn.cpp
new file mode 100644
index 0000000..2bdef0a
--- a/dev/null
+++ b/noncore/settings/networksettings2/activatevpn.cpp
@@ -0,0 +1,53 @@
+#include <qlistview.h>
+#include <qheader.h>
+#include <resources.h>
+#include "activatevpn.h"
+
+class MyCheckListItem : public QCheckListItem {
+
+public :
+
+ MyCheckListItem( NodeCollection * N, QListView * V );
+
+ NodeCollection * NC;
+
+};
+
+MyCheckListItem::MyCheckListItem( NodeCollection * N, QListView * V ):
+ QCheckListItem( V, N->name() ) {
+ NC = N;
+}
+
+ActivateVPN::ActivateVPN( void ) :
+ ActivateVPNGUI( 0, 0, TRUE ), NSD() {
+
+ QCheckListItem * CI;
+ printf( "%d\n", __LINE__ );
+ VPN_LV->clear();
+ VPN_LV->header()->hide();
+ printf( "%d\n", __LINE__ );
+
+ for( QDictIterator<NodeCollection> it(NSResources->connections());
+ it.current();
+ ++it ) {
+ printf( "%d\n", __LINE__ );
+ if( it.current()->triggeredBy( "vpn" ) ) {
+ printf( "%d\n", __LINE__ );
+ CI = new MyCheckListItem( it.current(), VPN_LV );
+ printf( "%d\n", __LINE__ );
+ }
+ printf( "%d\n", __LINE__ );
+ }
+}
+
+ActivateVPN::~ActivateVPN( void ) {
+}
+
+void ActivateVPN::SLOT_ChangedVPNSetting( QListViewItem * I ) {
+
+ MyCheckListItem * MI = (MyCheckListItem *)I;
+
+ printf( "%s : %d\n",
+ MI->text(0).latin1(),
+ MI->isOn() );
+}
diff --git a/noncore/settings/networksettings2/activatevpn.h b/noncore/settings/networksettings2/activatevpn.h
new file mode 100644
index 0000000..5794757
--- a/dev/null
+++ b/noncore/settings/networksettings2/activatevpn.h
@@ -0,0 +1,20 @@
+#include "activatevpnGUI.h"
+#include "nsdata.h"
+
+class ActivateVPN : public ActivateVPNGUI {
+
+ Q_OBJECT
+
+public :
+
+ ActivateVPN( void );
+ ~ActivateVPN( void );
+
+public slots :
+
+ void SLOT_ChangedVPNSetting( QListViewItem * );
+
+private :
+
+ NetworkSettingsData NSD;
+};