UI: Add helper class to translate message box buttons

This commit is contained in:
jp9000
2017-05-13 14:05:03 -07:00
parent 1c5591e644
commit bd34dce8b6
2 changed files with 62 additions and 0 deletions

View File

@@ -17,6 +17,7 @@
#pragma once
#include <QMessageBox>
#include <QWidget>
#include <obs.hpp>
@@ -29,8 +30,23 @@
class QDataStream;
class QWidget;
class QLayout;
class QString;
struct gs_window;
class OBSMessageBox {
public:
static QMessageBox::StandardButton question(
QWidget *parent,
const QString &title,
const QString &text,
QMessageBox::StandardButtons buttons = QMessageBox::StandardButtons( QMessageBox::Yes | QMessageBox::No ),
QMessageBox::StandardButton defaultButton = QMessageBox::NoButton);
static void information(
QWidget *parent,
const QString &title,
const QString &text);
};
void OBSErrorBox(QWidget *parent, const char *msg, ...);
void QTToGSWindow(WId windowId, gs_window &gswindow);