void BitmapFactoryInst::restoreCustomPaths() { Base::Reference<ParameterGrp> group = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/Bitmaps"); std::vector<std::string> paths = group->GetASCIIs("CustomPath"); for (std::vector<std::string>::iterator it = paths.begin(); it != paths.end(); ++it) { addPath(QString::fromUtf8(it->c_str())); } }
void BitmapFactoryInst::addCustomPath(const QString& path) { Base::Reference<ParameterGrp> group = App::GetApplication().GetParameterGroupByPath ("User parameter:BaseApp/Preferences/Bitmaps"); std::vector<std::string> paths = group->GetASCIIs("CustomPath"); std::stringstream str; str << "CustomPath" << paths.size(); group->SetASCII(str.str().c_str(), (const char*)path.toUtf8()); }