Diffstat (limited to 'noncore/settings/networksettings2/ppp/PPPIPedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings2/ppp/PPPIPedit.cpp | 37 |
1 files changed, 17 insertions, 20 deletions
diff --git a/noncore/settings/networksettings2/ppp/PPPIPedit.cpp b/noncore/settings/networksettings2/ppp/PPPIPedit.cpp index 6965e5a..ef1b7c0 100644 --- a/noncore/settings/networksettings2/ppp/PPPIPedit.cpp +++ b/noncore/settings/networksettings2/ppp/PPPIPedit.cpp | |||
@@ -11,12 +11,3 @@ PPPIPEdit::PPPIPEdit( QWidget * Parent ) : PPPIPGUI( Parent ){ | |||
11 | QString PPPIPEdit::acceptable( void ) { | 11 | QString PPPIPEdit::acceptable( void ) { |
12 | if( IPFixed_RB->isChecked() ) { | 12 | if( GWFixed_RB->isChecked() ) { |
13 | if( IPAddress_LE->text().isEmpty() ) | ||
14 | return tr("IPAddress needed" ); | ||
15 | if( ! validIP( IPAddress_LE->text() ) ) | ||
16 | return tr("IPAddress not valid" ); | ||
17 | if( IPSubMask_LE->text().isEmpty() ) | ||
18 | return tr("Subnet mask needed" ); | ||
19 | if( ! validIP( IPSubMask_LE->text() ) ) | ||
20 | return tr("Subnet mask not valid" ); | ||
21 | } else if( GWFixed_RB->isChecked() ) { | ||
22 | if( GWAddress_LE->text().isEmpty() ) | 13 | if( GWAddress_LE->text().isEmpty() ) |
@@ -30,3 +21,3 @@ QString PPPIPEdit::acceptable( void ) { | |||
30 | 21 | ||
31 | bool PPPIPEdit::commit( PPPData_t & D ) { | 22 | bool PPPIPEdit::commit( PPPData & D ) { |
32 | 23 | ||
@@ -34,9 +25,10 @@ bool PPPIPEdit::commit( PPPData_t & D ) { | |||
34 | 25 | ||
35 | CBM( D.IP.IPAutomatic, IPServerAssigned_RB, SM ); | 26 | CBM( D.IP.LocalOverrule, ServerOverrulesLocal_CB, SM ); |
36 | if( ! D.IP.IPAutomatic ) { | 27 | CBM( D.IP.RemoteOverrule, ServerOverrulesRemote_CB, SM ); |
37 | TXTM( D.IP.IPAddress, IPAddress_LE, SM ); | 28 | |
38 | TXTM( D.IP.IPSubMask, IPSubMask_LE, SM ); | 29 | TXTM( D.IP.LocalAddress, LocalAddress_LE, SM ); |
39 | } | 30 | TXTM( D.IP.RemoteAddress, RemoteAddress_LE, SM ); |
40 | 31 | ||
41 | CBM( D.IP.GWAutomatic, GWServerAssigned_RB, SM ); | 32 | CBM( D.IP.GWAutomatic, GWServerAssigned_RB, SM ); |
33 | |||
42 | if( ! D.IP.GWAutomatic ) { | 34 | if( ! D.IP.GWAutomatic ) { |
@@ -46,2 +38,4 @@ bool PPPIPEdit::commit( PPPData_t & D ) { | |||
46 | CBM( D.IP.GWIsDefault, GWIsDefault_CB, SM ); | 38 | CBM( D.IP.GWIsDefault, GWIsDefault_CB, SM ); |
39 | CBM( D.IP.GWIfNotSet, GWIfNotSet_CB, SM ); | ||
40 | |||
47 | return SM; | 41 | return SM; |
@@ -49,6 +43,8 @@ bool PPPIPEdit::commit( PPPData_t & D ) { | |||
49 | 43 | ||
50 | void PPPIPEdit::showData( PPPData_t & D ) { | 44 | void PPPIPEdit::showData( PPPData & D ) { |
51 | IPServerAssigned_RB->setChecked( D.IP.IPAutomatic ); | 45 | ServerOverrulesLocal_CB->setChecked( D.IP.LocalOverrule ); |
52 | IPAddress_LE->setText( D.IP.IPAddress ); | 46 | ServerOverrulesRemote_CB->setChecked( D.IP.RemoteOverrule ); |
53 | IPSubMask_LE->setText( D.IP.IPSubMask ); | 47 | LocalAddress_LE->setText( D.IP.LocalAddress ); |
48 | RemoteAddress_LE->setText( D.IP.RemoteAddress ); | ||
49 | |||
54 | GWServerAssigned_RB->setChecked( D.IP.GWAutomatic ); | 50 | GWServerAssigned_RB->setChecked( D.IP.GWAutomatic ); |
@@ -56,2 +52,3 @@ void PPPIPEdit::showData( PPPData_t & D ) { | |||
56 | GWIsDefault_CB->setChecked( D.IP.GWIsDefault ); | 52 | GWIsDefault_CB->setChecked( D.IP.GWIsDefault ); |
53 | GWIfNotSet_CB->setChecked( D.IP.GWIfNotSet ); | ||
57 | } | 54 | } |