MCPcopy Create free account
hub / github.com/IENT/YUView / getLibraryPath

Method getLibraryPath

YUViewLib/src/ui/SettingsDialog.cpp:245–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245QStringList SettingsDialog::getLibraryPath(QString currentFile, QString caption, bool multipleFiles)
246{
247 // Use the currently selected dir or the dir to YUView if this one does not exist.
248 QFileInfo curFile(currentFile);
249 QDir curDir = curFile.absoluteDir();
250 if (!curDir.exists())
251 curDir = QDir::current();
252
253 QFileDialog fileDialog(this, caption);
254 fileDialog.setDirectory(curDir);
255 fileDialog.setFileMode(multipleFiles ? QFileDialog::ExistingFiles : QFileDialog::ExistingFile);
256 if (is_Q_OS_LINUX)
257 fileDialog.setNameFilter("Library files (*.so.* *.so)");
258 if (is_Q_OS_MAC)
259 fileDialog.setNameFilter("Library files (*.dylib)");
260 if (is_Q_OS_WIN)
261 fileDialog.setNameFilter("Library files (*.dll)");
262
263 if (fileDialog.exec())
264 return fileDialog.selectedFiles();
265
266 return {};
267}
268
269void SettingsDialog::on_pushButtonLibde265SelectFile_clicked()
270{

Calls

no outgoing calls

Tested by

no test coverage detected