mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
41 lines
1.6 KiB
C
41 lines
1.6 KiB
C
|
// Copyright 2021 Dolphin Emulator Project
|
||
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include "Core/HotkeyManager.h"
|
||
|
|
||
|
#include <QFileDialog>
|
||
|
#include <QObject>
|
||
|
#include <QString>
|
||
|
|
||
|
namespace DolphinFileDialog
|
||
|
{
|
||
|
class HotkeyDisabler final
|
||
|
{
|
||
|
public:
|
||
|
HotkeyDisabler() { HotkeyManagerEmu::Enable(false); }
|
||
|
~HotkeyDisabler() { HotkeyManagerEmu::Enable(true); }
|
||
|
};
|
||
|
|
||
|
QString getExistingDirectory(QWidget* parent = nullptr, const QString& caption = QString(),
|
||
|
const QString& dir = QString(),
|
||
|
QFileDialog::Options options = QFileDialog::ShowDirsOnly);
|
||
|
|
||
|
QString getOpenFileName(QWidget* parent = nullptr, const QString& caption = QString(),
|
||
|
const QString& dir = QString(), const QString& filter = QString(),
|
||
|
QString* selectedFilter = nullptr,
|
||
|
QFileDialog::Options options = QFileDialog::Options());
|
||
|
|
||
|
QStringList getOpenFileNames(QWidget* parent = nullptr, const QString& caption = QString(),
|
||
|
const QString& dir = QString(), const QString& filter = QString(),
|
||
|
QString* selectedFilter = nullptr,
|
||
|
QFileDialog::Options options = QFileDialog::Options());
|
||
|
|
||
|
QString getSaveFileName(QWidget* parent = nullptr, const QString& caption = QString(),
|
||
|
const QString& dir = QString(), const QString& filter = QString(),
|
||
|
QString* selectedFilter = nullptr,
|
||
|
QFileDialog::Options options = QFileDialog::Options());
|
||
|
|
||
|
} // namespace DolphinFileDialog
|