mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-09-20 04:42:18 +02:00
UI: Add warning / critical QMessageBox wrappers
This commit is contained in:
parent
42e76f6c34
commit
4be88c7f2a
@ -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, ...);
|
||||
|
Loading…
Reference in New Issue
Block a user