2019-03-04 19:48:40 +00:00
|
|
|
// Copyright 2019 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2019-03-04 19:48:40 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QMessageBox>
|
|
|
|
|
|
|
|
// Helper for making message boxes modal by default
|
|
|
|
class ModalMessageBox : public QMessageBox
|
|
|
|
{
|
|
|
|
public:
|
2019-08-01 17:52:28 +00:00
|
|
|
explicit ModalMessageBox(QWidget* parent, Qt::WindowModality modality = Qt::WindowModal);
|
2019-03-04 19:48:40 +00:00
|
|
|
|
|
|
|
static int critical(QWidget* parent, const QString& title, const QString& text,
|
2019-11-10 22:57:43 +00:00
|
|
|
StandardButtons buttons = Ok, StandardButton default_button = NoButton,
|
|
|
|
Qt::WindowModality modality = Qt::WindowModal);
|
2019-03-04 19:48:40 +00:00
|
|
|
static int information(QWidget* parent, const QString& title, const QString& text,
|
2019-11-10 22:57:43 +00:00
|
|
|
StandardButtons buttons = Ok, StandardButton default_button = NoButton,
|
|
|
|
Qt::WindowModality modality = Qt::WindowModal);
|
2019-03-04 19:48:40 +00:00
|
|
|
static int question(QWidget* parent, const QString& title, const QString& text,
|
2019-11-10 22:57:43 +00:00
|
|
|
StandardButtons buttons = Yes | No, StandardButton default_button = NoButton,
|
|
|
|
Qt::WindowModality modality = Qt::WindowModal);
|
2019-03-04 19:48:40 +00:00
|
|
|
static int warning(QWidget* parent, const QString& title, const QString& text,
|
2019-11-10 22:57:43 +00:00
|
|
|
StandardButtons buttons = Ok, StandardButton default_button = NoButton,
|
|
|
|
Qt::WindowModality modality = Qt::WindowModal);
|
2019-03-04 19:48:40 +00:00
|
|
|
};
|