Utils: Change browse button to OptionPushButton

Allows the user to choose whether he wants to browse local files,
or remote files.

Change-Id: I0d262034a5c2df56bea2efca876c9019099e3da9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2022-11-22 11:33:24 +01:00
parent 36be7b8375
commit b3f82887a3
5 changed files with 77 additions and 20 deletions

View File

@@ -90,26 +90,31 @@ public:
#ifdef QT_WIDGETS_LIB
static void setDialogParentGetter(const std::function<QWidget *()> &getter);
static bool hasNativeFileDialog();
static FilePath getOpenFilePath(QWidget *parent,
const QString &caption,
const FilePath &dir = {},
const QString &filter = {},
QString *selectedFilter = nullptr,
QFileDialog::Options options = {},
bool fromDeviceIfShiftIsPressed = false);
bool fromDeviceIfShiftIsPressed = false,
bool forceNonNativeDialog = false);
static FilePath getSaveFilePath(QWidget *parent,
const QString &caption,
const FilePath &dir = {},
const QString &filter = {},
QString *selectedFilter = nullptr,
QFileDialog::Options options = {});
QFileDialog::Options options = {},
bool forceNonNativeDialog = false);
static FilePath getExistingDirectory(QWidget *parent,
const QString &caption,
const FilePath &dir = {},
QFileDialog::Options options = QFileDialog::ShowDirsOnly,
bool fromDeviceIfShiftIsPressed = false);
bool fromDeviceIfShiftIsPressed = false,
bool forceNonNativeDialog = false);
static FilePaths getOpenFilePaths(QWidget *parent,
const QString &caption,