mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Extend FileDialog to accommodate multiple file selection
This commit is contained in:
@@ -9,6 +9,17 @@ QString FileDialog::getOpenFileName(QWidget* parent, const QString& caption, con
|
||||
return result;
|
||||
}
|
||||
|
||||
QStringList FileDialog::getOpenFileNames(QWidget *parent, const QString &caption, const QString &filter, QString *selectedFilter, QFileDialog::Options options)
|
||||
{
|
||||
QStringList result = QFileDialog::getOpenFileNames(parent, caption, getFileDialogPath(), filter, selectedFilter, options);
|
||||
if(!result.isEmpty())
|
||||
{
|
||||
QFileInfo path = QFileInfo(result.first());
|
||||
setFileDialogPath(path.absolutePath());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
QString FileDialog::getSaveFileName(QWidget* parent, const QString& caption, const QString& filter, const QString& defaultFileName, QString* selectedFilter, Options options)
|
||||
{
|
||||
QString dir = getFileDialogPath();
|
||||
|
||||
@@ -11,6 +11,9 @@ public:
|
||||
static QString getOpenFileName(QWidget* parent = 0, const QString& caption = QString(),
|
||||
const QString& filter = QString(), QString* selectedFilter = 0,
|
||||
Options options = 0);
|
||||
static QStringList getOpenFileNames(QWidget* parent = 0, const QString& caption = QString(),
|
||||
const QString& filter = QString(), QString* selectedFilter = 0,
|
||||
Options options = 0);
|
||||
static QString getSaveFileName(QWidget* parent = 0, const QString& caption = QString(),
|
||||
const QString& filter = QString(), const QString& defaultFileName = QString(), QString* selectedFilter = 0,
|
||||
Options options = 0);
|
||||
|
||||
Reference in New Issue
Block a user