forked from eden-emu/eden
[qt] frontend abstraction and message box early handling
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
115d0484a6
commit
49670ebb0f
8 changed files with 136 additions and 47 deletions
25
src/qt_common/qt_frontend_util.cpp
Normal file
25
src/qt_common/qt_frontend_util.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "qt_frontend_util.h"
|
||||
|
||||
namespace QtCommon::Frontend {
|
||||
QMessageBox::StandardButton ShowMessage(QMessageBox::Icon icon,
|
||||
const QString &title,
|
||||
const QString &text,
|
||||
QMessageBox::StandardButtons buttons,
|
||||
QWidget *parent)
|
||||
{
|
||||
#ifdef YUZU_QT_WIDGETS
|
||||
QMessageBox *box = new QMessageBox(icon, title, text, buttons, parent);
|
||||
return static_cast<QMessageBox::StandardButton>(box->exec());
|
||||
#endif
|
||||
}
|
||||
|
||||
QMessageBox::StandardButton ShowMessage(QMessageBox::Icon icon,
|
||||
const char *title,
|
||||
const char *text,
|
||||
QMessageBox::StandardButtons buttons,
|
||||
QWidget *parent)
|
||||
{
|
||||
return ShowMessage(icon, qApp->tr(title), qApp->tr(text), buttons, parent);
|
||||
}
|
||||
|
||||
} // namespace QtCommon::Frontend
|
Loading…
Add table
Add a link
Reference in a new issue