Open 3D Engine AzQtComponents API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzQtComponents::AzMessageBox Class Reference

#include <MessageBox.h>

Static Public Member Functions

static int questionIfNecessary (QWidget *parent, const QString &settingKey, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::StandardButtons(QMessageBox::No|QMessageBox::Yes), QMessageBox::StandardButton defaultButton=QMessageBox::No, const QString &autoHideCheckBoxText=QString())
 
static int criticalIfNecessary (QWidget *parent, const QString &settingKey, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::No, const QString &autoHideCheckBoxText=QString())
 
static int informationIfNecessary (QWidget *parent, const QString &settingKey, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::No, const QString &autoHideCheckBoxText=QString())
 
static int warningIfNecessary (QWidget *parent, const QString &settingKey, const QString &title, const QString &text, QMessageBox::StandardButtons buttons=QMessageBox::Ok, QMessageBox::StandardButton defaultButton=QMessageBox::No, const QString &autoHideCheckBoxText=QString())
 

Detailed Description

Open 3D Engine specific wrapper to do MessageBox type stuff, specifically to automatically handle checking/writing "do not ask this question again" checkbox/settings.

Called AzMessageBox instead of MessageBox because for windows.h does #define MessageBox MessageBoxA / MessageBoxW

Member Function Documentation

◆ criticalIfNecessary()

static int AzQtComponents::AzMessageBox::criticalIfNecessary ( QWidget *  parent,
const QString &  settingKey,
const QString &  title,
const QString &  text,
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::No,
const QString &  autoHideCheckBoxText = QString() 
)
static

This is a variant of QMessageBox::critical() that will first check if there is a QSetting saved already under the settingKey parameter. If there is, that value will be returned. If there isn't, the dialog will be shown to the user modally, the response will be saved in the QSettings and then returned.

◆ informationIfNecessary()

static int AzQtComponents::AzMessageBox::informationIfNecessary ( QWidget *  parent,
const QString &  settingKey,
const QString &  title,
const QString &  text,
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::No,
const QString &  autoHideCheckBoxText = QString() 
)
static

This is a variant of QMessageBox::information() will first check if there is a QSetting saved already under the settingKey parameter. If there is, that value will be returned. If there isn't, the dialog will be shown to the user modally, the response will be saved in the QSettings and then returned.

◆ questionIfNecessary()

static int AzQtComponents::AzMessageBox::questionIfNecessary ( QWidget *  parent,
const QString &  settingKey,
const QString &  title,
const QString &  text,
QMessageBox::StandardButtons  buttons = QMessageBox::StandardButtons(QMessageBox::No|QMessageBox::Yes),
QMessageBox::StandardButton  defaultButton = QMessageBox::No,
const QString &  autoHideCheckBoxText = QString() 
)
static

This is a variant of QMessageBox::question() that will first check if there is a QSetting saved already under the settingKey parameter. If there is, that value will be returned. If there isn't, the dialog will be shown to the user modally, the response will be saved in the QSettings and then returned.

◆ warningIfNecessary()

static int AzQtComponents::AzMessageBox::warningIfNecessary ( QWidget *  parent,
const QString &  settingKey,
const QString &  title,
const QString &  text,
QMessageBox::StandardButtons  buttons = QMessageBox::Ok,
QMessageBox::StandardButton  defaultButton = QMessageBox::No,
const QString &  autoHideCheckBoxText = QString() 
)
static

This is a variant of QMessageBox::warning() will first check if there is a QSetting saved already under the settingKey parameter. If there is, that value will be returned. If there isn't, the dialog will be shown to the user modally, the response will be saved in the QSettings and then returned.


The documentation for this class was generated from the following file: