| 224 | } |
| 225 | |
| 226 | void SettingsDialog::on_pushButtonDecoderSelectPath_clicked() |
| 227 | { |
| 228 | // Use the currently selected dir or the dir to YUView if this one does not exist. |
| 229 | auto curDir = QDir(QSettings().value("SearchPath", "").toString()); |
| 230 | if (!curDir.exists()) |
| 231 | curDir = QDir::current(); |
| 232 | |
| 233 | QFileDialog pathDialog(this); |
| 234 | pathDialog.setDirectory(curDir); |
| 235 | pathDialog.setFileMode(QFileDialog::Directory); |
| 236 | pathDialog.setOption(QFileDialog::ShowDirsOnly); |
| 237 | |
| 238 | if (pathDialog.exec()) |
| 239 | { |
| 240 | QString path = pathDialog.selectedFiles()[0]; |
| 241 | ui.lineEditDecoderPath->setText(path); |
| 242 | } |
| 243 | } |
| 244 | |
| 245 | QStringList SettingsDialog::getLibraryPath(QString currentFile, QString caption, bool multipleFiles) |
| 246 | { |