author | benmeyer <benmeyer> | 2002-10-18 16:27:02 (UTC) |
---|---|---|
committer | benmeyer <benmeyer> | 2002-10-18 16:27:02 (UTC) |
commit | 12851a09a2761ca6e189f080e9ca69bf4974302f (patch) (unidiff) | |
tree | 1b9a368fc5e424d4bf60f4c582b87b23a975c26a /noncore | |
parent | 47e60a8dc20f46dd00b9405f7fde122792018627 (diff) | |
download | opie-12851a09a2761ca6e189f080e9ca69bf4974302f.zip opie-12851a09a2761ca6e189f080e9ca69bf4974302f.tar.gz opie-12851a09a2761ca6e189f080e9ca69bf4974302f.tar.bz2 |
Can now remove mapping and is done so automagicly when you delete a profile
-rw-r--r-- | noncore/net/networksetup/interfaces.cpp | 64 | ||||
-rw-r--r-- | noncore/net/networksetup/interfaces.h | 4 | ||||
-rw-r--r-- | noncore/net/networksetup/interfacesetupimp.cpp | 1 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.cpp | 38 | ||||
-rw-r--r-- | noncore/net/networksetup/mainwindowimp.h | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaces.cpp | 64 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfaces.h | 4 | ||||
-rw-r--r-- | noncore/settings/networksettings/interfacesetupimp.cpp | 1 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.cpp | 38 | ||||
-rw-r--r-- | noncore/settings/networksettings/mainwindowimp.h | 1 |
10 files changed, 186 insertions, 30 deletions
diff --git a/noncore/net/networksetup/interfaces.cpp b/noncore/net/networksetup/interfaces.cpp index 0927258..9155890 100644 --- a/noncore/net/networksetup/interfaces.cpp +++ b/noncore/net/networksetup/interfaces.cpp | |||
@@ -332,24 +332,34 @@ bool Interfaces::setInterfaceMethod(QString newName){ | |||
332 | QString Interfaces::getInterfaceOption(QString option, bool &error){ | 332 | QString Interfaces::getInterfaceOption(QString option, bool &error){ |
333 | return getOption(currentIface, option, error); | 333 | return getOption(currentIface, option, error); |
334 | } | 334 | } |
335 | 335 | ||
336 | /** | 336 | /** |
337 | * Set a value for an option in the currently selected interface. If option | 337 | * Set a value for an option in the currently selected interface. If option |
338 | * doesn't exist then it is added along with the value. If value is set to an | 338 | * doesn't exist then it is added along with the value. |
339 | * empty string then option is removed. | ||
340 | * @param option the options to set the value. | 339 | * @param option the options to set the value. |
341 | * @param value the value that option should be set to. | 340 | * @param value the value that option should be set to. |
342 | * @param error set to true if any error occurs, false otherwise. | 341 | * @param error set to true if any error occurs, false otherwise. |
343 | * @return QString the options value. QString::null if error == true | 342 | * @return QString the options value. QString::null if error == true |
344 | */ | 343 | */ |
345 | bool Interfaces::setInterfaceOption(QString option, QString value){ | 344 | bool Interfaces::setInterfaceOption(QString option, QString value){ |
346 | return setOption(currentIface, option, value); | 345 | return setOption(currentIface, option, value); |
347 | } | 346 | } |
348 | 347 | ||
349 | /** | 348 | /** |
349 | * Removes a value for an option in the currently selected interface. | ||
350 | * @param option the options to set the value. | ||
351 | * @param value the value that option should be set to. | ||
352 | * @param error set to true if any error occurs, false otherwise. | ||
353 | * @return QString the options value. QString::null if error == true | ||
354 | */ | ||
355 | bool Interfaces::removeInterfaceOption(QString option, QString value){ | ||
356 | return removeOption(currentIface, option, value); | ||
357 | } | ||
358 | |||
359 | /** | ||
350 | * Removes all of the options from the currently selected interface. | 360 | * Removes all of the options from the currently selected interface. |
351 | * @return bool error if if successfull | 361 | * @return bool error if if successfull |
352 | */ | 362 | */ |
353 | bool Interfaces::removeAllInterfaceOptions(){ | 363 | bool Interfaces::removeAllInterfaceOptions(){ |
354 | return removeAllOptions(currentIface); | 364 | return removeAllOptions(currentIface); |
355 | } | 365 | } |
@@ -374,22 +384,43 @@ bool Interfaces::setMapping(QString interface){ | |||
374 | void Interfaces::addMapping(QString option){ | 384 | void Interfaces::addMapping(QString option){ |
375 | interfaces.append(""); | 385 | interfaces.append(""); |
376 | interfaces.append(QString(MAPPING " %1").arg(option)); | 386 | interfaces.append(QString(MAPPING " %1").arg(option)); |
377 | } | 387 | } |
378 | 388 | ||
379 | /** | 389 | /** |
390 | * Remove the currently selected map and all of its options. | ||
391 | * @return bool if successfull or not. | ||
392 | */ | ||
393 | bool Interfaces::removeMapping(){ | ||
394 | if(currentMapping == interfaces.end()) | ||
395 | return false; | ||
396 | (*currentMapping) = ""; | ||
397 | return removeAllOptions(currentMapping); | ||
398 | } | ||
399 | |||
400 | /** | ||
380 | * Set a map option within a mapping. | 401 | * Set a map option within a mapping. |
381 | * @param map map to use | 402 | * @param map map to use |
382 | * @param value value to go with map | 403 | * @param value value to go with map |
383 | * @return bool true if it is successfull. | 404 | * @return bool true if it is successfull. |
384 | */ | 405 | */ |
385 | bool Interfaces::setMap(QString map, QString value){ | 406 | bool Interfaces::setMap(QString map, QString value){ |
386 | return setOption(currentMapping, map, value); | 407 | return setOption(currentMapping, map, value); |
387 | } | 408 | } |
388 | 409 | ||
389 | /** | 410 | /** |
411 | * Removes a map option within a mapping. | ||
412 | * @param map map to use | ||
413 | * @param value value to go with map | ||
414 | * @return bool true if it is successfull. | ||
415 | */ | ||
416 | bool Interfaces::removeMap(QString map, QString value){ | ||
417 | return removeOption(currentMapping, map, value); | ||
418 | } | ||
419 | |||
420 | /** | ||
390 | * Get a map value within a mapping. | 421 | * Get a map value within a mapping. |
391 | * @param map map to get value of | 422 | * @param map map to get value of |
392 | * @param bool true if it is successfull. | 423 | * @param bool true if it is successfull. |
393 | * @return value that goes to the map | 424 | * @return value that goes to the map |
394 | */ | 425 | */ |
395 | QString Interfaces::getMap(QString map, bool &error){ | 426 | QString Interfaces::getMap(QString map, bool &error){ |
@@ -474,25 +505,48 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString | |||
474 | } | 505 | } |
475 | if((*it).contains(option) && it != start){ | 506 | if((*it).contains(option) && it != start){ |
476 | // Found it in stanza so replace it. | 507 | // Found it in stanza so replace it. |
477 | if(found) | 508 | if(found) |
478 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 509 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
479 | found = true; | 510 | found = true; |
480 | if(value == "") | ||
481 | (*it) = ""; | ||
482 | else | ||
483 | (*it) = QString("\t%1 %2").arg(option).arg(value); | 511 | (*it) = QString("\t%1 %2").arg(option).arg(value); |
484 | } | 512 | } |
485 | } | 513 | } |
486 | if(!found){ | 514 | if(!found){ |
487 | QStringList::Iterator p = start; | 515 | QStringList::Iterator p = start; |
488 | interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); | 516 | interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); |
489 | found = true; | 517 | found = true; |
490 | } | 518 | } |
491 | return found; | 519 | return found; |
492 | } | 520 | } |
521 | /** | ||
522 | * Removes a option in a stanza | ||
523 | * @param start the start of the stanza | ||
524 | * @param option the option to use when setting value. | ||
525 | * @return bool true if successfull, false otherwise. | ||
526 | */ | ||
527 | bool Interfaces::removeOption(QStringList::Iterator start, QString option, QString value){ | ||
528 | if(start == interfaces.end()) | ||
529 | return false; | ||
530 | |||
531 | bool found = false; | ||
532 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | ||
533 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | ||
534 | // got to the end without finding it | ||
535 | break; | ||
536 | } | ||
537 | if((*it).contains(option) && (*it).contains(value) &&it != start){ | ||
538 | // Found it in stanza so replace it. | ||
539 | if(found) | ||
540 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | ||
541 | found = true; | ||
542 | (*it) = ""; | ||
543 | } | ||
544 | } | ||
545 | return found; | ||
546 | } | ||
493 | 547 | ||
494 | /** | 548 | /** |
495 | * Removes all options in a stanza | 549 | * Removes all options in a stanza |
496 | * @param start the start of the stanza | 550 | * @param start the start of the stanza |
497 | * @return bool true if successfull, false otherwise. | 551 | * @return bool true if successfull, false otherwise. |
498 | */ | 552 | */ |
diff --git a/noncore/net/networksetup/interfaces.h b/noncore/net/networksetup/interfaces.h index 7cf04f0..e09ea71 100644 --- a/noncore/net/networksetup/interfaces.h +++ b/noncore/net/networksetup/interfaces.h | |||
@@ -38,26 +38,30 @@ public: | |||
38 | QString getInterfaceFamily(bool &error); | 38 | QString getInterfaceFamily(bool &error); |
39 | bool setInterfaceFamily(QString newName); | 39 | bool setInterfaceFamily(QString newName); |
40 | QString getInterfaceMethod(bool &error); | 40 | QString getInterfaceMethod(bool &error); |
41 | bool setInterfaceMethod(QString newName); | 41 | bool setInterfaceMethod(QString newName); |
42 | QString getInterfaceOption(QString option, bool &error); | 42 | QString getInterfaceOption(QString option, bool &error); |
43 | bool setInterfaceOption(QString option, QString value); | 43 | bool setInterfaceOption(QString option, QString value); |
44 | bool removeInterfaceOption(QString option, QString value); | ||
44 | bool removeAllInterfaceOptions(); | 45 | bool removeAllInterfaceOptions(); |
45 | 46 | ||
46 | bool setMapping(QString interface); | 47 | bool setMapping(QString interface); |
48 | bool removeMapping(); | ||
47 | void addMapping(QString options); | 49 | void addMapping(QString options); |
48 | bool setMap(QString map, QString value); | 50 | bool setMap(QString map, QString value); |
51 | bool removeMap(QString map, QString value); | ||
49 | QString getMap(QString map, bool &error); | 52 | QString getMap(QString map, bool &error); |
50 | bool setScript(QString); | 53 | bool setScript(QString); |
51 | QString getScript(bool &error); | 54 | QString getScript(bool &error); |
52 | 55 | ||
53 | bool write(); | 56 | bool write(); |
54 | 57 | ||
55 | private: | 58 | private: |
56 | bool setStanza(QString stanza, QString option,QStringList::Iterator &iterator); | 59 | bool setStanza(QString stanza, QString option,QStringList::Iterator &iterator); |
57 | bool setOption(QStringList::Iterator start, QString option, QString value); | 60 | bool setOption(QStringList::Iterator start, QString option, QString value); |
61 | bool removeOption(QStringList::Iterator start, QString option, QString value); | ||
58 | QString getOption(QStringList::Iterator start, QString option, bool &error); | 62 | QString getOption(QStringList::Iterator start, QString option, bool &error); |
59 | bool removeAllOptions(QStringList::Iterator start); | 63 | bool removeAllOptions(QStringList::Iterator start); |
60 | 64 | ||
61 | QString interfacesFile; | 65 | QString interfacesFile; |
62 | QStringList interfaces; | 66 | QStringList interfaces; |
63 | QStringList::Iterator currentIface; | 67 | QStringList::Iterator currentIface; |
diff --git a/noncore/net/networksetup/interfacesetupimp.cpp b/noncore/net/networksetup/interfacesetupimp.cpp index bdbdfde..1327726 100644 --- a/noncore/net/networksetup/interfacesetupimp.cpp +++ b/noncore/net/networksetup/interfacesetupimp.cpp | |||
@@ -89,13 +89,12 @@ bool InterfaceSetupImp::saveSettings(){ | |||
89 | * @profile the new profile. | 89 | * @profile the new profile. |
90 | */ | 90 | */ |
91 | void InterfaceSetupImp::setProfile(const QString &profile){ | 91 | void InterfaceSetupImp::setProfile(const QString &profile){ |
92 | QString newInterfaceName = interface->getInterfaceName(); | 92 | QString newInterfaceName = interface->getInterfaceName(); |
93 | if(profile.length() > 0) | 93 | if(profile.length() > 0) |
94 | newInterfaceName += "_" + profile; | 94 | newInterfaceName += "_" + profile; |
95 | qDebug( newInterfaceName.latin1()); | ||
96 | // See if we have to make a interface. | 95 | // See if we have to make a interface. |
97 | if(!interfaces->setInterface(newInterfaceName)){ | 96 | if(!interfaces->setInterface(newInterfaceName)){ |
98 | // Add making for this new interface if need too | 97 | // Add making for this new interface if need too |
99 | if(profile != ""){ | 98 | if(profile != ""){ |
100 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); | 99 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); |
101 | if(!interfaces->setMapping(interface->getInterfaceName())){ | 100 | if(!interfaces->setMapping(interface->getInterfaceName())){ |
diff --git a/noncore/net/networksetup/mainwindowimp.cpp b/noncore/net/networksetup/mainwindowimp.cpp index 9f07f0d..01063c2 100644 --- a/noncore/net/networksetup/mainwindowimp.cpp +++ b/noncore/net/networksetup/mainwindowimp.cpp | |||
@@ -29,13 +29,14 @@ | |||
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
31 | 31 | ||
32 | #define TEMP_ALL "/tmp/ifconfig-a" | 32 | #define TEMP_ALL "/tmp/ifconfig-a" |
33 | #define TEMP_UP "/tmp/ifconfig" | 33 | #define TEMP_UP "/tmp/ifconfig" |
34 | 34 | ||
35 | #define SCHEME "/var/lib/pcmcia/scheme" | 35 | #define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" |
36 | |||
36 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){ | 37 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){ |
37 | connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); | 38 | connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); |
38 | connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); | 39 | connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); |
39 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); | 40 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); |
40 | connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); | 41 | connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); |
41 | 42 | ||
@@ -53,14 +54,15 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
53 | Config cfg("NetworkSetup"); | 54 | Config cfg("NetworkSetup"); |
54 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); | 55 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); |
55 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) | 56 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) |
56 | profilesList->insertItem((*it)); | 57 | profilesList->insertItem((*it)); |
57 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); | 58 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); |
58 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); | 59 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); |
60 | scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); | ||
59 | 61 | ||
60 | QFile file(SCHEME); | 62 | QFile file(scheme); |
61 | if ( file.open(IO_ReadOnly) ) { // file opened successfully | 63 | if ( file.open(IO_ReadOnly) ) { // file opened successfully |
62 | QTextStream stream( &file ); // use a text stream | 64 | QTextStream stream( &file ); // use a text stream |
63 | while ( !stream.eof() ) { // until end of file... | 65 | while ( !stream.eof() ) { // until end of file... |
64 | QString line = stream.readLine(); // line of text excluding '\n' | 66 | QString line = stream.readLine(); // line of text excluding '\n' |
65 | if(line.contains("SCHEME")){ | 67 | if(line.contains("SCHEME")){ |
66 | line = line.mid(7, line.length()); | 68 | line = line.mid(7, line.length()); |
@@ -92,13 +94,13 @@ MainWindowImp::~MainWindowImp(){ | |||
92 | /** | 94 | /** |
93 | * Load all modules that are found in the path | 95 | * Load all modules that are found in the path |
94 | * @param path a directory that is scaned for any plugins that can be loaded | 96 | * @param path a directory that is scaned for any plugins that can be loaded |
95 | * and attempts to load them | 97 | * and attempts to load them |
96 | */ | 98 | */ |
97 | void MainWindowImp::loadModules(QString path){ | 99 | void MainWindowImp::loadModules(QString path){ |
98 | qDebug(path.latin1()); | 100 | //qDebug(path.latin1()); |
99 | QDir d(path); | 101 | QDir d(path); |
100 | if(!d.exists()) | 102 | if(!d.exists()) |
101 | return; | 103 | return; |
102 | 104 | ||
103 | // Don't want sym links | 105 | // Don't want sym links |
104 | d.setFilter( QDir::Files | QDir::NoSymLinks ); | 106 | d.setFilter( QDir::Files | QDir::NoSymLinks ); |
@@ -117,13 +119,13 @@ void MainWindowImp::loadModules(QString path){ | |||
117 | * Attempt to load a function and resolve a function. | 119 | * Attempt to load a function and resolve a function. |
118 | * @param pluginFileName - the name of the file in which to attempt to load | 120 | * @param pluginFileName - the name of the file in which to attempt to load |
119 | * @param resolveString - function pointer to resolve | 121 | * @param resolveString - function pointer to resolve |
120 | * @return pointer to the function with name resolveString or NULL | 122 | * @return pointer to the function with name resolveString or NULL |
121 | */ | 123 | */ |
122 | Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ | 124 | Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ |
123 | qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1()); | 125 | //qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1()); |
124 | QLibrary *lib = new QLibrary(pluginFileName); | 126 | QLibrary *lib = new QLibrary(pluginFileName); |
125 | void *functionPointer = lib->resolve(resolveString); | 127 | void *functionPointer = lib->resolve(resolveString); |
126 | if( !functionPointer ){ | 128 | if( !functionPointer ){ |
127 | qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); | 129 | qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); |
128 | delete lib; | 130 | delete lib; |
129 | return NULL; | 131 | return NULL; |
@@ -487,16 +489,34 @@ void MainWindowImp::removeProfile(){ | |||
487 | 489 | ||
488 | if(QMessageBox::information(this, "Question",QString("Remove profile: %1").arg(profileToRemove), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok){ | 490 | if(QMessageBox::information(this, "Question",QString("Remove profile: %1").arg(profileToRemove), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok){ |
489 | profiles = QStringList::split(" ", profiles.join(" ").replace(QRegExp(profileToRemove), "")); | 491 | profiles = QStringList::split(" ", profiles.join(" ").replace(QRegExp(profileToRemove), "")); |
490 | profilesList->clear(); | 492 | profilesList->clear(); |
491 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) | 493 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) |
492 | profilesList->insertItem((*it)); | 494 | profilesList->insertItem((*it)); |
493 | } | ||
494 | 495 | ||
495 | // Remove any interface settings and mappings. | 496 | // Remove any interface settings and mappings. |
496 | //TODO | 497 | Interfaces interfaces; |
498 | // Go through them one by one | ||
499 | QMap<Interface*, QListViewItem*>::Iterator it; | ||
500 | for( it = items.begin(); it != items.end(); ++it ){ | ||
501 | QString interfaceName = it.key()->getInterfaceName(); | ||
502 | qDebug(interfaceName.latin1()); | ||
503 | if(interfaces.setInterface(interfaceName + "_" + profileToRemove)){ | ||
504 | interfaces.removeInterface(); | ||
505 | if(interfaces.setMapping(interfaceName)){ | ||
506 | if(profilesList->count() == 1) | ||
507 | interfaces.removeMapping(); | ||
508 | else{ | ||
509 | interfaces.removeMap("map", interfaceName + "_" + profileToRemove); | ||
510 | } | ||
511 | } | ||
512 | interfaces.write(); | ||
513 | break; | ||
514 | } | ||
515 | } | ||
516 | } | ||
497 | } | 517 | } |
498 | 518 | ||
499 | /** | 519 | /** |
500 | * A new profile has been selected, change. | 520 | * A new profile has been selected, change. |
501 | * @param newProfile the new profile. | 521 | * @param newProfile the new profile. |
502 | */ | 522 | */ |
@@ -505,14 +525,14 @@ void MainWindowImp::changeProfile(){ | |||
505 | QMessageBox::information(this, "Can't Change.","Please select a profile.", "Ok"); | 525 | QMessageBox::information(this, "Can't Change.","Please select a profile.", "Ok"); |
506 | return; | 526 | return; |
507 | } | 527 | } |
508 | QString newProfile = profilesList->text(profilesList->currentItem()); | 528 | QString newProfile = profilesList->text(profilesList->currentItem()); |
509 | if(newProfile != currentProfileLabel->text()){ | 529 | if(newProfile != currentProfileLabel->text()){ |
510 | currentProfileLabel->setText(newProfile); | 530 | currentProfileLabel->setText(newProfile); |
511 | QFile::remove(SCHEME); | 531 | QFile::remove(scheme); |
512 | QFile file(SCHEME); | 532 | QFile file(scheme); |
513 | if ( file.open(IO_ReadWrite) ) { | 533 | if ( file.open(IO_ReadWrite) ) { |
514 | QTextStream stream( &file ); | 534 | QTextStream stream( &file ); |
515 | stream << QString("SCHEME=%1").arg(newProfile); | 535 | stream << QString("SCHEME=%1").arg(newProfile); |
516 | file.close(); | 536 | file.close(); |
517 | } | 537 | } |
518 | // restart all up devices? | 538 | // restart all up devices? |
diff --git a/noncore/net/networksetup/mainwindowimp.h b/noncore/net/networksetup/mainwindowimp.h index c67c161..e5284b4 100644 --- a/noncore/net/networksetup/mainwindowimp.h +++ b/noncore/net/networksetup/mainwindowimp.h | |||
@@ -47,12 +47,13 @@ private: | |||
47 | QMap<QListViewItem*, Interface*> interfaceItems; | 47 | QMap<QListViewItem*, Interface*> interfaceItems; |
48 | 48 | ||
49 | QMap<KProcess*, QString> threads; | 49 | QMap<KProcess*, QString> threads; |
50 | QStringList profiles; | 50 | QStringList profiles; |
51 | 51 | ||
52 | bool advancedUserMode; | 52 | bool advancedUserMode; |
53 | QString scheme; | ||
53 | }; | 54 | }; |
54 | 55 | ||
55 | #endif | 56 | #endif |
56 | 57 | ||
57 | // mainwindowimp.h | 58 | // mainwindowimp.h |
58 | 59 | ||
diff --git a/noncore/settings/networksettings/interfaces.cpp b/noncore/settings/networksettings/interfaces.cpp index 0927258..9155890 100644 --- a/noncore/settings/networksettings/interfaces.cpp +++ b/noncore/settings/networksettings/interfaces.cpp | |||
@@ -332,24 +332,34 @@ bool Interfaces::setInterfaceMethod(QString newName){ | |||
332 | QString Interfaces::getInterfaceOption(QString option, bool &error){ | 332 | QString Interfaces::getInterfaceOption(QString option, bool &error){ |
333 | return getOption(currentIface, option, error); | 333 | return getOption(currentIface, option, error); |
334 | } | 334 | } |
335 | 335 | ||
336 | /** | 336 | /** |
337 | * Set a value for an option in the currently selected interface. If option | 337 | * Set a value for an option in the currently selected interface. If option |
338 | * doesn't exist then it is added along with the value. If value is set to an | 338 | * doesn't exist then it is added along with the value. |
339 | * empty string then option is removed. | ||
340 | * @param option the options to set the value. | 339 | * @param option the options to set the value. |
341 | * @param value the value that option should be set to. | 340 | * @param value the value that option should be set to. |
342 | * @param error set to true if any error occurs, false otherwise. | 341 | * @param error set to true if any error occurs, false otherwise. |
343 | * @return QString the options value. QString::null if error == true | 342 | * @return QString the options value. QString::null if error == true |
344 | */ | 343 | */ |
345 | bool Interfaces::setInterfaceOption(QString option, QString value){ | 344 | bool Interfaces::setInterfaceOption(QString option, QString value){ |
346 | return setOption(currentIface, option, value); | 345 | return setOption(currentIface, option, value); |
347 | } | 346 | } |
348 | 347 | ||
349 | /** | 348 | /** |
349 | * Removes a value for an option in the currently selected interface. | ||
350 | * @param option the options to set the value. | ||
351 | * @param value the value that option should be set to. | ||
352 | * @param error set to true if any error occurs, false otherwise. | ||
353 | * @return QString the options value. QString::null if error == true | ||
354 | */ | ||
355 | bool Interfaces::removeInterfaceOption(QString option, QString value){ | ||
356 | return removeOption(currentIface, option, value); | ||
357 | } | ||
358 | |||
359 | /** | ||
350 | * Removes all of the options from the currently selected interface. | 360 | * Removes all of the options from the currently selected interface. |
351 | * @return bool error if if successfull | 361 | * @return bool error if if successfull |
352 | */ | 362 | */ |
353 | bool Interfaces::removeAllInterfaceOptions(){ | 363 | bool Interfaces::removeAllInterfaceOptions(){ |
354 | return removeAllOptions(currentIface); | 364 | return removeAllOptions(currentIface); |
355 | } | 365 | } |
@@ -374,22 +384,43 @@ bool Interfaces::setMapping(QString interface){ | |||
374 | void Interfaces::addMapping(QString option){ | 384 | void Interfaces::addMapping(QString option){ |
375 | interfaces.append(""); | 385 | interfaces.append(""); |
376 | interfaces.append(QString(MAPPING " %1").arg(option)); | 386 | interfaces.append(QString(MAPPING " %1").arg(option)); |
377 | } | 387 | } |
378 | 388 | ||
379 | /** | 389 | /** |
390 | * Remove the currently selected map and all of its options. | ||
391 | * @return bool if successfull or not. | ||
392 | */ | ||
393 | bool Interfaces::removeMapping(){ | ||
394 | if(currentMapping == interfaces.end()) | ||
395 | return false; | ||
396 | (*currentMapping) = ""; | ||
397 | return removeAllOptions(currentMapping); | ||
398 | } | ||
399 | |||
400 | /** | ||
380 | * Set a map option within a mapping. | 401 | * Set a map option within a mapping. |
381 | * @param map map to use | 402 | * @param map map to use |
382 | * @param value value to go with map | 403 | * @param value value to go with map |
383 | * @return bool true if it is successfull. | 404 | * @return bool true if it is successfull. |
384 | */ | 405 | */ |
385 | bool Interfaces::setMap(QString map, QString value){ | 406 | bool Interfaces::setMap(QString map, QString value){ |
386 | return setOption(currentMapping, map, value); | 407 | return setOption(currentMapping, map, value); |
387 | } | 408 | } |
388 | 409 | ||
389 | /** | 410 | /** |
411 | * Removes a map option within a mapping. | ||
412 | * @param map map to use | ||
413 | * @param value value to go with map | ||
414 | * @return bool true if it is successfull. | ||
415 | */ | ||
416 | bool Interfaces::removeMap(QString map, QString value){ | ||
417 | return removeOption(currentMapping, map, value); | ||
418 | } | ||
419 | |||
420 | /** | ||
390 | * Get a map value within a mapping. | 421 | * Get a map value within a mapping. |
391 | * @param map map to get value of | 422 | * @param map map to get value of |
392 | * @param bool true if it is successfull. | 423 | * @param bool true if it is successfull. |
393 | * @return value that goes to the map | 424 | * @return value that goes to the map |
394 | */ | 425 | */ |
395 | QString Interfaces::getMap(QString map, bool &error){ | 426 | QString Interfaces::getMap(QString map, bool &error){ |
@@ -474,25 +505,48 @@ bool Interfaces::setOption(QStringList::Iterator start, QString option, QString | |||
474 | } | 505 | } |
475 | if((*it).contains(option) && it != start){ | 506 | if((*it).contains(option) && it != start){ |
476 | // Found it in stanza so replace it. | 507 | // Found it in stanza so replace it. |
477 | if(found) | 508 | if(found) |
478 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | 509 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); |
479 | found = true; | 510 | found = true; |
480 | if(value == "") | ||
481 | (*it) = ""; | ||
482 | else | ||
483 | (*it) = QString("\t%1 %2").arg(option).arg(value); | 511 | (*it) = QString("\t%1 %2").arg(option).arg(value); |
484 | } | 512 | } |
485 | } | 513 | } |
486 | if(!found){ | 514 | if(!found){ |
487 | QStringList::Iterator p = start; | 515 | QStringList::Iterator p = start; |
488 | interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); | 516 | interfaces.insert(++p, QString("\t%1 %2").arg(option).arg(value)); |
489 | found = true; | 517 | found = true; |
490 | } | 518 | } |
491 | return found; | 519 | return found; |
492 | } | 520 | } |
521 | /** | ||
522 | * Removes a option in a stanza | ||
523 | * @param start the start of the stanza | ||
524 | * @param option the option to use when setting value. | ||
525 | * @return bool true if successfull, false otherwise. | ||
526 | */ | ||
527 | bool Interfaces::removeOption(QStringList::Iterator start, QString option, QString value){ | ||
528 | if(start == interfaces.end()) | ||
529 | return false; | ||
530 | |||
531 | bool found = false; | ||
532 | for ( QStringList::Iterator it = start; it != interfaces.end(); ++it ) { | ||
533 | if(((*it).contains(IFACE) || (*it).contains(MAPPING) || (*it).contains(AUTO)) && it != start){ | ||
534 | // got to the end without finding it | ||
535 | break; | ||
536 | } | ||
537 | if((*it).contains(option) && (*it).contains(value) &&it != start){ | ||
538 | // Found it in stanza so replace it. | ||
539 | if(found) | ||
540 | qDebug(QString("Interfaces: Set Options found more then one value for option: %1 in stanza: %1").arg(option).arg((*start)).latin1()); | ||
541 | found = true; | ||
542 | (*it) = ""; | ||
543 | } | ||
544 | } | ||
545 | return found; | ||
546 | } | ||
493 | 547 | ||
494 | /** | 548 | /** |
495 | * Removes all options in a stanza | 549 | * Removes all options in a stanza |
496 | * @param start the start of the stanza | 550 | * @param start the start of the stanza |
497 | * @return bool true if successfull, false otherwise. | 551 | * @return bool true if successfull, false otherwise. |
498 | */ | 552 | */ |
diff --git a/noncore/settings/networksettings/interfaces.h b/noncore/settings/networksettings/interfaces.h index 7cf04f0..e09ea71 100644 --- a/noncore/settings/networksettings/interfaces.h +++ b/noncore/settings/networksettings/interfaces.h | |||
@@ -38,26 +38,30 @@ public: | |||
38 | QString getInterfaceFamily(bool &error); | 38 | QString getInterfaceFamily(bool &error); |
39 | bool setInterfaceFamily(QString newName); | 39 | bool setInterfaceFamily(QString newName); |
40 | QString getInterfaceMethod(bool &error); | 40 | QString getInterfaceMethod(bool &error); |
41 | bool setInterfaceMethod(QString newName); | 41 | bool setInterfaceMethod(QString newName); |
42 | QString getInterfaceOption(QString option, bool &error); | 42 | QString getInterfaceOption(QString option, bool &error); |
43 | bool setInterfaceOption(QString option, QString value); | 43 | bool setInterfaceOption(QString option, QString value); |
44 | bool removeInterfaceOption(QString option, QString value); | ||
44 | bool removeAllInterfaceOptions(); | 45 | bool removeAllInterfaceOptions(); |
45 | 46 | ||
46 | bool setMapping(QString interface); | 47 | bool setMapping(QString interface); |
48 | bool removeMapping(); | ||
47 | void addMapping(QString options); | 49 | void addMapping(QString options); |
48 | bool setMap(QString map, QString value); | 50 | bool setMap(QString map, QString value); |
51 | bool removeMap(QString map, QString value); | ||
49 | QString getMap(QString map, bool &error); | 52 | QString getMap(QString map, bool &error); |
50 | bool setScript(QString); | 53 | bool setScript(QString); |
51 | QString getScript(bool &error); | 54 | QString getScript(bool &error); |
52 | 55 | ||
53 | bool write(); | 56 | bool write(); |
54 | 57 | ||
55 | private: | 58 | private: |
56 | bool setStanza(QString stanza, QString option,QStringList::Iterator &iterator); | 59 | bool setStanza(QString stanza, QString option,QStringList::Iterator &iterator); |
57 | bool setOption(QStringList::Iterator start, QString option, QString value); | 60 | bool setOption(QStringList::Iterator start, QString option, QString value); |
61 | bool removeOption(QStringList::Iterator start, QString option, QString value); | ||
58 | QString getOption(QStringList::Iterator start, QString option, bool &error); | 62 | QString getOption(QStringList::Iterator start, QString option, bool &error); |
59 | bool removeAllOptions(QStringList::Iterator start); | 63 | bool removeAllOptions(QStringList::Iterator start); |
60 | 64 | ||
61 | QString interfacesFile; | 65 | QString interfacesFile; |
62 | QStringList interfaces; | 66 | QStringList interfaces; |
63 | QStringList::Iterator currentIface; | 67 | QStringList::Iterator currentIface; |
diff --git a/noncore/settings/networksettings/interfacesetupimp.cpp b/noncore/settings/networksettings/interfacesetupimp.cpp index bdbdfde..1327726 100644 --- a/noncore/settings/networksettings/interfacesetupimp.cpp +++ b/noncore/settings/networksettings/interfacesetupimp.cpp | |||
@@ -89,13 +89,12 @@ bool InterfaceSetupImp::saveSettings(){ | |||
89 | * @profile the new profile. | 89 | * @profile the new profile. |
90 | */ | 90 | */ |
91 | void InterfaceSetupImp::setProfile(const QString &profile){ | 91 | void InterfaceSetupImp::setProfile(const QString &profile){ |
92 | QString newInterfaceName = interface->getInterfaceName(); | 92 | QString newInterfaceName = interface->getInterfaceName(); |
93 | if(profile.length() > 0) | 93 | if(profile.length() > 0) |
94 | newInterfaceName += "_" + profile; | 94 | newInterfaceName += "_" + profile; |
95 | qDebug( newInterfaceName.latin1()); | ||
96 | // See if we have to make a interface. | 95 | // See if we have to make a interface. |
97 | if(!interfaces->setInterface(newInterfaceName)){ | 96 | if(!interfaces->setInterface(newInterfaceName)){ |
98 | // Add making for this new interface if need too | 97 | // Add making for this new interface if need too |
99 | if(profile != ""){ | 98 | if(profile != ""){ |
100 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); | 99 | interfaces->copyInterface(interface->getInterfaceName(), newInterfaceName); |
101 | if(!interfaces->setMapping(interface->getInterfaceName())){ | 100 | if(!interfaces->setMapping(interface->getInterfaceName())){ |
diff --git a/noncore/settings/networksettings/mainwindowimp.cpp b/noncore/settings/networksettings/mainwindowimp.cpp index 9f07f0d..01063c2 100644 --- a/noncore/settings/networksettings/mainwindowimp.cpp +++ b/noncore/settings/networksettings/mainwindowimp.cpp | |||
@@ -29,13 +29,14 @@ | |||
29 | #include <qfile.h> | 29 | #include <qfile.h> |
30 | #include <qtextstream.h> | 30 | #include <qtextstream.h> |
31 | 31 | ||
32 | #define TEMP_ALL "/tmp/ifconfig-a" | 32 | #define TEMP_ALL "/tmp/ifconfig-a" |
33 | #define TEMP_UP "/tmp/ifconfig" | 33 | #define TEMP_UP "/tmp/ifconfig" |
34 | 34 | ||
35 | #define SCHEME "/var/lib/pcmcia/scheme" | 35 | #define DEFAULT_SCHEME "/var/lib/pcmcia/scheme" |
36 | |||
36 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){ | 37 | MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(parent, name, true), advancedUserMode(false){ |
37 | connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); | 38 | connect(addConnectionButton, SIGNAL(clicked()), this, SLOT(addClicked())); |
38 | connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); | 39 | connect(removeConnectionButton, SIGNAL(clicked()), this, SLOT(removeClicked())); |
39 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); | 40 | connect(informationConnectionButton, SIGNAL(clicked()), this, SLOT(informationClicked())); |
40 | connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); | 41 | connect(configureConnectionButton, SIGNAL(clicked()), this, SLOT(configureClicked())); |
41 | 42 | ||
@@ -53,14 +54,15 @@ MainWindowImp::MainWindowImp(QWidget *parent, const char *name) : MainWindow(par | |||
53 | Config cfg("NetworkSetup"); | 54 | Config cfg("NetworkSetup"); |
54 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); | 55 | profiles = QStringList::split(" ", cfg.readEntry("Profiles", "All")); |
55 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) | 56 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) |
56 | profilesList->insertItem((*it)); | 57 | profilesList->insertItem((*it)); |
57 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); | 58 | currentProfileLabel->setText(cfg.readEntry("CurrentProfile", "All")); |
58 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); | 59 | advancedUserMode = cfg.readBoolEntry("AdvancedUserMode", false); |
60 | scheme = cfg.readEntry("SchemeFile", DEFAULT_SCHEME); | ||
59 | 61 | ||
60 | QFile file(SCHEME); | 62 | QFile file(scheme); |
61 | if ( file.open(IO_ReadOnly) ) { // file opened successfully | 63 | if ( file.open(IO_ReadOnly) ) { // file opened successfully |
62 | QTextStream stream( &file ); // use a text stream | 64 | QTextStream stream( &file ); // use a text stream |
63 | while ( !stream.eof() ) { // until end of file... | 65 | while ( !stream.eof() ) { // until end of file... |
64 | QString line = stream.readLine(); // line of text excluding '\n' | 66 | QString line = stream.readLine(); // line of text excluding '\n' |
65 | if(line.contains("SCHEME")){ | 67 | if(line.contains("SCHEME")){ |
66 | line = line.mid(7, line.length()); | 68 | line = line.mid(7, line.length()); |
@@ -92,13 +94,13 @@ MainWindowImp::~MainWindowImp(){ | |||
92 | /** | 94 | /** |
93 | * Load all modules that are found in the path | 95 | * Load all modules that are found in the path |
94 | * @param path a directory that is scaned for any plugins that can be loaded | 96 | * @param path a directory that is scaned for any plugins that can be loaded |
95 | * and attempts to load them | 97 | * and attempts to load them |
96 | */ | 98 | */ |
97 | void MainWindowImp::loadModules(QString path){ | 99 | void MainWindowImp::loadModules(QString path){ |
98 | qDebug(path.latin1()); | 100 | //qDebug(path.latin1()); |
99 | QDir d(path); | 101 | QDir d(path); |
100 | if(!d.exists()) | 102 | if(!d.exists()) |
101 | return; | 103 | return; |
102 | 104 | ||
103 | // Don't want sym links | 105 | // Don't want sym links |
104 | d.setFilter( QDir::Files | QDir::NoSymLinks ); | 106 | d.setFilter( QDir::Files | QDir::NoSymLinks ); |
@@ -117,13 +119,13 @@ void MainWindowImp::loadModules(QString path){ | |||
117 | * Attempt to load a function and resolve a function. | 119 | * Attempt to load a function and resolve a function. |
118 | * @param pluginFileName - the name of the file in which to attempt to load | 120 | * @param pluginFileName - the name of the file in which to attempt to load |
119 | * @param resolveString - function pointer to resolve | 121 | * @param resolveString - function pointer to resolve |
120 | * @return pointer to the function with name resolveString or NULL | 122 | * @return pointer to the function with name resolveString or NULL |
121 | */ | 123 | */ |
122 | Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ | 124 | Module* MainWindowImp::loadPlugin(QString pluginFileName, QString resolveString){ |
123 | qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1()); | 125 | //qDebug(QString("MainWindowImp::loadPlugin: %1").arg(pluginFileName).latin1()); |
124 | QLibrary *lib = new QLibrary(pluginFileName); | 126 | QLibrary *lib = new QLibrary(pluginFileName); |
125 | void *functionPointer = lib->resolve(resolveString); | 127 | void *functionPointer = lib->resolve(resolveString); |
126 | if( !functionPointer ){ | 128 | if( !functionPointer ){ |
127 | qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); | 129 | qDebug(QString("MainWindowImp: File: %1 is not a plugin, but though was.").arg(pluginFileName).latin1()); |
128 | delete lib; | 130 | delete lib; |
129 | return NULL; | 131 | return NULL; |
@@ -487,16 +489,34 @@ void MainWindowImp::removeProfile(){ | |||
487 | 489 | ||
488 | if(QMessageBox::information(this, "Question",QString("Remove profile: %1").arg(profileToRemove), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok){ | 490 | if(QMessageBox::information(this, "Question",QString("Remove profile: %1").arg(profileToRemove), QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok){ |
489 | profiles = QStringList::split(" ", profiles.join(" ").replace(QRegExp(profileToRemove), "")); | 491 | profiles = QStringList::split(" ", profiles.join(" ").replace(QRegExp(profileToRemove), "")); |
490 | profilesList->clear(); | 492 | profilesList->clear(); |
491 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) | 493 | for ( QStringList::Iterator it = profiles.begin(); it != profiles.end(); ++it) |
492 | profilesList->insertItem((*it)); | 494 | profilesList->insertItem((*it)); |
493 | } | ||
494 | 495 | ||
495 | // Remove any interface settings and mappings. | 496 | // Remove any interface settings and mappings. |
496 | //TODO | 497 | Interfaces interfaces; |
498 | // Go through them one by one | ||
499 | QMap<Interface*, QListViewItem*>::Iterator it; | ||
500 | for( it = items.begin(); it != items.end(); ++it ){ | ||
501 | QString interfaceName = it.key()->getInterfaceName(); | ||
502 | qDebug(interfaceName.latin1()); | ||
503 | if(interfaces.setInterface(interfaceName + "_" + profileToRemove)){ | ||
504 | interfaces.removeInterface(); | ||
505 | if(interfaces.setMapping(interfaceName)){ | ||
506 | if(profilesList->count() == 1) | ||
507 | interfaces.removeMapping(); | ||
508 | else{ | ||
509 | interfaces.removeMap("map", interfaceName + "_" + profileToRemove); | ||
510 | } | ||
511 | } | ||
512 | interfaces.write(); | ||
513 | break; | ||
514 | } | ||
515 | } | ||
516 | } | ||
497 | } | 517 | } |
498 | 518 | ||
499 | /** | 519 | /** |
500 | * A new profile has been selected, change. | 520 | * A new profile has been selected, change. |
501 | * @param newProfile the new profile. | 521 | * @param newProfile the new profile. |
502 | */ | 522 | */ |
@@ -505,14 +525,14 @@ void MainWindowImp::changeProfile(){ | |||
505 | QMessageBox::information(this, "Can't Change.","Please select a profile.", "Ok"); | 525 | QMessageBox::information(this, "Can't Change.","Please select a profile.", "Ok"); |
506 | return; | 526 | return; |
507 | } | 527 | } |
508 | QString newProfile = profilesList->text(profilesList->currentItem()); | 528 | QString newProfile = profilesList->text(profilesList->currentItem()); |
509 | if(newProfile != currentProfileLabel->text()){ | 529 | if(newProfile != currentProfileLabel->text()){ |
510 | currentProfileLabel->setText(newProfile); | 530 | currentProfileLabel->setText(newProfile); |
511 | QFile::remove(SCHEME); | 531 | QFile::remove(scheme); |
512 | QFile file(SCHEME); | 532 | QFile file(scheme); |
513 | if ( file.open(IO_ReadWrite) ) { | 533 | if ( file.open(IO_ReadWrite) ) { |
514 | QTextStream stream( &file ); | 534 | QTextStream stream( &file ); |
515 | stream << QString("SCHEME=%1").arg(newProfile); | 535 | stream << QString("SCHEME=%1").arg(newProfile); |
516 | file.close(); | 536 | file.close(); |
517 | } | 537 | } |
518 | // restart all up devices? | 538 | // restart all up devices? |
diff --git a/noncore/settings/networksettings/mainwindowimp.h b/noncore/settings/networksettings/mainwindowimp.h index c67c161..e5284b4 100644 --- a/noncore/settings/networksettings/mainwindowimp.h +++ b/noncore/settings/networksettings/mainwindowimp.h | |||
@@ -47,12 +47,13 @@ private: | |||
47 | QMap<QListViewItem*, Interface*> interfaceItems; | 47 | QMap<QListViewItem*, Interface*> interfaceItems; |
48 | 48 | ||
49 | QMap<KProcess*, QString> threads; | 49 | QMap<KProcess*, QString> threads; |
50 | QStringList profiles; | 50 | QStringList profiles; |
51 | 51 | ||
52 | bool advancedUserMode; | 52 | bool advancedUserMode; |
53 | QString scheme; | ||
53 | }; | 54 | }; |
54 | 55 | ||
55 | #endif | 56 | #endif |
56 | 57 | ||
57 | // mainwindowimp.h | 58 | // mainwindowimp.h |
58 | 59 | ||