#include <fileopendialog.h>
|
| static QString | startDirectory (const QString &type, const QString &fallback={}) |
| | Choose the most applicable existing directory for an open/import category.
|
| |
| static void | rememberSelection (const QString &type, const QStringList &paths) |
| | Persist the parent of the last nonempty selected regular file.
|
| |
| static QString | getOpenFileName (const QString &type, QWidget *parent=nullptr, const QString &caption={}, const QString &directory={}, const QString &filter={}, QString *selectedFilter=nullptr, QFileDialog::Options options={}) |
| | Open the standard modal file picker with per-category folder memory.
|
| |
| static QStringList | getOpenFileNames (const QString &type, QWidget *parent=nullptr, const QString &caption={}, const QString &directory={}, const QString &filter={}, QString *selectedFilter=nullptr, QFileDialog::Options options={}) |
| | Open the standard modal file picker with per-category folder memory.
|
| |
| static QString | typeForFilter (const QString &filter) |
| | Map a filename filter to a shared category or deterministic extension-set key.
|
| |
◆ getOpenFileName()
| static QString openswmmvis::ui::FileOpenDialog::getOpenFileName |
( |
const QString & |
type, |
|
|
QWidget * |
parent = nullptr, |
|
|
const QString & |
caption = {}, |
|
|
const QString & |
directory = {}, |
|
|
const QString & |
filter = {}, |
|
|
QString * |
selectedFilter = nullptr, |
|
|
QFileDialog::Options |
options = {} |
|
) |
| |
|
inlinestatic |
Open the standard modal file picker with per-category folder memory.
- Parameters
-
| [in] | type | Stable untranslated history category. |
| [in] | parent | Optional owner for the dialog; call on the GUI thread. |
| [in] | caption | Dialog title. |
| [in] | directory | Fallback initial directory/filename after preferred/remembered locations. |
| [in] | filter | Qt filename filters, optionally empty. |
| [in,out] | selectedFilter | Optional initial/returned active filter string. |
| [in] | options | QFileDialog options forwarded unchanged. |
- Returns
- Selected filename or empty on cancellation.
- Note
- Remembers the accepted regular file's folder through QSettings; does not open/read the selected file contents.
◆ getOpenFileNames()
| static QStringList openswmmvis::ui::FileOpenDialog::getOpenFileNames |
( |
const QString & |
type, |
|
|
QWidget * |
parent = nullptr, |
|
|
const QString & |
caption = {}, |
|
|
const QString & |
directory = {}, |
|
|
const QString & |
filter = {}, |
|
|
QString * |
selectedFilter = nullptr, |
|
|
QFileDialog::Options |
options = {} |
|
) |
| |
|
inlinestatic |
Open the standard modal file picker with per-category folder memory.
- Parameters
-
| [in] | type | Stable untranslated history category. |
| [in] | parent | Optional owner for the dialog; call on the GUI thread. |
| [in] | caption | Dialog title. |
| [in] | directory | Fallback initial directory/filename after preferred/remembered locations. |
| [in] | filter | Qt filename filters, optionally empty. |
| [in,out] | selectedFilter | Optional initial/returned active filter string. |
| [in] | options | QFileDialog options forwarded unchanged. |
- Returns
- Selected filenames or empty on cancellation.
- Note
- Remembers the accepted regular file's folder through QSettings; does not open/read the selected file contents.
◆ rememberSelection()
| static void openswmmvis::ui::FileOpenDialog::rememberSelection |
( |
const QString & |
type, |
|
|
const QStringList & |
paths |
|
) |
| |
|
inlinestatic |
Persist the parent of the last nonempty selected regular file.
- Parameters
-
| [in] | type | Stable category key; empty uses other-files. |
| [in] | paths | Selection list traversed backward; missing/nonregular paths are skipped and cancellation preserves history. |
- Note
- Writes and synchronizes QSettings without separately reporting persistence errors.
◆ startDirectory()
| static QString openswmmvis::ui::FileOpenDialog::startDirectory |
( |
const QString & |
type, |
|
|
const QString & |
fallback = {} |
|
) |
| |
|
inlinestatic |
Choose the most applicable existing directory for an open/import category.
- Parameters
-
| [in] | type | Stable untranslated category key; models first consults the preferred project-open directory. |
| [in] | fallback | Candidate directory or filename whose parent may supply a fallback. |
- Returns
- Preferred project folder, remembered category folder, valid fallback/parent, or home directory. No settings are written.
◆ typeForFilter()
| static QString openswmmvis::ui::FileOpenDialog::typeForFilter |
( |
const QString & |
filter | ) |
|
|
inlinestatic |
Map a filename filter to a shared category or deterministic extension-set key.
- Parameters
-
| [in] | filter | Qt filter text whose *.extension patterns are extracted/lowercased/deduplicated/sorted. |
- Returns
- First matching category by fixed precedence (mesh, results, models, styles, world/raster/vector/series), other-files for no patterns, or filter- plus a SHA-256 extension-set digest.
The documentation for this class was generated from the following file: