forked from eden-emu/eden
better handling for sys/vfs/rootobject
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
4356e80e50
commit
c65f075638
15 changed files with 286 additions and 291 deletions
|
@ -2,6 +2,11 @@
|
|||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "qt_frontend_util.h"
|
||||
#include "qt_common/qt_common.h"
|
||||
|
||||
#ifdef YUZU_QT_WIDGETS
|
||||
#include <QFileDialog>
|
||||
#endif
|
||||
|
||||
namespace QtCommon::Frontend {
|
||||
|
||||
|
@ -19,69 +24,15 @@ QMessageBox::StandardButton ShowMessage(QMessageBox::Icon icon,
|
|||
// need a way to reference icon/buttons too
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Information(QObject *parent,
|
||||
const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
const QString GetOpenFileName(const QString &title,
|
||||
const QString &dir,
|
||||
const QString &filter,
|
||||
QString *selectedFilter,
|
||||
Options options)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Information, title, text, buttons, parent);
|
||||
#ifdef YUZU_QT_WIDGETS
|
||||
return QFileDialog::getOpenFileName((QWidget *) rootObject, title, dir, filter, selectedFilter, options);
|
||||
#endif
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Warning(QObject *parent,
|
||||
const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Warning, title, text, buttons, parent);
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Critical(QObject *parent,
|
||||
const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Critical, title, text, buttons, parent);
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Question(QObject *parent,
|
||||
const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Question, title, text, buttons, parent);
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Information(QObject *parent,
|
||||
const char *title,
|
||||
const char *text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Information, parent->tr(title), parent->tr(text), buttons, parent);
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Warning(QObject *parent,
|
||||
const char *title,
|
||||
const char *text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Warning, parent->tr(title), parent->tr(text), buttons, parent);
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Critical(QObject *parent,
|
||||
const char *title,
|
||||
const char *text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Critical, parent->tr(title), parent->tr(text), buttons, parent);
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton Question(QObject *parent,
|
||||
const char *title,
|
||||
const char *text,
|
||||
QMessageBox::StandardButtons buttons)
|
||||
{
|
||||
return ShowMessage(QMessageBox::Question, parent->tr(title), parent->tr(text), buttons, parent);
|
||||
}
|
||||
|
||||
|
||||
} // namespace QtCommon::Frontend
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue