| 188 | } |
| 189 | |
| 190 | QString FileDialog::getSaveFileName( |
| 191 | QWidget* parent, const QString& caption, const QString& dir, const QString& filter, const QString& default_suffix) { |
| 192 | FileDialog dlg(parent); |
| 193 | if (!caption.isEmpty()) { |
| 194 | dlg.setDialogTitle(caption); |
| 195 | } |
| 196 | dlg.setAcceptMode(QFileDialog::AcceptSave); |
| 197 | dlg.setFileMode(QFileDialog::AnyFile); |
| 198 | if (!dir.isEmpty()) { |
| 199 | dlg.setDirectory(dir); |
| 200 | } |
| 201 | if (!filter.isEmpty()) { |
| 202 | dlg.setNameFilter(filter); |
| 203 | } |
| 204 | if (!default_suffix.isEmpty()) { |
| 205 | dlg.setDefaultSuffix(default_suffix); |
| 206 | } |
| 207 | if (dlg.exec() != QDialog::Accepted) { |
| 208 | return {}; |
| 209 | } |
| 210 | return dlg.selectedFile(); |
| 211 | } |
| 212 | |
| 213 | std::vector<QCheckBox*> FileDialog::embedExtras(const std::vector<ExtraOption>& extras) { |
| 214 | std::vector<QCheckBox*> boxes; |
nothing calls this directly
no test coverage detected