From a63b3b36cf4d665b67733e069bfaad8f96388276 Mon Sep 17 00:00:00 2001 From: benmeyer Date: Fri, 18 Oct 2002 18:12:53 +0000 Subject: interfaces now watches for # in most cases --- (limited to 'noncore/settings/networksettings') diff --git a/noncore/settings/networksettings/interfaceinformation.ui b/noncore/settings/networksettings/interfaceinformation.ui index fc99fce..2838d19 100644 --- a/noncore/settings/networksettings/interfaceinformation.ui +++ b/noncore/settings/networksettings/interfaceinformation.ui @@ -51,7 +51,7 @@ text - Refresh + &Refresh @@ -62,7 +62,7 @@ text - Stop + S&top @@ -73,7 +73,7 @@ text - Restart + R&estart @@ -84,7 +84,7 @@ text - Start + &Start @@ -293,7 +293,7 @@ text - View Advanced Information + View &Advanced Information @@ -333,8 +333,6 @@ 789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758 - - startButton stopButton diff --git a/noncore/settings/networksettings/interfaces.cpp b/noncore/settings/networksettings/interfaces.cpp index 9155890..377a6db 100644 --- a/noncore/settings/networksettings/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces.cpp @@ -51,7 +51,7 @@ QStringList Interfaces::getInterfaceList(){ QStringList list; for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { QString line = (*it).simplifyWhiteSpace(); - if(line.contains(IFACE)){ + if(line.contains(IFACE) && line.at(0) != '#'){ line = line.mid(QString(IFACE).length() +1, line.length()); line = line.simplifyWhiteSpace(); int findSpace = line.find(" "); @@ -457,7 +457,7 @@ bool Interfaces::setStanza(QString stanza, QString option, QStringList::Iterator iterator = interfaces.end(); for ( QStringList::Iterator it = interfaces.begin(); it != interfaces.end(); ++it ) { QString line = (*it).simplifyWhiteSpace(); - if(line.contains(stanza) && line.contains(option)){ + if(line.contains(stanza) && line.contains(option) && line.at(0) != '#'){ uint point = line.find(option); bool valid = true; if(point > 0){ @@ -503,7 +503,7 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString found = true; break; } - if((*it).contains(option) && it != start){ + if((*it).contains(option) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); @@ -534,7 +534,7 @@ bool Interfaces::removeOption(QStringList::Iterator start, QString option, QStri // got to the end without finding it break; } - if((*it).contains(option) && (*it).contains(value) &&it != start){ + if((*it).contains(option) && (*it).contains(value) && it != start && (*it).at(0) != '#'){ // Found it in stanza so replace it. if(found) qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); @@ -587,7 +587,7 @@ QString Interfaces::getOption(QStringList::Iterator start, QString option, bool if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ break; } - if((*it).contains(option)){ + if((*it).contains(option) && (*it).at(0) != '#'){ if(found) qDebug(QString("Interfaces: Get Options found more then one value: %1 for option: %2 in stanza %3").arg((*it)).arg(option).arg((*start)).latin1()); found = true; diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 01063c2..8e4e898 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp @@ -232,7 +232,7 @@ void MainWindowImp::configureClicked(){ if(i->getModuleOwner()){ i->getModuleOwner()->setProfile(currentProfile); QTabWidget *tabWidget = NULL; - QWidget *moduleConfigure = i->getModuleOwner()->configure(&tabWidget); + QWidget *moduleConfigure = i->getModuleOwner()->configure(i, &tabWidget); if(moduleConfigure != NULL){ if(tabWidget != NULL){ InterfaceSetupImp *configure = new InterfaceSetupImp(tabWidget, "InterfaceSetupImp", i, true); @@ -278,7 +278,7 @@ void MainWindowImp::informationClicked(){ if(i->getModuleOwner()){ QTabWidget *tabWidget = NULL; - QWidget *moduleInformation = i->getModuleOwner()->information(&tabWidget); + QWidget *moduleInformation = i->getModuleOwner()->information(i, &tabWidget); if(moduleInformation != NULL){ if(tabWidget != NULL){ InterfaceInformationImp *information = new InterfaceInformationImp(tabWidget, "InterfaceSetupImp", i, true); diff --git a/noncore/settings/networksettings/module.h b/noncore/settings/networksettings/module.h index a30f492..96db5b3 100644 --- a/noncore/settings/networksettings/module.h +++ b/noncore/settings/networksettings/module.h @@ -29,7 +29,7 @@ public: * @param Interface* can be used in determining the icon. * @return QString the icon name (minus .png, .gif etc) */ - virtual QString getPixmapName(Interface* i) = 0; + virtual QString getPixmapName(Interface *) = 0; /** * Check to see if the interface i is owned by this module. @@ -40,17 +40,19 @@ public: /** * Create, set tabWiget and return the WLANConfigure Module + * @param Interface *i the interface to configure. * @param tabWidget a pointer to the tab widget that this configure has. * @return QWidget* pointer to the tab widget in this modules configure. */ - virtual QWidget *configure(QTabWidget **){ return NULL; } ; + virtual QWidget *configure(Interface *, QTabWidget **){ return NULL; } ; /** * Create, set tabWiget and return the Information Module + * @param Interface *i the interface to get info on. * @param tabWidget a pointer to the tab widget that this information has. * @return QWidget* pointer to the tab widget in this modules info. */ - virtual QWidget *information(QTabWidget **){ return NULL; }; + virtual QWidget *information(Interface *, QTabWidget **){ return NULL; }; /** * Get all active (up or down) interfaces -- cgit v0.9.0.2