summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/PPPIPedit.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings2/ppp/PPPIPedit.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/ppp/PPPIPedit.cpp37
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 ){
QString PPPIPEdit::acceptable( void ) {
- if( IPFixed_RB->isChecked() ) {
- if( IPAddress_LE->text().isEmpty() )
- return tr("IPAddress needed" );
- if( ! validIP( IPAddress_LE->text() ) )
- return tr("IPAddress not valid" );
- if( IPSubMask_LE->text().isEmpty() )
- return tr("Subnet mask needed" );
- if( ! validIP( IPSubMask_LE->text() ) )
- return tr("Subnet mask not valid" );
- } else if( GWFixed_RB->isChecked() ) {
+ if( GWFixed_RB->isChecked() ) {
if( GWAddress_LE->text().isEmpty() )
@@ -30,3 +21,3 @@ QString PPPIPEdit::acceptable( void ) {
-bool PPPIPEdit::commit( PPPData_t & D ) {
+bool PPPIPEdit::commit( PPPData & D ) {
@@ -34,9 +25,10 @@ bool PPPIPEdit::commit( PPPData_t & D ) {
- CBM( D.IP.IPAutomatic, IPServerAssigned_RB, SM );
- if( ! D.IP.IPAutomatic ) {
- TXTM( D.IP.IPAddress, IPAddress_LE, SM );
- TXTM( D.IP.IPSubMask, IPSubMask_LE, SM );
- }
+ CBM( D.IP.LocalOverrule, ServerOverrulesLocal_CB, SM );
+ CBM( D.IP.RemoteOverrule, ServerOverrulesRemote_CB, SM );
+
+ TXTM( D.IP.LocalAddress, LocalAddress_LE, SM );
+ TXTM( D.IP.RemoteAddress, RemoteAddress_LE, SM );
CBM( D.IP.GWAutomatic, GWServerAssigned_RB, SM );
+
if( ! D.IP.GWAutomatic ) {
@@ -46,2 +38,4 @@ bool PPPIPEdit::commit( PPPData_t & D ) {
CBM( D.IP.GWIsDefault, GWIsDefault_CB, SM );
+ CBM( D.IP.GWIfNotSet, GWIfNotSet_CB, SM );
+
return SM;
@@ -49,6 +43,8 @@ bool PPPIPEdit::commit( PPPData_t & D ) {
-void PPPIPEdit::showData( PPPData_t & D ) {
- IPServerAssigned_RB->setChecked( D.IP.IPAutomatic );
- IPAddress_LE->setText( D.IP.IPAddress );
- IPSubMask_LE->setText( D.IP.IPSubMask );
+void PPPIPEdit::showData( PPPData & D ) {
+ ServerOverrulesLocal_CB->setChecked( D.IP.LocalOverrule );
+ ServerOverrulesRemote_CB->setChecked( D.IP.RemoteOverrule );
+ LocalAddress_LE->setText( D.IP.LocalAddress );
+ RemoteAddress_LE->setText( D.IP.RemoteAddress );
+
GWServerAssigned_RB->setChecked( D.IP.GWAutomatic );
@@ -56,2 +52,3 @@ void PPPIPEdit::showData( PPPData_t & D ) {
GWIsDefault_CB->setChecked( D.IP.GWIsDefault );
+ GWIfNotSet_CB->setChecked( D.IP.GWIfNotSet );
}