| 299 | } |
| 300 | |
| 301 | QList<QString> ASAP_Window::getFileNameAndFactory() { |
| 302 | QString filterList; |
| 303 | std::set<std::string> allExtensions = MultiResolutionImageFactory::getAllSupportedExtensions(); |
| 304 | QString defaultString = "All supported types ("; |
| 305 | for (auto it = allExtensions.begin(); it != allExtensions.end(); ++it) { |
| 306 | defaultString += " *." + QString::fromStdString(*it); |
| 307 | } |
| 308 | defaultString += ")"; |
| 309 | filterList += defaultString; |
| 310 | |
| 311 | std::vector<std::pair<std::string, std::set<std::string>> > factoriesAndExtensions = MultiResolutionImageFactory::getLoadedFactoriesAndSupportedExtensions(); |
| 312 | for (auto it = factoriesAndExtensions.begin(); it != factoriesAndExtensions.end(); ++it) { |
| 313 | QString extensionString = "(*." + QString::fromStdString(*(it->second.begin())); |
| 314 | for (auto extensionIt = std::next(it->second.begin(), 1); extensionIt != it->second.end(); ++extensionIt) { |
| 315 | extensionString += " *." + QString::fromStdString(*extensionIt); |
| 316 | } |
| 317 | extensionString += ")"; |
| 318 | filterList += (";;" + QString::fromStdString(it->first) + " " + extensionString); |
| 319 | } |
| 320 | QString selectedFilter; |
| 321 | QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), _settings->value("lastOpenendPath", QStandardPaths::standardLocations(QStandardPaths::DocumentsLocation)).toString(), filterList, &selectedFilter); |
| 322 | QString selectedFactory = selectedFilter.split("(")[0].trimmed(); |
| 323 | return QList<QString>({ fileName, selectedFactory }); |
| 324 | } |
| 325 | |
| 326 | void ASAP_Window::setCacheSize(const unsigned long long& cacheMaxByteSize) { |
| 327 | PathologyViewer* view = this->findChild<PathologyViewer*>("pathologyView"); |
no outgoing calls
no test coverage detected