Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmessagebox.cpp File Reference

(87806f5cad6e4ce75a899598c15c126995682562)

#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 , 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 , ShowLabel = 0 , HideLabel = 1 }
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 , 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 , 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 [1/2]

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

Definition at line 74 of file qmessagebox.cpp.

◆ Button [2/2]

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

Definition at line 74 of file qmessagebox.cpp.

◆ DetailButtonLabel [1/2]

Enumerator
ShowLabel 
HideLabel 
ShowLabel 
HideLabel 

Definition at line 78 of file qmessagebox.cpp.

◆ DetailButtonLabel [2/2]

Enumerator
ShowLabel 
HideLabel 
ShowLabel 
HideLabel 

Definition at line 78 of file qmessagebox.cpp.

Function Documentation

◆ detectedCompat()

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

Definition at line 2052 of file qmessagebox.cpp.

References NewButtonMask.

Referenced by QMessageBoxPrivate::addOldButtons().

Here is the caller graph for this function:

◆ helperIcon()

Definition at line 2786 of file qmessagebox.cpp.

◆ helperStandardButtons()

QPlatformDialogHelper::StandardButtons helperStandardButtons ( QMessageBox * q)
static

Definition at line 2803 of file qmessagebox.cpp.

◆ newButton()

QMessageBox::StandardButton newButton ( int button)
static

Definition at line 2043 of file qmessagebox.cpp.

◆ oldButton()

int oldButton ( int button)
static

Definition at line 423 of file qmessagebox.cpp.

References Old_Abort, Old_Cancel, Old_Ignore, Old_No, Old_NoAll, Old_Ok, Old_Retry, Old_Yes, and Old_YesAll.

Referenced by QMessageBoxPrivate::execReturnCode().

Here is the caller graph for this function:

◆ qRequireVersion()

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

Definition at line 2903 of file qmessagebox.cpp.

◆ showNewMessageBox()

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

Definition at line 1734 of file qmessagebox.cpp.