summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/edit.h
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/edit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/edit.h251
1 files changed, 251 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/ppp/edit.h b/noncore/settings/networksettings/ppp/edit.h
new file mode 100644
index 0000000..cd0161f
--- a/dev/null
+++ b/noncore/settings/networksettings/ppp/edit.h
@@ -0,0 +1,251 @@
1/* -*- C++ -*-
2 *
3 * kPPP: A pppd Front End for the KDE project
4 *
5 * $Id$
6 * Copyright (C) 1997 Bernd Johannes Wuebben
7 * wuebben@math.cornell.edu
8 *
9 * based on EzPPP:
10 * Copyright (C) 1997 Jay Painter
11 *
12 *
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.
17 *
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.
22 *
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., 675 Mass Ave, Cambridge, MA 02139, USA.
26 */
27
28
29#ifndef _EDIT_H_
30#define _EDIT_H_
31
32#include <qdialog.h>
33#include <qpushbutton.h>
34#include <qgroupbox.h>
35#include <qvgroupbox.h>
36#include <qscrollbar.h>
37#include <qcombobox.h>
38#include <qlineedit.h>
39#include <qlistbox.h>
40#include <qradiobutton.h>
41#include <qbuttongroup.h>
42#include <qcheckbox.h>
43#include <qlabel.h>
44//#include <kdialogbase.h>
45#include "scriptedit.h"
46#include "kpppconfig.h"
47#include "pppdargs.h"
48
49class IPLineEdit;
50
51class DialWidget : public QWidget {
52 Q_OBJECT
53public:
54 DialWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
55 ~DialWidget() {}
56
57public slots:
58 bool save();
59 void pppdargsbutton();
60 void numbersChanged();
61 void selectionChanged(int);
62 void addNumber();
63 void delNumber();
64 void upNumber();
65 void downNumber();
66
67private:
68 QLineEdit *connectname_l;
69 QLabel *connect_label;
70 QLabel *number_label;
71 QPushButton *pppdargs;
72 QComboBox *auth;
73 QLabel *auth_l;
74 QCheckBox *store_password;
75
76 // for the phonenumber selection
77 QPushButton *add, *del, *up, *down;
78 QListBox *numbers;
79};
80
81
82/////////////////////////////////////////////////////////////////////////////
83//
84// tab-window to select what to execute when
85//
86/////////////////////////////////////////////////////////////////////////////
87class ExecWidget : public QWidget {
88 Q_OBJECT
89public:
90 ExecWidget(QWidget *parent=0, bool isnewaccount=true, const char *name=0);
91
92public slots:
93 bool save();
94
95private:
96 QLineEdit *before_connect;
97 QLabel *before_connect_l;
98
99 QLineEdit *command;
100 QLabel *command_label;
101
102 QLineEdit *predisconnect;
103 QLabel *predisconnect_label;
104
105 QLineEdit *discommand;
106 QLabel *discommand_label;
107};
108
109
110class IPWidget : public QWidget {
111 Q_OBJECT
112public:
113 IPWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
114 ~IPWidget() {}
115
116public slots:
117 void save();
118
119protected slots:
120 void hitIPSelect( int );
121 void autoname_t(bool on);
122
123private:
124 QLabel *ipaddress_label;
125 QLabel *sub_label;
126 QGroupBox *box1;
127 QVGroupBox *box;
128
129 QButtonGroup *rb;
130 QRadioButton *dynamicadd_rb;
131 QRadioButton *staticadd_rb;
132
133 IPLineEdit *ipaddress_l;
134 IPLineEdit *subnetmask_l;
135
136 QCheckBox *autoname;
137};
138
139
140class DNSWidget : public QWidget {
141 Q_OBJECT
142public:
143 DNSWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
144 ~DNSWidget() {}
145
146public slots:
147 void save();
148
149protected slots:
150 void adddns();
151 void removedns();
152 void DNS_Edit_Changed(const QString &);
153 void DNS_Entry_Selected(int);
154 void DNS_Mode_Selected(int);
155
156private:
157 QLabel *conf_label;
158 QButtonGroup *bg;
159 QRadioButton *autodns, *mandns;
160 QLabel *dns_label;
161 QLabel *servers_label;
162 IPLineEdit *dnsipaddr;
163 QPushButton *add;
164 QPushButton *remove;
165 QListBox *dnsservers;
166 QLineEdit *dnsdomain;
167 QLabel *dnsdomain_label;
168 QCheckBox *exdnsdisabled_toggle;
169};
170
171
172class GatewayWidget : public QWidget {
173 Q_OBJECT
174public:
175 GatewayWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
176 ~GatewayWidget() {}
177
178public slots:
179 void save();
180
181private slots:
182 void hitGatewaySelect( int );
183
184private:
185 QGroupBox *box;
186 QLabel *gate_label;
187 QGroupBox *box1;
188 QButtonGroup *rb;
189 QRadioButton *defaultgateway;
190 QRadioButton *staticgateway;
191 IPLineEdit *gatewayaddr;
192 QCheckBox *defaultroute;
193};
194
195
196class ScriptWidget : public QWidget {
197 Q_OBJECT
198public:
199 ScriptWidget( QWidget *parent=0, bool isnewaccount = true, const char *name=0 );
200 ~ScriptWidget() {}
201
202public slots:
203 void save();
204 bool check();
205
206private slots:
207 void addButton();
208 void insertButton();
209 void removeButton();
210
211 //signals linked to the scroll bar
212 void scrolling(int);
213
214 //signals to keep the two listboxes highlighted in sync
215 void slhighlighted(int);
216 void stlhighlighted(int);
217
218private:
219 void adjustScrollBar();
220
221 ScriptEdit *se;
222 QPushButton *add;
223 QPushButton *remove;
224 QPushButton *insert;
225 QListBox *sl, *stl;
226
227 QScrollBar *slb;
228};
229
230
231/////////////////////////////////////////////////////////////////////////////
232//
233// Used to specify a new phone number
234//
235/////////////////////////////////////////////////////////////////////////////
236class PhoneNumberDialog : public QDialog {
237 Q_OBJECT
238public:
239 PhoneNumberDialog(QWidget *parent = 0);
240
241 QString phoneNumber();
242
243private slots:
244 void textChanged(const QString &);
245
246private:
247 QLineEdit *le;
248};
249
250
251#endif