Diffstat (limited to 'noncore/settings/networksettings2/profile/profile_NNI.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/profile/profile_NNI.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/noncore/settings/networksettings2/profile/profile_NNI.cpp b/noncore/settings/networksettings2/profile/profile_NNI.cpp index 5b54aa4..cb52b2a 100644 --- a/noncore/settings/networksettings2/profile/profile_NNI.cpp +++ b/noncore/settings/networksettings2/profile/profile_NNI.cpp | |||
@@ -1,42 +1,46 @@ | |||
1 | #include "profileedit.h" | 1 | #include "profileedit.h" |
2 | #include "profile_NNI.h" | 2 | #include "profile_NNI.h" |
3 | #include "profile_NN.h" | 3 | #include "profile_NN.h" |
4 | 4 | ||
5 | AProfile::AProfile( ProfileNetNode * PNN ) : ANetNodeInstance( PNN ) { | 5 | AProfile::AProfile( ProfileNetNode * PNN ) : ANetNodeInstance( PNN ) { |
6 | Data.Automatic = 1; | 6 | Data.Automatic = 1; |
7 | Data.Confirm = 0; | 7 | Data.Confirm = 0; |
8 | Data.Description = ""; | 8 | Data.Description = ""; |
9 | Data.Disabled = 0; | 9 | Data.Disabled = 0; |
10 | Data.TriggerVPN = 0; | ||
10 | GUI = 0; | 11 | GUI = 0; |
11 | RT = 0; | 12 | RT = 0; |
12 | } | 13 | } |
13 | 14 | ||
14 | void AProfile::setSpecificAttribute( QString & Attr, QString & Value ) { | 15 | void AProfile::setSpecificAttribute( QString & Attr, QString & Value ) { |
15 | 16 | ||
16 | if ( Attr == "automatic" ) { | 17 | if ( Attr == "automatic" ) { |
17 | Data.Automatic = (Value=="yes"); | 18 | Data.Automatic = (Value=="yes"); |
18 | } else if ( Attr == "preconfirm" ) { | 19 | } else if ( Attr == "preconfirm" ) { |
19 | Data.Confirm = (Value=="yes"); | 20 | Data.Confirm = (Value=="yes"); |
20 | } else if ( Attr == "disabled" ) { | 21 | } else if ( Attr == "disabled" ) { |
21 | Data.Disabled = (Value=="yes"); | 22 | Data.Disabled = (Value=="yes"); |
23 | } else if ( Attr == "triggervpn" ) { | ||
24 | Data.TriggerVPN = (Value=="yes"); | ||
22 | } else if ( Attr == "description" ) { | 25 | } else if ( Attr == "description" ) { |
23 | Data.Description = Value; | 26 | Data.Description = Value; |
24 | } | 27 | } |
25 | } | 28 | } |
26 | 29 | ||
27 | void AProfile::saveSpecificAttribute( QTextStream & TS ) { | 30 | void AProfile::saveSpecificAttribute( QTextStream & TS ) { |
28 | TS << "automatic=" << ((Data.Automatic) ? "yes" : "no") << endl; | 31 | TS << "automatic=" << ((Data.Automatic) ? "yes" : "no") << endl; |
29 | TS << "preconfirm=" << ((Data.Confirm) ? "yes" : "no") << endl; | 32 | TS << "preconfirm=" << ((Data.Confirm) ? "yes" : "no") << endl; |
30 | TS << "disabled=" << ((Data.Disabled) ? "yes" : "no") << endl; | 33 | TS << "disabled=" << ((Data.Disabled) ? "yes" : "no") << endl; |
34 | TS << "triggervpn=" << ((Data.TriggerVPN) ? "yes" : "no") << endl; | ||
31 | TS << "description=" << Data.Description << endl; | 35 | TS << "description=" << Data.Description << endl; |
32 | } | 36 | } |
33 | 37 | ||
34 | QWidget * AProfile::edit( QWidget * parent ) { | 38 | QWidget * AProfile::edit( QWidget * parent ) { |
35 | GUI = new ProfileEdit( parent, this ); | 39 | GUI = new ProfileEdit( parent, this ); |
36 | GUI->showData( Data ); | 40 | GUI->showData( Data ); |
37 | return GUI; | 41 | return GUI; |
38 | } | 42 | } |
39 | 43 | ||
40 | QString AProfile::acceptable( void ) { | 44 | QString AProfile::acceptable( void ) { |
41 | return ( GUI ) ? GUI->acceptable( ) : QString(); | 45 | return ( GUI ) ? GUI->acceptable( ) : QString(); |
42 | } | 46 | } |