summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/ppp/general.cpp
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings/ppp/general.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/settings/networksettings/ppp/general.cpp b/noncore/settings/networksettings/ppp/general.cpp
index ff1b11b..81dab38 100644
--- a/noncore/settings/networksettings/ppp/general.cpp
+++ b/noncore/settings/networksettings/ppp/general.cpp
@@ -1,184 +1,184 @@
/*
* kPPP: A pppd front end for the KDE project
*
* $Id$
*
* Copyright (C) 1997 Bernd Johannes Wuebben
* wuebben@math.cornell.edu
*
* based on EzPPP:
* Copyright (C) 1997 Jay Painter
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include "general.h"
#include "interfaceppp.h"
#include "modeminfo.h"
#include "modemcmds.h"
#include "pppdata.h"
/* OPIE */
#include <qpe/config.h>
#include <qpe/qpeapplication.h>
/* QT */
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qslider.h>
#include <qspinbox.h>
#include <qwhatsthis.h>
/* STD */
#include <termios.h>
#include <string.h>
ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
: QWidget(parent, name), _pppdata(pd)
{
int k;
QGridLayout *tl = new QGridLayout(this, 8, 2, 0 );//, KDialog::spacingHint());
QLabel *label1;
label1 = new QLabel(tr("Modem &name:"), this);
tl->addWidget(label1, 0, 0);
modemname = new QLineEdit(this, "modemName");
modemname->setText( _pppdata->devname() );
label1->setBuddy(modemname);
tl->addWidget(modemname, 0, 1);
label1 = new QLabel(tr("Modem de&vice:"), this);
tl->addWidget(label1, 1, 0);
modemdevice = new QComboBox(false, this);
modemdevice->setEditable( true );
modemdevice->setDuplicatesEnabled ( false );
modemdevice->setInsertionPolicy( QComboBox::AtTop );
label1->setBuddy(modemdevice);
Config cfg("NetworkSetupPPP");
cfg.setGroup("Devices_General");
QStringList devs = cfg.readListEntry("devices",',');
if (devs.isEmpty()) devs << "/dev/modem" << "/dev/ircomm0" << "/dev/ttyS0";
modemdevice->insertStringList( devs );
tl->addWidget(modemdevice, 1, 1);
// connect(modemdevice, SIGNAL(activated(int)),
// SLOT(setmodemdc(int)));
- // connect(modemdevice, SIGNAL(textChanged( const QString & ) ),
- // SLOT( setmodemdc( const QString &) ) );
+ // connect(modemdevice, SIGNAL(textChanged(const QString&) ),
+ // SLOT( setmodemdc(const QString&) ) );
QString tmp = tr("This specifies the serial port your modem is attached \n"
"to. On Linux/x86, typically this is either /dev/ttyS0 \n"
"(COM1 under DOS) or /dev/ttyS1 (COM2 under DOS).\n"
"\n"
"If you have an internal ISDN card with AT command\n"
"emulation (most cards under Linux support this), you\n"
"should select one of the /dev/ttyIx devices.");
QWhatsThis::add(label1,tmp);
QWhatsThis::add(modemdevice,tmp);
label1 = new QLabel(tr("&Flow control:"), this);
tl->addWidget(label1, 2, 0);
flowcontrol = new QComboBox(false, this);
label1->setBuddy(flowcontrol);
flowcontrol->insertItem(tr("Hardware [CRTSCTS]"));
flowcontrol->insertItem(tr("Software [XON/XOFF]"));
flowcontrol->insertItem(tr("None"));
tl->addWidget(flowcontrol, 2, 1);
// connect(flowcontrol, SIGNAL(activated(int)),
// SLOT(setflowcontrol(int)));
tmp = tr("<p>Specifies how the serial port and modem\n"
"communicate. You should not change this unless\n"
"you know what you are doing.\n"
"\n"
"<b>Default</b>: CRTSCTS");
QWhatsThis::add(label1,tmp);
QWhatsThis::add(flowcontrol,tmp);
QLabel *labelenter = new QLabel(tr("&Line termination:"), this);
tl->addWidget(labelenter, 3, 0);
enter = new QComboBox(false, this);
labelenter->setBuddy(enter);
enter->insertItem("CR");
enter->insertItem("LF");
enter->insertItem("CR/LF");
tl->addWidget(enter, 3, 1);
// connect(enter, SIGNAL(activated(int)), SLOT(setenter(int)));
tmp = tr("<p>Specifies how AT commands are sent to your\n"
"modem. Most modems will work fine with the\n"
"default <i>CR/LF</i>. If your modem does not react\n"
"to the init string, you should try different\n"
"settings here\n"
"\n"
"<b>Default</b>: CR/LF");
QWhatsThis::add(labelenter,tmp);
QWhatsThis::add(enter, tmp);
QLabel *baud_label = new QLabel(tr("Co&nnection speed:"), this);
tl->addWidget(baud_label, 4, 0);
baud_c = new QComboBox(this);
baud_label->setBuddy(baud_c);
static const char *baudrates[] =
{
#ifdef B460800
"460800",
#endif
#ifdef B230400
"230400",
#endif
#ifdef B115200
"115200",
#endif
#ifdef B57600
"57600",
#endif
"38400",
"19200",
"9600",
"2400",
0
};
for(k = 0; baudrates[k]; k++)
baud_c->insertItem(baudrates[k]);
baud_c->setCurrentItem(3);
// connect(baud_c, SIGNAL(activated(int)),
// this, SLOT(speed_selection(int)));
tl->addWidget(baud_c, 4, 1);
tmp = tr("Specifies the speed your modem and the serial\n"
"port talk to each other. You should begin with\n"