summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings
Side-by-side diff
Diffstat (limited to 'noncore/settings/networksettings') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp4
-rw-r--r--noncore/settings/networksettings/mainwindowimp.cpp14
-rw-r--r--noncore/settings/networksettings/ppp/edit.cpp8
-rw-r--r--noncore/settings/networksettings/ppp/general.cpp4
-rw-r--r--noncore/settings/networksettings/ppp/kpppwidget.cpp12
-rw-r--r--noncore/settings/networksettings/ppp/pppdargs.cpp4
-rw-r--r--noncore/settings/networksettings/wlan/wlanimp2.cpp2
7 files changed, 24 insertions, 24 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp
index 698dfd3..ff65424 100644
--- a/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp
+++ b/noncore/settings/networksettings/interfaces/interfaceinformationimp.cpp
@@ -4,50 +4,50 @@
/* OPIE */
#include <qpe/config.h>
#include <qpe/qpeapplication.h>
/* QT */
#include <qcheckbox.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qgroupbox.h>
#include <qmessagebox.h>
#ifdef QWS
#else
#define showMaximized show
#endif
/**
* Constructor for the InterfaceInformationImp class. This class pretty much
* just display's information about the interface that is passed to it.
*/
InterfaceInformationImp::InterfaceInformationImp(QWidget *parent, const char *name, Interface *i, WFlags f):InterfaceInformation(parent, name, f), interface(i)
{
- connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *)));
- connect(i, SIGNAL(updateMessage(const QString &)), this, SLOT(showMessage(const QString &)));
+ connect(i, SIGNAL(updateInterface(Interface*)), this, SLOT(updateInterface(Interface*)));
+ connect(i, SIGNAL(updateMessage(const QString&)), this, SLOT(showMessage(const QString&)));
updateInterface(interface);
connect(startButton, SIGNAL(clicked()), interface, SLOT(start()));
connect(stopButton, SIGNAL(clicked()), interface, SLOT(stop()));
connect(restartButton, SIGNAL(clicked()), interface, SLOT(restart()));
connect(refreshButton, SIGNAL(clicked()), interface, SLOT(refresh()));
connect(advancedButton, SIGNAL(clicked()), this, SLOT(advanced()));
Config cfg("networksettings", Config::User);
cfg.setGroup("interface");
CheckBoxSilent->setChecked( cfg.readBoolEntry("silent", false) );
}
InterfaceInformationImp::~InterfaceInformationImp()
{
Config cfg("networksettings", Config::User);
cfg.setGroup("interface");
cfg.writeEntry("silent", CheckBoxSilent->isChecked() );
}
/**
* Update the interface information and buttons.
* @param Intarface *i the interface to update (should be the one we already
* know about).
*/
void InterfaceInformationImp::updateInterface(Interface *)
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp
index b0a1dd9..1e16b97 100644
--- a/noncore/settings/networksettings/mainwindowimp.cpp
+++ b/noncore/settings/networksettings/mainwindowimp.cpp
@@ -76,49 +76,49 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name, WFlags) : MainWi
/*
* we skipped it in getAllInterfaces now
* we need to ignore it as well
*/
if (m_handledIfaces.contains( *ni) )
{
qDebug("Not up iface handled by module");
continue;
}
bool found = false;
for( it = interfaceNames.begin(); it != interfaceNames.end(); ++it )
{
if(it.key() == (*ni))
found = true;
}
if(!found)
{
if(!(*ni).contains("_"))
{
Interface *i = new Interface(this, *ni, false);
i->setAttached(false);
i->setHardwareName(tr("Disconnected"));
interfaceNames.insert(i->getInterfaceName(), i);
updateInterface(i);
- connect(i, SIGNAL(updateInterface(Interface *)), this, SLOT(updateInterface(Interface *)));
+ connect(i, SIGNAL(updateInterface(Interface*)), this, SLOT(updateInterface(Interface*)));
}
}
}
//getInterfaceList();
connectionList->header()->hide();
Config cfg("NetworkSetup");
profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All"));
for ( QStringList::Iterator it = profiles.begin();
it != profiles.end(); ++it)
profilesList->insertItem((*it));
currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All"));
advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false);
scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME);
QFile file(scheme);
if ( file.open(IO_ReadOnly) )
{ // file opened successfully
QTextStream stream( &file ); // use a text stream
while ( !stream.eof() )
{ // until end of file...
QString line = stream.readLine(); // line of text excluding '\n'
if(line.contains("SCHEME"))
@@ -231,66 +231,66 @@ void MainWindowImp::getAllInterfaces()
ifcopy = ifr;
result = ioctl(sockfd, SIOCGIFFLAGS, &ifcopy);
flags = ifcopy.ifr_flags;
i = new Interface(this, ifr.ifr_name, false);
i->setAttached(true);
if ((flags & IFF_UP) == IFF_UP)
i->setStatus(true);
else
i->setStatus(false);
if ((flags & IFF_BROADCAST) == IFF_BROADCAST)
i->setHardwareName("Ethernet");
else if ((flags & IFF_POINTOPOINT) == IFF_POINTOPOINT)
i->setHardwareName("Point to Point");
else if ((flags & IFF_MULTICAST) == IFF_MULTICAST)
i->setHardwareName("Multicast");
else if ((flags & IFF_LOOPBACK) == IFF_LOOPBACK)
i->setHardwareName("Loopback");
else
i->setHardwareName("Unknown");
qWarning("Adding interface %s to interfaceNames\n", ifr.ifr_name);
interfaceNames.insert(i->getInterfaceName(), i);
updateInterface(i);
- connect(i, SIGNAL(updateInterface(Interface *)),
- this, SLOT(updateInterface(Interface *)));
+ connect(i, SIGNAL(updateInterface(Interface*)),
+ this, SLOT(updateInterface(Interface*)));
}
// now lets ask the plugins too ;)
QMap<Module*, QLibrary*>::Iterator it;
QList<Interface> ilist;
for( it = libraries.begin(); it != libraries.end(); ++it )
{
if(it.key())
{
ilist = it.key()->getInterfaces();
for( i = ilist.first(); i != 0; i = ilist.next() )
{
qWarning("Adding interface %s to interfaceNames\n", i->getInterfaceName().latin1() );
interfaceNames.insert(i->getInterfaceName(), i);
updateInterface(i);
- connect(i, SIGNAL(updateInterface(Interface *)),
- this, SLOT(updateInterface(Interface *)));
+ connect(i, SIGNAL(updateInterface(Interface*)),
+ this, SLOT(updateInterface(Interface*)));
}
}
}
}
/**
* Load all modules that are found in the path
* @param path a directory that is scaned for any plugins that can be loaded
* and attempts to load them
*/
void MainWindowImp::loadModules(const QString &path)
{
#ifdef DEBUG
qDebug("MainWindowImp::loadModules: %s", path.latin1());
#endif
QDir d(path);
if(!d.exists())
return;
// Don't want sym links
d.setFilter( QDir::Files | QDir::NoSymLinks );
const QFileInfoList *list = d.entryInfoList();
QFileInfoListIterator it( *list );
QFileInfo *fi;
@@ -691,50 +691,50 @@ void MainWindowImp::changeProfile()
{
QTextStream stream( &file );
stream << QString("SCHEME=%1").arg(newProfile);
file.close();
}
// restart all up devices?
if(QMessageBox::information(this, "Question","Restart all running interfaces?", QMessageBox::Ok, QMessageBox::No) == QMessageBox::Ok)
{
// Go through them one by one
QMap<Interface*, QListViewItem*>::Iterator it;
for( it = items.begin(); it != items.end(); ++it )
{
if(it.key()->getStatus() == true)
it.key()->restart();
}
}
}
// TODO change the profile in the modules
}
void MainWindowImp::makeChannel()
{
channel = new QCopChannel( "QPE/Application/networksettings", this );
- connect( channel, SIGNAL(received(const QCString&, const QByteArray&)),
- this, SLOT(receive(const QCString&, const QByteArray&)) );
+ connect( channel, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT(receive(const QCString&,const QByteArray&)) );
}
void MainWindowImp::receive(const QCString &msg, const QByteArray &arg)
{
bool found = false;
qDebug("MainWindowImp::receive QCop msg >"+msg+"<");
if (msg == "raise")
{
raise();
return;
}
QString dest = msg.left(msg.find("("));
QCString param = msg.right(msg.length() - msg.find("(") - 1);
param = param.left( param.length() - 1 );
qDebug("dest >%s< param >"+param+"<",dest.latin1());
QMap<Module*, QLibrary*>::Iterator it;
for( it = libraries.begin(); it != libraries.end(); ++it )
{
qDebug("plugin >%s<", it.key()->type().latin1() );
if(it.key()->type() == dest)
{
it.key()->receive( param, arg );
diff --git a/noncore/settings/networksettings/ppp/edit.cpp b/noncore/settings/networksettings/ppp/edit.cpp
index 7d21605..3b2393c 100644
--- a/noncore/settings/networksettings/ppp/edit.cpp
+++ b/noncore/settings/networksettings/ppp/edit.cpp
@@ -551,50 +551,50 @@ DNSWidget::DNSWidget( PPPData *pd, QWidget *parent, bool isnewaccount, const cha
tl->addWidget(conf_label, 1, 0);
bg = new QButtonGroup("Group", this);
connect(bg, SIGNAL(clicked(int)), SLOT(DNS_Mode_Selected(int)));
bg->hide();
autodns = new QRadioButton(tr("Automatic"), this);
bg->insert(autodns, 0);
tl->addWidget(autodns, 1, 1);
if(!_pppdata->pppdVersionMin(2, 3, 7))
autodns->setEnabled(false);
mandns = new QRadioButton(tr("Manual"), this);
bg->insert(mandns, 1);
tl->addWidget(mandns, 2, 1);
dns_label = new QLabel(tr("DNS IP address:"), this);
tl->addWidget(dns_label, 3, 0);
QHBoxLayout *l2 = new QHBoxLayout;
tl->addLayout(l2, 3, 1);
dnsipaddr = new IPLineEdit(this);
connect(dnsipaddr, SIGNAL(returnPressed()),
SLOT(adddns()));
- connect(dnsipaddr, SIGNAL(textChanged(const QString &)),
- SLOT(DNS_Edit_Changed(const QString &)));
+ connect(dnsipaddr, SIGNAL(textChanged(const QString&)),
+ SLOT(DNS_Edit_Changed(const QString&)));
l2->addWidget(dnsipaddr, 1);
l2->addStretch(1);
tmp = tr("<p>Allows you to specify a new DNS server to be\n"
"used while you are connected. When the\n"
"connection is closed, this DNS entry will be\n"
"removed again.\n"
"\n"
"To add a DNS server, type in the IP address of\n"
"the DNS server here and click on <b>Add</b>");
QWhatsThis::add(dns_label, tmp);
QWhatsThis::add(dnsipaddr, tmp);
QHBoxLayout *l1 = new QHBoxLayout;
tl->addLayout(l1, 4, 1);
add = new QPushButton(tr("Add"), this);
connect(add, SIGNAL(clicked()), SLOT(adddns()));
l1->addWidget(add);
// l1->addStretch(1);
QWhatsThis::add(add,
tr("Click this button to add the DNS server\n"
"specified in the field above. The entry\n"
"will then be added to the list below"));
@@ -1163,49 +1163,49 @@ void ScriptWidget::removeButton()
// Used to specify a new phone number
//
/////////////////////////////////////////////////////////////////////////////
PhoneNumberDialog::PhoneNumberDialog(QWidget *parent)
: QDialog(parent,"PhoneNumberDialog",true)
{
setCaption( tr("Add Phone Number") );
QVBoxLayout *layout = new QVBoxLayout( this );
layout->setSpacing( 3 );
layout->setMargin( 3 );
// QHBox *hbox = new QHBox(this);
// setMainWidget(hbox);
// hbox->setSpacing( 2 );//KDialog::spacingHint());
QLabel *label = new QLabel(this, tr("Enter a phone number:"));
layout->addWidget( label );
le = new QLineEdit(this, "lineEdit");
layout->addWidget( le );
- connect(le, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(le, SIGNAL(textChanged(const QString&)),
+ this, SLOT(textChanged(const QString&)));
le->setFocus();
textChanged("");
}
QString PhoneNumberDialog::phoneNumber()
{
QString s = le->text();
return s;
}
void PhoneNumberDialog::textChanged(const QString &s)
{
// enableButtonOK(s.length() > 0);
}
//#include "edit.moc"
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
@@ -63,50 +63,50 @@ ModemWidget::ModemWidget( PPPData *pd, QWidget *parent, const char *name )
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)));
diff --git a/noncore/settings/networksettings/ppp/kpppwidget.cpp b/noncore/settings/networksettings/ppp/kpppwidget.cpp
index e466358..e21bbc7 100644
--- a/noncore/settings/networksettings/ppp/kpppwidget.cpp
+++ b/noncore/settings/networksettings/ppp/kpppwidget.cpp
@@ -375,53 +375,53 @@ void KPPPWidget::log_window_toggled(bool on) {
// for(int i=0; i < count; i++) {
// _pppdata->setAccountbyIndex(i);
// connectto_c->insertItem(_pppdata->accname());
// }
// //set the default account
// if(!_pppdata->defaultAccount().isEmpty()) {
// for(int i=0; i < count; i++)
// if(_pppdata->defaultAccount() == connectto_c->text(i)) {
// connectto_c->setCurrentItem(i);
// _pppdata->setAccountbyIndex(i);
// ID_Edit->setText(_pppdata->storedUsername());
// PW_Edit->setText(_pppdata->storedPassword());
// }
// }
// else
// if(count > 0) {
// _pppdata->setDefaultAccount(connectto_c->text(0));
// _pppdata->save();
// ID_Edit->setText(_pppdata->storedUsername());
// PW_Edit->setText(_pppdata->storedPassword());
// }
-// connect(ID_Edit, SIGNAL(textChanged(const QString &)),
-// this, SLOT(usernameChanged(const QString &)));
+// connect(ID_Edit, SIGNAL(textChanged(const QString&)),
+// this, SLOT(usernameChanged(const QString&)));
-// connect(PW_Edit, SIGNAL(textChanged(const QString &)),
-// this, SLOT(passwordChanged(const QString &)));
+// connect(PW_Edit, SIGNAL(textChanged(const QString&)),
+// this, SLOT(passwordChanged(const QString&)));
// if (ID_Edit->text().isEmpty())
// ID_Edit->setFocus();
// else if (PW_Edit->text().isEmpty())
// PW_Edit->setFocus();
// }
void KPPPWidget::interruptConnection() {
// interrupt dial up
//
if (con->isVisible())
emit con->cancelbutton();
// disconnect if online
if (_pppdata->pppdRunning())
emit disconnect();
}
void KPPPWidget::sigPPPDDied() {
qDebug( "Received a SIGUSR1" );
@@ -700,50 +700,50 @@ void KPPPWidget::quitbutton() {
// void KPPPWidget::rulesetLoadError() {
// QMessageBox::warning(this,"error", ruleset_load_errmsg);
// }
// void KPPPWidget::startAccounting() {
// // volume accounting
// stats->totalbytes = 0;
// kdDebug() << "AcctEnabled: " << _pppdata->AcctEnabled() << endl;
// // load the ruleset
// if(!_pppdata->AcctEnabled())
// return;
// QString d = AccountingBase::getAccountingFile(_pppdata->accountingFile());
// // if(::access(d.data(), X_OK) != 0)
// acct = new Accounting(this, stats);
// // else
// // acct = new ExecutableAccounting(this);
// // connect to the accounting object
-// connect(acct, SIGNAL(changed(QString, QString)),
-// con_win, SLOT(slotAccounting(QString, QString)));
+// connect(acct, SIGNAL(changed(QString,QString)),
+// con_win, SLOT(slotAccounting(QString,QString)));
// // if(!acct->loadRuleSet(_pppdata->accountingFile())) {
// // QString s= QObject::tr("Can not load the accounting "
// // "ruleset \"%1\"!").arg(_pppdata->accountingFile());
// // starting the messagebox with a timer will prevent us
// // from blocking the calling function ConnectWidget::timerEvent
// ruleset_load_errmsg = s;
// QTimer::singleShot(0, this, SLOT(rulesetLoadError()));
// return;
// }
// //else
// // acct->slotStart();
// }
// void KPPPWidget::stopAccounting() {
// // store volume accounting
// // if(stats->totalbytes != 0)
// // _pppdata->setTotalBytes(stats->totalbytes);
// if(!_pppdata->AcctEnabled())
// return;
// // if(acct != 0) {
diff --git a/noncore/settings/networksettings/ppp/pppdargs.cpp b/noncore/settings/networksettings/ppp/pppdargs.cpp
index 66a4d82..d6d8d88 100644
--- a/noncore/settings/networksettings/ppp/pppdargs.cpp
+++ b/noncore/settings/networksettings/ppp/pppdargs.cpp
@@ -34,50 +34,50 @@
PPPdArguments::PPPdArguments( PPPData *pd, QWidget *parent, const char *name)
: QDialog(parent, name, TRUE), _pppdata(pd)
{
setCaption(tr("Customize pppd Arguments"));
// KWin::setIcons(winId(), kapp->icon(), kapp->miniIcon());
QVBoxLayout *l = new QVBoxLayout(this, 10, 10);
QHBoxLayout *tl = new QHBoxLayout(10);
l->addLayout(tl);
QVBoxLayout *l1 = new QVBoxLayout();
QVBoxLayout *l2 = new QVBoxLayout();
tl->addLayout(l1, 1);
tl->addLayout(l2, 0);
QHBoxLayout *l11 = new QHBoxLayout(10);
l1->addLayout(l11);
argument_label = new QLabel(tr("Argument:"), this);
l11->addWidget(argument_label);
argument = new QLineEdit(this);
connect(argument, SIGNAL(returnPressed()),
SLOT(addbutton()));
l11->addWidget(argument);
- connect(argument, SIGNAL(textChanged(const QString &)),
- this, SLOT(textChanged(const QString &)));
+ connect(argument, SIGNAL(textChanged(const QString&)),
+ this, SLOT(textChanged(const QString&)));
arguments = new QListBox(this);
arguments->setMinimumSize(1, fontMetrics().lineSpacing()*10);
connect(arguments, SIGNAL(highlighted(int)),
this, SLOT(itemSelected(int)));
l1->addWidget(arguments, 1);
add = new QPushButton(tr("Add"), this);
connect(add, SIGNAL(clicked()), SLOT(addbutton()));
l2->addWidget(add);
l2->addStretch(1);
remove = new QPushButton(tr("Remove"), this);
connect(remove, SIGNAL(clicked()), SLOT(removebutton()));
l2->addWidget(remove);
defaults = new QPushButton(tr("Defaults"), this);
connect(defaults, SIGNAL(clicked()), SLOT(defaultsbutton()));
l2->addWidget(defaults);
l->addSpacing(5);
//load info from gpppdata
diff --git a/noncore/settings/networksettings/wlan/wlanimp2.cpp b/noncore/settings/networksettings/wlan/wlanimp2.cpp
index 92339d6..dd1db28 100644
--- a/noncore/settings/networksettings/wlan/wlanimp2.cpp
+++ b/noncore/settings/networksettings/wlan/wlanimp2.cpp
@@ -33,49 +33,49 @@
#include <opie2/opcap.h>
#else
#define OProcess KProcess
#include <kprocess.h>
#endif
#define WIRELESS_OPTS "/etc/pcmcia/wireless.opts"
#define PREUP "/etc/network/if-pre-up.d/wireless-tools"
/**
* Constructor, read in the wireless.opts file for parsing later.
*/
WLANImp::WLANImp( QWidget* parent, const char* name, Interface *i, bool modal, WFlags fl) : WLAN(parent, name, modal, fl), interface(i), currentProfile("*") {
interfaces = new Interfaces();
interfaceSetup = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, interfaces);
tabWidget->insertTab(interfaceSetup, "TCP/IP");
// Check sanity - the existance of the wireless-tools if-pre-up script
QFile file(QString(PREUP));
if (file.exists()) {
qWarning(QString("WLANImp: Unable to open /etc/network/if-pre-up.d/wireless-tools"));
}
connect( rescanButton, SIGNAL( clicked() ), this, SLOT( rescanNeighbourhood() ) );
- connect( netView, SIGNAL( clicked( QListViewItem* ) ), this, SLOT( selectNetwork( QListViewItem* ) ) );
+ connect( netView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( selectNetwork(QListViewItem*) ) );
netView->setColumnAlignment( col_chn, AlignCenter );
netView->setItemMargin( 3 );
netView->setAllColumnsShowFocus( true );
}
WLANImp::~WLANImp() {
//FIXME: delete interfaces;
}
/**
* Change the profile for both wireless settings and network settings.
*/
void WLANImp::setProfile(const QString &profile){
interfaceSetup->setProfile(profile);
parseOpts();
}
void WLANImp::parseOpts() {
bool error;
QString opt;
if (! interfaces->isInterfaceSet())
return;