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