3 * kPPP: A pppd Front End for the KDE project
6 * Copyright (C) 1997 Bernd Johannes Wuebben
7 * wuebben@math.cornell.edu
10 * Copyright (C) 1997 Jay Painter
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this program; if not, write to the Free
25 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
33 #include <qpushbutton.h>
34 #include <q3groupbox.h>
35 #include <qscrollbar.h>
36 #include <qcombobox.h>
37 #include <qlineedit.h>
38 #include <q3listbox.h>
39 #include <qradiobutton.h>
40 #include <q3buttongroup.h>
41 #include <qcheckbox.h>
44 #include "scriptedit.h"
45 #include "kpppconfig.h"
49 class DialWidget
: public QWidget
{
52 explicit DialWidget( QWidget
*parent
=0, bool isnewaccount
= true);
57 void pppdargsbutton();
58 void numbersChanged();
59 void cbtypeChanged(int);
60 void selectionChanged(int);
67 QLineEdit
*connectname_l
;
68 QLabel
*connect_label
;
70 QPushButton
*pppdargs
;
73 QCheckBox
*store_password
;
80 // for the phonenumber selection
81 QPushButton
*add
, *del
, *up
, *down
;
86 /////////////////////////////////////////////////////////////////////////////
88 // tab-window to select what to execute when
90 /////////////////////////////////////////////////////////////////////////////
91 class ExecWidget
: public QWidget
{
94 explicit ExecWidget(QWidget
*parent
=0, bool isnewaccount
=true);
100 QLineEdit
*before_connect
;
101 QLabel
*before_connect_l
;
104 QLabel
*command_label
;
106 QLineEdit
*predisconnect
;
107 QLabel
*predisconnect_label
;
109 QLineEdit
*discommand
;
110 QLabel
*discommand_label
;
114 class IPWidget
: public QWidget
{
117 explicit IPWidget( QWidget
*parent
=0, bool isnewaccount
= true, const char *name
=0 );
124 void hitIPSelect( int );
125 void autoname_t(bool on
);
128 QLabel
*ipaddress_label
;
134 QRadioButton
*dynamicadd_rb
;
135 QRadioButton
*staticadd_rb
;
137 IPLineEdit
*ipaddress_l
;
138 IPLineEdit
*subnetmask_l
;
144 class DNSWidget
: public QWidget
{
147 explicit DNSWidget( QWidget
*parent
=0, bool isnewaccount
= true );
156 void DNS_Edit_Changed(const QString
&);
157 void DNS_Entry_Selected(int);
158 void DNS_Mode_Selected(int);
163 QRadioButton
*autodns
, *mandns
;
165 QLabel
*servers_label
;
166 IPLineEdit
*dnsipaddr
;
169 Q3ListBox
*dnsservers
;
170 QLineEdit
*dnsdomain
;
171 QLabel
*dnsdomain_label
;
172 QCheckBox
*exdnsdisabled_toggle
;
176 class GatewayWidget
: public QWidget
{
179 explicit GatewayWidget( QWidget
*parent
=0, bool isnewaccount
= true );
186 void hitGatewaySelect( int );
193 QRadioButton
*defaultgateway
;
194 QRadioButton
*staticgateway
;
195 IPLineEdit
*gatewayaddr
;
196 QCheckBox
*defaultroute
;
200 class ScriptWidget
: public QWidget
{
203 explicit ScriptWidget( QWidget
*parent
=0, bool isnewaccount
= true, const char *name
=0 );
215 //signals linked to the scroll bar
218 //signals to keep the two listboxes highlighted in sync
219 void slhighlighted(int);
220 void stlhighlighted(int);
223 void adjustScrollBar();
235 /////////////////////////////////////////////////////////////////////////////
237 // Used to specify a new phone number
239 /////////////////////////////////////////////////////////////////////////////
240 class PhoneNumberDialog
: public KDialog
{
243 PhoneNumberDialog(QWidget
*parent
= 0);
245 QString
phoneNumber();
248 void textChanged(const QString
&);