33 QStringList selectedTools = config.
mTools;
42 foreach(QString absoluteToolPath, selectedTools)
47 tool.
mReference = (absoluteToolPath == referencePath);
49 for (
unsigned i = 0; i < config.
mToolList.size(); ++i)
58 toolStructureVector.push_back(tool);
72 retval.
mName = QFileInfo(uid).completeBaseName();
76 std::vector<ToolFileParser::TrackerInternalStructure> trackers = parser.
getTrackers();
77 for (
unsigned i = 0; i < trackers.size(); ++i)
84 for (
unsigned i = 0; i < tools.size(); ++i)
98 QStringList trackingsystemsFilter)
101 QStringList filteredTools = this->filter(allTools, applicationsFilter, trackingsystemsFilter);
102 return filteredTools;
110 QString absoluteFilePath = uid;
111 QFile file(absoluteFilePath);
112 QFileInfo info(file);
113 retval.
mName = info.dir().dirName();
131 foreach(QString path, allTools)
135 for (
unsigned i=0; i<
internal->mClinicalApplications.size(); ++i)
136 retval << internal->mClinicalApplications[i];
139 retval.removeDuplicates();
153 QStringList TrackerConfigurationImpl::filter(QStringList toolsToFilter, QStringList applicationsFilter,
154 QStringList trackingsystemsFilter)
158 foreach(QString toolFilePath, toolsToFilter)
164 QString trackerName =
enum2string(internal->mTrackerType);
165 if(!trackingsystemsFilter.contains(trackerName, Qt::CaseInsensitive))
169 bool passedApplicationFilter =
false;
170 std::vector<QString>::iterator it =
internal->mClinicalApplications.begin();
171 while(it != internal->mClinicalApplications.end() && !passedApplicationFilter)
173 QString applicationName = *it;
174 if(applicationsFilter.contains(applicationName, Qt::CaseInsensitive))
176 passedApplicationFilter =
true;
178 if(applicationsFilter.contains(
"all", Qt::CaseInsensitive))
180 passedApplicationFilter =
true;
182 if(applicationsFilter.contains(
"default", Qt::CaseInsensitive))
184 passedApplicationFilter =
true;
188 if(!passedApplicationFilter)
192 retval << toolFilePath;
202 ToolFileParser parser(toolAbsoluteFilePath);
203 retval = parser.getTool();
211 return internal->verify();
216 return profile()->getPath() +
"/tool";
241 for (
int i=0; i< rootPaths.size(); ++i)
243 QString configFilePath = rootPaths[i] +
"/profiles";
244 foreach(QFileInfo dir,
cx::getDirs(configFilePath))
254 QStringList root =
profile()->getAllRootConfigPaths();
255 QString suffix(
"/tool/Tools/");
257 bool includeSubDirs =
true;
258 for (
int i=0; i<root.size(); ++i)
260 QString toolPath = root[i]+suffix;