blob: 6588bbc8d7f7a1f81fe5882992911c82f9c8a3b2 (
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
56
57
58
59
60
|
#include <qcombobox.h>
#include <qpushbutton.h>
#include "pppimp.h"
#include "devices.h"
#include "modem.h"
#include "modeminfo.h"
//#include "pppdata.h"
PPPConfigureImp::PPPConfigureImp( QWidget* parent, const char* name, bool modal, WFlags fl) : PPP(parent, name, modal, fl) {
for(int i = 0; devices[i]; i++)
ComboBoxDevice->insertItem(devices[i]);
connect(PushButtonQuery, SIGNAL(clicked()), SLOT(queryModem()));
}
/**
* Open up the peers file and read any set settings
* @param peer the peer file to edit.
*/
void PPPConfigureImp::setPeer(const QString &newPeer){
peer = newPeer;
}
/**
* Save the settings for the current peer.
*/
void PPPConfigureImp::accept(){
// Check to make sure that all of the inputs are valid.
// Save settings.
/**
/dev/modem or just modem
<speed> any
defaultroute - automaticly add route
noipdefault - get an ip from the server
usepeerdns - automaticly add dns
crtscts - flow control enabled
name <name> - user name (and do secret file)
*/
// Make sure it is set in interfaces so pon/off can be used.
// Close out the dialog
QDialog::accept();
}
void PPPConfigureImp::queryModem()
{
Modem::modem = new Modem();
qDebug("setting device");
// gpppdata.setModemDevice(ComboBoxDevice->currentText());
qDebug("open dialog");
ModemTransfer mt(this);
mt.exec();
}
|