|
From: Herton R. K. <he...@us...> - 2005-07-01 21:58:43
|
Update of /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18517/src/libkimageprocess Modified Files: ktproject.cpp Log Message: - Code to save project is already present at method, no need to duplicate this on ktproject.cpp Index: ktproject.cpp =================================================================== RCS file: /cvsroot/kimageprocess/kimageprocess/src/libkimageprocess/ktproject.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ktproject.cpp 1 Jul 2005 00:37:20 -0000 1.16 +++ ktproject.cpp 1 Jul 2005 21:58:30 -0000 1.17 @@ -32,11 +32,6 @@ #include <qfile.h> #include "ktcalculation.h" -#include "ktfeature.h" -#include "ktfeaturemanager.h" -#include "ktmethod.h" -#include "ktmethodmanager.h" -#include "ktpatternmanager.h" KTProject::KTProject(QObject *parent, const char *name) : QObject(parent, name)/*, @@ -214,25 +209,6 @@ window_size temp; QDomElement option; - QString active_method; - - option = m_doc.createElement("activeMethod"); - active_method = KTMethodManager::self()->activeMethod()->methodName(); - option.setAttribute("name", active_method); - options.appendChild(option); - - QDomElement method_options; - method_options = m_doc.createElement("method_options"); - FeatureList features = KTFeatureManager::self()->features(active_method); - - for (QDictIterator<KTFeature> it(features); it.current(); ++it) - { - QDomElement feature = m_doc.createElement("feature"); - method_options.appendChild(feature); - feature.setAttribute("name", it.current()->featureName()); - feature.setAttribute("enabled", it.current()->enabled() ? "true" : "false"); - } - option.appendChild(method_options); option = m_doc.createElement("windowType"); option.setAttribute("value", QString::number(KTCalculation::self()->windowType(), 10)); @@ -315,11 +291,7 @@ QDomElement option = options.item(i).toElement(); QDomElement methodOptionsGroup; - if (option.nodeName() == "activeMethod") - KTMethodManager::self()->setActiveMethod(option.attribute("name", "glcm")); - else if (option.nodeName() == "method_options") - methodOptionsGroup = options.item(i).toElement(); - else if (option.nodeName() == "windowType") + if (option.nodeName() == "windowType") KTCalculation::self()->setWindowType(option.attribute("value").toInt(&ok, 10)); else if (option.nodeName() == "numberIterations") KTCalculation::self()->setNumberIterations(option.attribute("value").toInt(&ok, 10)); @@ -328,21 +300,6 @@ option.attribute("x").toInt(&ok, 10), option.attribute("y").toInt(&ok, 10)); - QDomNodeList features = methodOptionsGroup.childNodes(); - for (j=0; j < features.count(); ++j) - { - if (features.item(i).nodeName() == "feature") - { - QDomElement feature = features.item(i).toElement(); - QString feature_name = feature.attribute("name", QString::null); - if (feature_name == QString::null) - continue; - QString active_method = KTMethodManager::self()->activeMethod()->methodName(); - KTFeature *feature_option = - KTFeatureManager::self()->getFeature(active_method, feature_name); - feature_option->setEnabled((feature.attribute("enabled", "true") == "true") ? true : false); - } - } } m_isSaved = true; m_changed = false; |