| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include "Core/HotkeyManager.h" |
| 7 |
|
| 8 |
#include <QFileDialog> |
| 9 |
#include <QObject> |
| 10 |
#include <QString> |
| 11 |
|
| 12 |
namespace DolphinFileDialog |
| 13 |
{ |
| 14 |
class HotkeyDisabler final |
| 15 |
{ |
| 16 |
public: |
| 17 |
HotkeyDisabler() { HotkeyManagerEmu::Enable(false); } |
| 18 |
~HotkeyDisabler() { HotkeyManagerEmu::Enable(true); } |
| 19 |
}; |
| 20 |
|
| 21 |
QString getExistingDirectory(QWidget* parent = nullptr, const QString& caption = QString(), |
| 22 |
const QString& dir = QString(), |
| 23 |
QFileDialog::Options options = QFileDialog::ShowDirsOnly); |
| 24 |
|
| 25 |
QString getOpenFileName(QWidget* parent = nullptr, const QString& caption = QString(), |
| 26 |
const QString& dir = QString(), const QString& filter = QString(), |
| 27 |
QString* selectedFilter = nullptr, |
| 28 |
QFileDialog::Options options = QFileDialog::Options()); |
| 29 |
|
| 30 |
QStringList getOpenFileNames(QWidget* parent = nullptr, const QString& caption = QString(), |
| 31 |
const QString& dir = QString(), const QString& filter = QString(), |
| 32 |
QString* selectedFilter = nullptr, |
| 33 |
QFileDialog::Options options = QFileDialog::Options()); |
| 34 |
|
| 35 |
QString getSaveFileName(QWidget* parent = nullptr, const QString& caption = QString(), |
| 36 |
const QString& dir = QString(), const QString& filter = QString(), |
| 37 |
QString* selectedFilter = nullptr, |
| 38 |
QFileDialog::Options options = QFileDialog::Options()); |
| 39 |
|
| 40 |
} |