summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/ppp/PPPedit.cpp
blob: 17889aadbd3f3dccf55c6cf5beb644853a3f956c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include <qwidgetstack.h>

#include "PPPIPedit.h"
#include "PPPDNSedit.h"
#include "PPPAuthedit.h"
#include "PPPRunedit.h"
#include "PPPDialingedit.h"
#include "PPPedit.h"

PPPEdit::PPPEdit( QWidget * Parent ) : PPPGUI( Parent ){

    Auth = new PPPAuthEdit( Options_WS );
    IP = new PPPIPEdit( Options_WS );
    DNS = new PPPDNSEdit( Options_WS );
    Run = new PPPRunEdit( Options_WS );
    Dialing = new PPPDialingEdit( Options_WS );

    Options_WS->addWidget( Auth, 0 );
    Options_WS->addWidget( IP, 1 );
    Options_WS->addWidget( DNS, 2 );
    Options_WS->addWidget( Run, 3 );
    Options_WS->addWidget( Dialing, 4 );

    Options_WS->raiseWidget( 0 );
}

QString PPPEdit::acceptable( void ) {
    QString S;
    S = Auth->acceptable();
    if( S.isEmpty() ) {
      S = IP->acceptable();
      if( S.isEmpty() ) {
        S = DNS->acceptable();
      }
    }
    return S;
}

bool PPPEdit::commit( PPPData & Data ) {
    bool SM ;
    SM = Auth->commit( Data );
    SM |= IP->commit( Data );
    SM |= DNS->commit( Data );
    return SM;
}

void PPPEdit::showData( PPPData & Data ) {
    Auth->showData( Data ) ;
    IP->showData( Data );
    DNS->showData( Data );
}

void PPPEdit::SLOT_SelectTopic( int v ) {
    Options_WS->raiseWidget( v );
}