-rw-r--r-- | noncore/settings/networksettings2/ppp/ppprun.h | 37 | ||||
-rw-r--r-- | noncore/settings/networksettings2/vpn/vpnGUI.cpp | 76 | ||||
-rw-r--r-- | noncore/settings/networksettings2/vpn/vpnGUI.h | 43 | ||||
-rw-r--r-- | noncore/settings/networksettings2/vpn/vpnGUI.ui | 131 |
4 files changed, 168 insertions, 119 deletions
diff --git a/noncore/settings/networksettings2/ppp/ppprun.h b/noncore/settings/networksettings2/ppp/ppprun.h new file mode 100644 index 0000000..76a05be --- a/dev/null +++ b/noncore/settings/networksettings2/ppp/ppprun.h @@ -0,0 +1,37 @@ +#ifndef PPPRUN_H +#define PPPRUN_H + +#include <qregexp.h> +#include <asconnection.h> +#include "pppdata.h" + +class PPPRun : public AsConnection { + +public : + + PPPRun( ANetNodeInstance * NNI, + PPPData & Data ) : + AsConnection( NNI ), + Pat( "eth[0-9]" ) + { D = &Data; } + +protected : + + void detectState( NodeCollection * NC ); + bool setState( NodeCollection * NC, Action_t A ); + bool canSetState( State_t S, Action_t A ) + { return connection()->findNext( netNode() )->runtime()->canSetState( S,A ); } + + bool handlesInterface( const QString & I ); + +private : + + bool isMyPPPDRunning( void ); + bool isMyPPPUp( void ); + + PPPData_t * D; + QRegExp Pat; + +}; + +#endif diff --git a/noncore/settings/networksettings2/vpn/vpnGUI.cpp b/noncore/settings/networksettings2/vpn/vpnGUI.cpp deleted file mode 100644 index 708c92b..0000000 --- a/noncore/settings/networksettings2/vpn/vpnGUI.cpp +++ b/dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** Form implementation generated from reading ui file 'vpnGUI.ui' -** -** Created: Tue Mar 30 02:42:53 2004 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#include "vpnGUI.h" - -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qmultilineedit.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qvariant.h> -#include <qtooltip.h> -#include <qwhatsthis.h> - -/* - * Constructs a VPNGUI which is a child of 'parent', with the - * name 'name' and widget flags set to 'f' - */ -VPNGUI::VPNGUI( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) -{ - if ( !name ) - setName( "VPN_FRM" ); - resize( 283, 199 ); - setCaption( tr( "VPN" ) ); - VPN_FRMLayout = new QVBoxLayout( this ); - VPN_FRMLayout->setSpacing( 2 ); - VPN_FRMLayout->setMargin( 2 ); - - Layout4 = new QHBoxLayout; - Layout4->setSpacing( 6 ); - Layout4->setMargin( 0 ); - - TextLabel4 = new QLabel( this, "TextLabel4" ); - TextLabel4->setText( tr( "Name" ) ); - Layout4->addWidget( TextLabel4 ); - - Name_LE = new QLineEdit( this, "Name_LE" ); - Layout4->addWidget( Name_LE ); - VPN_FRMLayout->addLayout( Layout4 ); - - TextLabel3 = new QLabel( this, "TextLabel3" ); - TextLabel3->setText( tr( "Description" ) ); - VPN_FRMLayout->addWidget( TextLabel3 ); - - Description_LE = new QMultiLineEdit( this, "Description_LE" ); - VPN_FRMLayout->addWidget( Description_LE ); - - Layout5 = new QHBoxLayout; - Layout5->setSpacing( 6 ); - Layout5->setMargin( 0 ); - - Automatic_CB = new QCheckBox( this, "Automatic_CB" ); - Automatic_CB->setText( tr( "Start automatically" ) ); - Layout5->addWidget( Automatic_CB ); - - Confirm_CB = new QCheckBox( this, "Confirm_CB" ); - Confirm_CB->setText( tr( "Confirm before start" ) ); - Layout5->addWidget( Confirm_CB ); - VPN_FRMLayout->addLayout( Layout5 ); -} - -/* - * Destroys the object and frees any allocated resources - */ -VPNGUI::~VPNGUI() -{ - // no need to delete child widgets, Qt does it all for us -} - diff --git a/noncore/settings/networksettings2/vpn/vpnGUI.h b/noncore/settings/networksettings2/vpn/vpnGUI.h deleted file mode 100644 index fcc3e54..0000000 --- a/noncore/settings/networksettings2/vpn/vpnGUI.h +++ b/dev/null @@ -1,43 +0,0 @@ -/**************************************************************************** -** Form interface generated from reading ui file 'vpnGUI.ui' -** -** Created: Tue Mar 30 02:42:50 2004 -** by: The User Interface Compiler (uic) -** -** WARNING! All changes made in this file will be lost! -****************************************************************************/ -#ifndef VPN_FRM_H -#define VPN_FRM_H - -#include <qvariant.h> -#include <qwidget.h> -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QCheckBox; -class QLabel; -class QLineEdit; -class QMultiLineEdit; - -class VPNGUI : public QWidget -{ - Q_OBJECT - -public: - VPNGUI( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); - ~VPNGUI(); - - QLabel* TextLabel4; - QLineEdit* Name_LE; - QLabel* TextLabel3; - QMultiLineEdit* Description_LE; - QCheckBox* Automatic_CB; - QCheckBox* Confirm_CB; - -protected: - QVBoxLayout* VPN_FRMLayout; - QHBoxLayout* Layout4; - QHBoxLayout* Layout5; -}; - -#endif // VPN_FRM_H diff --git a/noncore/settings/networksettings2/vpn/vpnGUI.ui b/noncore/settings/networksettings2/vpn/vpnGUI.ui new file mode 100644 index 0000000..490fc90 --- a/dev/null +++ b/noncore/settings/networksettings2/vpn/vpnGUI.ui @@ -0,0 +1,131 @@ +<!DOCTYPE UI><UI> +<class>VPNGUI</class> +<widget> + <class>QWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>VPN_FRM</cstring> + </property> + <property stdset="1"> + <name>geometry</name> + <rect> + <x>0</x> + <y>0</y> + <width>283</width> + <height>199</height> + </rect> + </property> + <property stdset="1"> + <name>caption</name> + <string>VPN</string> + </property> + <property> + <name>layoutMargin</name> + </property> + <property> + <name>layoutSpacing</name> + </property> + <vbox> + <property stdset="1"> + <name>margin</name> + <number>2</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>2</number> + </property> + <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout4</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel4</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Name</string> + </property> + </widget> + <widget> + <class>QLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>Name_LE</cstring> + </property> + </widget> + </hbox> + </widget> + <widget> + <class>QLabel</class> + <property stdset="1"> + <name>name</name> + <cstring>TextLabel3</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Description</string> + </property> + </widget> + <widget> + <class>QMultiLineEdit</class> + <property stdset="1"> + <name>name</name> + <cstring>Description_LE</cstring> + </property> + </widget> + <widget> + <class>QLayoutWidget</class> + <property stdset="1"> + <name>name</name> + <cstring>Layout5</cstring> + </property> + <hbox> + <property stdset="1"> + <name>margin</name> + <number>0</number> + </property> + <property stdset="1"> + <name>spacing</name> + <number>6</number> + </property> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>Automatic_CB</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Start automatically</string> + </property> + </widget> + <widget> + <class>QCheckBox</class> + <property stdset="1"> + <name>name</name> + <cstring>Confirm_CB</cstring> + </property> + <property stdset="1"> + <name>text</name> + <string>Confirm before start</string> + </property> + </widget> + </hbox> + </widget> + </vbox> +</widget> +</UI> |