提交 4be88c7f 编写于 作者: R Richard Stanway 提交者: jp9000

UI: Add warning / critical QMessageBox wrappers

上级 42e76f6c
......@@ -90,6 +90,30 @@ void OBSMessageBox::information(
mb.exec();
}
void OBSMessageBox::warning(
QWidget *parent,
const QString &title,
const QString &text)
{
QMessageBox mb(QMessageBox::Warning,
title, text, QMessageBox::Ok,
parent);
mb.setButtonText(QMessageBox::Ok, QTStr("OK"));
mb.exec();
}
void OBSMessageBox::critical(
QWidget *parent,
const QString &title,
const QString &text)
{
QMessageBox mb(QMessageBox::Critical,
title, text, QMessageBox::Ok,
parent);
mb.setButtonText(QMessageBox::Ok, QTStr("OK"));
mb.exec();
}
void QTToGSWindow(WId windowId, gs_window &gswindow)
{
#ifdef _WIN32
......
......@@ -48,6 +48,14 @@ public:
QWidget *parent,
const QString &title,
const QString &text);
static void warning(
QWidget *parent,
const QString &title,
const QString &text);
static void critical(
QWidget *parent,
const QString &title,
const QString &text);
};
void OBSErrorBox(QWidget *parent, const char *msg, ...);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册