+void ModuleBase_Preferences::resetResourcePreferences(SUIT_PreferenceMgr* thePref)
+{
+ if (!thePref)
+ return;
+
+ QtxResourceMgr::WorkingMode aPrev =
+ thePref->resourceMgr()->setWorkingMode(QtxResourceMgr::IgnoreUserValues);
+ thePref->retrieve();
+ thePref->resourceMgr()->setWorkingMode(aPrev);
+}
+
+void ModuleBase_Preferences::resetConfigPropPreferences(SUIT_PreferenceMgr* thePref)
+{
+ resetConfig();
+ updateResourcesByConfig();
+
+ // retrieve the reset resource values to the preferences items
+ Config_Properties aProps = Config_PropManager::getProperties();
+ Config_Properties::iterator aIt;
+ QStringList aValues;
+ QStringList aSections;
+ for (aIt = aProps.begin(); aIt != aProps.end(); ++aIt) {
+ Config_Prop* aProp = (*aIt);
+ aValues.append(QString(aProp->name().c_str()));
+ if (!aSections.contains(aProp->section().c_str()))
+ aSections.append(aProp->section().c_str());
+ QtxPreferenceItem* anItem = thePref->findItem(QString(aProp->title().c_str()), true);
+ if (anItem)
+ anItem->retrieve();
+ }
+}