Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qmessagebox.cpp File Reference

(b30121041c07b1b8613eaf624c9aa55a51001aef)

#include <QtWidgets/qmessagebox.h>
#include <QtWidgets/qdialogbuttonbox.h>
#include "private/qlabel_p.h"
#include "private/qapplication_p.h"
#include <QtCore/qlist.h>
#include <QtCore/qdebug.h>
#include <QtWidgets/qstyle.h>
#include <QtWidgets/qstyleoption.h>
#include <QtWidgets/qgridlayout.h>
#include <QtWidgets/qpushbutton.h>
#include <QtWidgets/qcheckbox.h>
#include <QtGui/qaccessible.h>
#include <QtGui/qicon.h>
#include <QtGui/qtextdocument.h>
#include <QtWidgets/qapplication.h>
#include "qdialog_p.h"
#include <QtGui/qfont.h>
#include <QtGui/qfontmetrics.h>
#include <QtGui/qclipboard.h>
#include "private/qabstractbutton_p.h"
#include <QtGui/qpa/qplatformtheme.h>
#include <QtCore/qanystringview.h>
#include <QtCore/qpointer.h>
#include <QtCore/qversionnumber.h>
#include <optional>
#include "moc_qmessagebox.cpp"
#include "qmessagebox.moc"
+ Include dependency graph for qmessagebox.cpp:

Go to the source code of this file.

Classes

class  DetailButton
 
class  QMessageBoxPrivate
 

Enumerations

enum  Button {
  Old_Ok = 1 , Old_Cancel = 2 , Old_Yes = 3 , Old_No = 4 ,
  Old_Abort = 5 , Old_Retry = 6 , Old_Ignore = 7 , Old_YesAll = 8 ,
  Old_NoAll = 9 , Old_ButtonMask = 0xFF , NewButtonMask = 0xFFFFFC00
}
 
enum  DetailButtonLabel { ShowLabel = 0 , HideLabel = 1 }
 

Functions

static int oldButton (int button)
 
static QMessageBox::StandardButton showNewMessageBox (QWidget *parent, QMessageBox::Icon icon, const QString &title, const QString &text, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton defaultButton)
 
static QMessageBox::StandardButton newButton (int button)
 
static bool detectedCompat (int button0, int button1, int button2)
 
static QMessageDialogOptions::StandardIcon helperIcon (QMessageBox::Icon i)
 
static QPlatformDialogHelper::StandardButtons helperStandardButtons (QMessageBox *q)
 
void qRequireVersion (int argc, char *argv[], QAnyStringView req)
 

Enumeration Type Documentation

◆ Button

enum Button
Enumerator
Old_Ok 
Old_Cancel 
Old_Yes 
Old_No 
Old_Abort 
Old_Retry 
Old_Ignore 
Old_YesAll 
Old_NoAll 
Old_ButtonMask 
NewButtonMask 

Definition at line 73 of file qmessagebox.cpp.

◆ DetailButtonLabel

Enumerator
ShowLabel 
HideLabel 

Definition at line 77 of file qmessagebox.cpp.

Function Documentation

◆ detectedCompat()

static bool detectedCompat ( int button0,
int button1,
int button2 )
static

Definition at line 2081 of file qmessagebox.cpp.

References NewButtonMask.

Referenced by QMessageBoxPrivate::addOldButtons().

+ Here is the caller graph for this function:

◆ helperIcon()

Definition at line 2818 of file qmessagebox.cpp.

References QMessageDialogOptions::Critical, QMessageBox::Critical, i, QMessageDialogOptions::Information, QMessageBox::Information, QMessageDialogOptions::NoIcon, QMessageBox::NoIcon, QMessageDialogOptions::Question, QMessageBox::Question, QMessageDialogOptions::Warning, and QMessageBox::Warning.

Referenced by QMessageBoxPrivate::helperPrepareShow().

+ Here is the caller graph for this function:

◆ helperStandardButtons()

static QPlatformDialogHelper::StandardButtons helperStandardButtons ( QMessageBox * q)
static

Definition at line 2835 of file qmessagebox.cpp.

Referenced by QMessageBoxPrivate::helperPrepareShow().

+ Here is the caller graph for this function:

◆ newButton()

static QMessageBox::StandardButton newButton ( int button)
static

Definition at line 2072 of file qmessagebox.cpp.

References button, QMessageBox::ButtonMask, NewButtonMask, and QMessageBox::NoButton.

Referenced by QMessageBoxPrivate::abstractButtonForId(), QMessageBoxPrivate::addOldButtons(), and QMessageBoxPrivate::findButton().

+ Here is the caller graph for this function:

◆ oldButton()

static int oldButton ( int button)
static

Definition at line 422 of file qmessagebox.cpp.

References QMessageBox::Abort, button, QMessageBox::ButtonMask, QMessageBox::Cancel, QMessageBox::Ignore, QMessageBox::No, QMessageBox::NoToAll, QMessageBox::Ok, Old_Abort, Old_Cancel, Old_Ignore, Old_No, Old_NoAll, Old_Ok, Old_Retry, Old_Yes, Old_YesAll, QMessageBox::Retry, QMessageBox::Yes, and QMessageBox::YesToAll.

Referenced by QMessageBoxPrivate::execReturnCode(), and QWizard::setButton().

+ Here is the caller graph for this function:

◆ qRequireVersion()

void qRequireVersion ( int argc,
char * argv[],
QAnyStringView req )

Definition at line 2935 of file qmessagebox.cpp.

References QMessageBox::Abort, QString::arg(), QMessageBox::critical(), QVersionNumber::fromString(), qApp, qAppName(), qFatal, qUtf16Printable, and qVersion().

+ Here is the call graph for this function:

◆ showNewMessageBox()

static QMessageBox::StandardButton showNewMessageBox ( QWidget * parent,
QMessageBox::Icon icon,
const QString & title,
const QString & text,
QMessageBox::StandardButtons buttons,
QMessageBox::StandardButton defaultButton )
static

Definition at line 1754 of file qmessagebox.cpp.

References QDialogButtonBox::AcceptRole, QMessageBox::addButton(), button, QDialogButtonBox::buttonRole(), QMessageBox::Cancel, QMessageBox::clickedButton(), QMessageBox::Default, QMessageBox::defaultButton(), QDialog::exec(), QObject::findChild(), QMessageBox::FirstButton, icon, QMessageBox::LastButton, msgBox, QMessageBox::NoButton, Q_ASSERT, ret, QMessageBox::setDefaultButton(), QMessageBoxPrivate::showOldMessageBox(), QMessageBox::standardButton(), text, and title.

Referenced by QMessageBox::critical(), QMessageBox::information(), QMessageBox::question(), and QMessageBox::warning().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: