summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/general.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp
index f803628..a02ee35 100644
--- a/noncore/settings/networksettings/ppp/general.cpp
+++ b/noncore/settings/networksettings/ppp/general.cpp
@@ -161,22 +161,22 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name)
161 "that your serial port supports higher speeds)."); 161 "that your serial port supports higher speeds).");
162 162
163 QWhatsThis::add(baud_label,tmp); 163 QWhatsThis::add(baud_label,tmp);
164 QWhatsThis::add(baud_c,tmp); 164 QWhatsThis::add(baud_c,tmp);
165 165
166 for(int i=0; i <= enter->count()-1; i++) { 166 for(int i=0; i <= enter->count()-1; i++) {
167 if(gpppdata.enter() == enter->text(i)) 167 if(PPPData::data()->enter() == enter->text(i))
168 enter->setCurrentItem(i); 168 enter->setCurrentItem(i);
169 } 169 }
170 170
171 tl->addRowSpacing(4, 10); 171 tl->addRowSpacing(4, 10);
172 172
173 //Modem Lock File 173 //Modem Lock File
174 modemlockfile = new QCheckBox(i18n("&Use lock file"), this); 174 modemlockfile = new QCheckBox(i18n("&Use lock file"), this);
175 175
176 modemlockfile->setChecked(gpppdata.modemLockFile()); 176 modemlockfile->setChecked(PPPData::data()->modemLockFile());
177 connect(modemlockfile, SIGNAL(toggled(bool)), 177 connect(modemlockfile, SIGNAL(toggled(bool)),
178 SLOT(modemlockfilechanged(bool))); 178 SLOT(modemlockfilechanged(bool)));
179 tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1); 179 tl->addMultiCellWidget(modemlockfile, 5, 5, 0, 1);
180 // l12->addStretch(1); 180 // l12->addStretch(1);
181 QWhatsThis::add(modemlockfile, 181 QWhatsThis::add(modemlockfile,
182 i18n("<p>To prevent other programs from accessing the\n" 182 i18n("<p>To prevent other programs from accessing the\n"
@@ -188,13 +188,13 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name)
188 "be done.\n" 188 "be done.\n"
189 "\n" 189 "\n"
190 "<b>Default</b>: On")); 190 "<b>Default</b>: On"));
191 191
192 // Modem Timeout Line Edit Box 192 // Modem Timeout Line Edit Box
193 193
194 modemtimeout = new KIntNumInput(gpppdata.modemTimeout(), this); 194 modemtimeout = new KIntNumInput(PPPData::data()->modemTimeout(), this);
195 modemtimeout->setLabel(i18n("Modem &timeout:")); 195 modemtimeout->setLabel(i18n("Modem &timeout:"));
196 modemtimeout->setRange(1, 120, 1); 196 modemtimeout->setRange(1, 120, 1);
197 modemtimeout->setSuffix(i18n(" sec")); 197 modemtimeout->setSuffix(i18n(" sec"));
198 connect(modemtimeout, SIGNAL(valueChanged(int)), 198 connect(modemtimeout, SIGNAL(valueChanged(int)),
199 SLOT(modemtimeoutchanged(int))); 199 SLOT(modemtimeoutchanged(int)));
200 tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1); 200 tl->addMultiCellWidget(modemtimeout, 6, 6, 0, 1);
@@ -203,85 +203,85 @@ ModemWidget::ModemWidget( QWidget *parent, const char *name)
203 i18n("This specifies how long <i>kppp</i> waits for a\n" 203 i18n("This specifies how long <i>kppp</i> waits for a\n"
204 "<i>CONNECT</i> response from your modem. The\n" 204 "<i>CONNECT</i> response from your modem. The\n"
205 "recommended value is 30 seconds.")); 205 "recommended value is 30 seconds."));
206 206
207 //set stuff from gpppdata 207 //set stuff from gpppdata
208 for(int i=0; i <= enter->count()-1; i++) { 208 for(int i=0; i <= enter->count()-1; i++) {
209 if(gpppdata.enter() == enter->text(i)) 209 if(PPPData::data()->enter() == enter->text(i))
210 enter->setCurrentItem(i); 210 enter->setCurrentItem(i);
211 } 211 }
212 212
213 for(int i=0; i <= modemdevice->count()-1; i++) { 213 for(int i=0; i <= modemdevice->count()-1; i++) {
214 if(gpppdata.modemDevice() == modemdevice->text(i)) 214 if(PPPData::data()->modemDevice() == modemdevice->text(i))
215 modemdevice->setCurrentItem(i); 215 modemdevice->setCurrentItem(i);
216 } 216 }
217 217
218 for(int i=0; i <= flowcontrol->count()-1; i++) { 218 for(int i=0; i <= flowcontrol->count()-1; i++) {
219 if(gpppdata.flowcontrol() == flowcontrol->text(i)) 219 if(PPPData::data()->flowcontrol() == flowcontrol->text(i))
220 flowcontrol->setCurrentItem(i); 220 flowcontrol->setCurrentItem(i);
221 } 221 }
222 222
223 //set the modem speed 223 //set the modem speed
224 for(int i=0; i < baud_c->count(); i++) 224 for(int i=0; i < baud_c->count(); i++)
225 if(baud_c->text(i) == gpppdata.speed()) 225 if(baud_c->text(i) == PPPData::data()->speed())
226 baud_c->setCurrentItem(i); 226 baud_c->setCurrentItem(i);
227 227
228 tl->setRowStretch(7, 1); 228 tl->setRowStretch(7, 1);
229} 229}
230 230
231 231
232void ModemWidget::speed_selection(int) { 232void ModemWidget::speed_selection(int) {
233 gpppdata.setSpeed(baud_c->text(baud_c->currentItem())); 233 PPPData::data()->setSpeed(baud_c->text(baud_c->currentItem()));
234} 234}
235 235
236 236
237void ModemWidget::setenter(int ) { 237void ModemWidget::setenter(int ) {
238 gpppdata.setEnter(enter->text(enter->currentItem())); 238 PPPData::data()->setEnter(enter->text(enter->currentItem()));
239} 239}
240 240
241 241
242void ModemWidget::setmodemdc(int i) { 242void ModemWidget::setmodemdc(int i) {
243 gpppdata.setModemDevice(modemdevice->text(i)); 243 PPPData::data()->setModemDevice(modemdevice->text(i));
244} 244}
245 245
246 246
247void ModemWidget::setflowcontrol(int i) { 247void ModemWidget::setflowcontrol(int i) {
248 gpppdata.setFlowcontrol(flowcontrol->text(i)); 248 PPPData::data()->setFlowcontrol(flowcontrol->text(i));
249} 249}
250 250
251 251
252void ModemWidget::modemlockfilechanged(bool set) { 252void ModemWidget::modemlockfilechanged(bool set) {
253 gpppdata.setModemLockFile(set); 253 PPPData::data()->setModemLockFile(set);
254} 254}
255 255
256 256
257void ModemWidget::modemtimeoutchanged(int n) { 257void ModemWidget::modemtimeoutchanged(int n) {
258 gpppdata.setModemTimeout(n); 258 PPPData::data()->setModemTimeout(n);
259} 259}
260 260
261 261
262ModemWidget2::ModemWidget2( QWidget *parent, const char *name) 262ModemWidget2::ModemWidget2( QWidget *parent, const char *name)
263 : QWidget(parent, name) 263 : QWidget(parent, name)
264{ 264{
265 QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint()); 265 QVBoxLayout *l1 = new QVBoxLayout(this, 0 );//, KDialog::spacingHint());
266 266
267 267
268 waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this); 268 waitfordt = new QCheckBox(i18n("&Wait for dial tone before dialing"), this);
269 waitfordt->setChecked(gpppdata.waitForDialTone()); 269 waitfordt->setChecked(PPPData::data()->waitForDialTone());
270 connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool))); 270 connect(waitfordt, SIGNAL(toggled(bool)), SLOT(waitfordtchanged(bool)));
271 l1->addWidget(waitfordt); 271 l1->addWidget(waitfordt);
272 QWhatsThis::add(waitfordt, 272 QWhatsThis::add(waitfordt,
273 i18n("<p>Normally the modem waits for a dial tone\n" 273 i18n("<p>Normally the modem waits for a dial tone\n"
274 "from your phone line, indicating that it can\n" 274 "from your phone line, indicating that it can\n"
275 "start to dial a number. If your modem does not\n" 275 "start to dial a number. If your modem does not\n"
276 "recognize this sound, or your local phone system\n" 276 "recognize this sound, or your local phone system\n"
277 "does not emit such a tone, uncheck this option\n" 277 "does not emit such a tone, uncheck this option\n"
278 "\n" 278 "\n"
279 "<b>Default:</b>: On")); 279 "<b>Default:</b>: On"));
280 280
281 busywait = new KIntNumInput(gpppdata.busyWait(), this); 281 busywait = new KIntNumInput(PPPData::data()->busyWait(), this);
282 busywait->setLabel(i18n("B&usy wait:")); 282 busywait->setLabel(i18n("B&usy wait:"));
283 busywait->setRange(0, 300, 5, true); 283 busywait->setRange(0, 300, 5, true);
284 busywait->setSuffix(i18n(" sec")); 284 busywait->setSuffix(i18n(" sec"));
285 connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int))); 285 connect(busywait, SIGNAL(valueChanged(int)), SLOT(busywaitchanged(int)));
286 l1->addWidget(busywait); 286 l1->addWidget(busywait);
287 287
@@ -298,13 +298,13 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name)
298 298
299 QHBoxLayout *hbl = new QHBoxLayout; 299 QHBoxLayout *hbl = new QHBoxLayout;
300 hbl->setSpacing(2);//KDialog::spacingHint()); 300 hbl->setSpacing(2);//KDialog::spacingHint());
301 301
302 QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), this); 302 QLabel *volumeLabel = new QLabel(i18n("Modem &volume:"), this);
303 hbl->addWidget(volumeLabel); 303 hbl->addWidget(volumeLabel);
304 volume = new QSlider(0, 2, 1, gpppdata.volume(), QSlider::Horizontal, this); 304 volume = new QSlider(0, 2, 1, PPPData::data()->volume(), QSlider::Horizontal, this);
305 volumeLabel->setBuddy(volume); 305 volumeLabel->setBuddy(volume);
306 volume->setTickmarks(QSlider::Below); 306 volume->setTickmarks(QSlider::Below);
307 hbl->addWidget(volume); 307 hbl->addWidget(volume);
308 308
309 l1->addLayout(hbl); 309 l1->addLayout(hbl);
310 310
@@ -322,13 +322,13 @@ ModemWidget2::ModemWidget2( QWidget *parent, const char *name)
322 QWhatsThis::add(volume, tmp); 322 QWhatsThis::add(volume, tmp);
323 323
324 l1->addSpacing(20); 324 l1->addSpacing(20);
325 325
326#if 0 326#if 0
327 chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this); 327 chkbox1 = new QCheckBox(i18n("Modem asserts CD line"), this);
328 chkbox1->setChecked(gpppdata.UseCDLine()); 328 chkbox1->setChecked(PPPData::data()->UseCDLine());
329 connect(chkbox1,SIGNAL(toggled(bool)), 329 connect(chkbox1,SIGNAL(toggled(bool)),
330 this,SLOT(use_cdline_toggled(bool))); 330 this,SLOT(use_cdline_toggled(bool)));
331 l12->addWidget(chkbox1); 331 l12->addWidget(chkbox1);
332 l12->addStretch(1); 332 l12->addStretch(1);
333 l1->addStretch(1); 333 l1->addStretch(1);
334 QWhatsThis::add(chkbox1, 334 QWhatsThis::add(chkbox1,
@@ -399,23 +399,23 @@ void ModemWidget2::query_modem() {
399// terminal.exec(); 399// terminal.exec();
400// } 400// }
401 401
402 402
403#if 0 403#if 0
404void ModemWidget2::use_cdline_toggled(bool on) { 404void ModemWidget2::use_cdline_toggled(bool on) {
405 gpppdata.setUseCDLine(on); 405 PPPData::data()->setUseCDLine(on);
406} 406}
407#endif 407#endif
408 408
409void ModemWidget2::waitfordtchanged(bool b) { 409void ModemWidget2::waitfordtchanged(bool b) {
410 gpppdata.setWaitForDialTone((int)b); 410 PPPData::data()->setWaitForDialTone((int)b);
411} 411}
412 412
413void ModemWidget2::busywaitchanged(int n) { 413void ModemWidget2::busywaitchanged(int n) {
414 gpppdata.setbusyWait(n); 414 PPPData::data()->setbusyWait(n);
415} 415}
416 416
417 417
418void ModemWidget2::volumeChanged(int v) { 418void ModemWidget2::volumeChanged(int v) {
419 gpppdata.setVolume(v); 419 PPPData::data()->setVolume(v);
420} 420}
421 421