00001 #include <qwidgetstack.h> 00002 00003 #include "PPPIPedit.h" 00004 #include "PPPDNSedit.h" 00005 #include "PPPAuthedit.h" 00006 #include "PPPRunedit.h" 00007 #include "PPPDialingedit.h" 00008 #include "PPPedit.h" 00009 00010 PPPEdit::PPPEdit( QWidget * Parent ) : PPPGUI( Parent ){ 00011 00012 Auth = new PPPAuthEdit( Options_WS ); 00013 IP = new PPPIPEdit( Options_WS ); 00014 DNS = new PPPDNSEdit( Options_WS ); 00015 Run = new PPPRunEdit( Options_WS ); 00016 Dialing = new PPPDialingEdit( Options_WS ); 00017 00018 Options_WS->addWidget( Auth, 0 ); 00019 Options_WS->addWidget( IP, 1 ); 00020 Options_WS->addWidget( DNS, 2 ); 00021 Options_WS->addWidget( Run, 3 ); 00022 Options_WS->addWidget( Dialing, 4 ); 00023 00024 Options_WS->raiseWidget( 0 ); 00025 } 00026 00027 QString PPPEdit::acceptable( void ) { 00028 QString S; 00029 S = Auth->acceptable(); 00030 if( S.isEmpty() ) { 00031 S = IP->acceptable(); 00032 if( S.isEmpty() ) { 00033 S = DNS->acceptable(); 00034 } 00035 } 00036 return S; 00037 } 00038 00039 bool PPPEdit::commit( PPPData & Data ) { 00040 bool SM ; 00041 SM = Auth->commit( Data ); 00042 SM |= IP->commit( Data ); 00043 SM |= DNS->commit( Data ); 00044 return SM; 00045 } 00046 00047 void PPPEdit::showData( PPPData & Data ) { 00048 Auth->showData( Data ) ; 00049 IP->showData( Data ); 00050 DNS->showData( Data ); 00051 } 00052 00053 void PPPEdit::SLOT_SelectTopic( int v ) { 00054 Options_WS->raiseWidget( v ); 00055 }
1.4.2