MCPcopy Create free account
hub / github.com/QNapi/qnapi / selectDirectory

Method selectDirectory

gui/src/forms/frmscan.cpp:99–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99void frmScan::selectDirectory() {
100 QString dir = QFileInfo(ui.leDirectory->text()).path();
101 dir = QDir().exists(dir) ? dir : scanConfig.lastDir();
102
103 QNapiOpenDialog openDialog(this, tr("Select the folder to scan"), dir,
104 QNapiOpenDialog::None);
105
106 if (openDialog.selectDirectory()) {
107 dir = openDialog.selectedFiles().first();
108
109 if (QDir().exists(dir)) ui.leDirectory->setText(dir);
110 }
111}
112
113void frmScan::leDirectoryTextChanged() {
114 ui.pbScan->setEnabled(!ui.leDirectory->text().isEmpty()

Callers

nothing calls this directly

Calls 2

lastDirMethod · 0.80
selectedFilesMethod · 0.80

Tested by

no test coverage detected