Definition at line 59 of file qmessagebox.h.
#include <qmessagebox.h>

Public Types |
|
| enum | Icon
{ NoIcon = 0, Information = 1, Warning = 2, Critical = 3, Question = 4 } |
| enum | ButtonRole
{ InvalidRole = -1, AcceptRole, RejectRole, DestructiveRole, ActionRole, HelpRole, YesRole, NoRole, ResetRole, ApplyRole, NRoles } |
| enum | StandardButton
{ NoButton = 0x00000000, Ok = 0x00000400, Save = 0x00000800, SaveAll = 0x00001000, Open = 0x00002000, Yes = 0x00004000, YesToAll = 0x00008000, No = 0x00010000, NoToAll = 0x00020000, Abort = 0x00040000, Retry = 0x00080000, Ignore = 0x00100000, Close = 0x00200000, Cancel = 0x00400000, Discard = 0x00800000, Help = 0x01000000, Apply = 0x02000000, Reset = 0x04000000, RestoreDefaults = 0x08000000, FirstButton = Ok, LastButton = RestoreDefaults, YesAll = YesToAll, NoAll = NoToAll, Default = 0x00000100, Escape = 0x00000200, FlagMask = 0x00000300, ButtonMask = ~FlagMask } |
| typedef StandardButton | Button |
Signals |
|
| void | buttonClicked (QAbstractButton *button) |
Public Member Functions |
|
| QMessageBox (QWidget *parent=0) | |
| QMessageBox (Icon icon, const QString &title, const QString &text, StandardButtons buttons=NoButton, QWidget *parent=0, Qt::WindowFlags flags=Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint) | |
| ~QMessageBox () | |
| void | addButton (QAbstractButton *button, ButtonRole role) |
| QPushButton * | addButton (const QString &text, ButtonRole role) |
| QPushButton * | addButton (StandardButton button) |
| void | removeButton (QAbstractButton *button) |
| void | open (QObject *receiver, const char *member) |
| QList< QAbstractButton * > | buttons () const |
| ButtonRole | buttonRole (QAbstractButton *button) const |
| void | setStandardButtons (StandardButtons buttons) |
| StandardButtons | standardButtons () const |
| StandardButton | standardButton (QAbstractButton *button) const |
| QAbstractButton * | button (StandardButton which) const |
| QPushButton * | defaultButton () const |
| void | setDefaultButton (QPushButton *button) |
| void | setDefaultButton (StandardButton button) |
| QAbstractButton * | escapeButton () const |
| void | setEscapeButton (QAbstractButton *button) |
| void | setEscapeButton (StandardButton button) |
| QAbstractButton * | clickedButton () const |
| QString | text () const |
| void | setText (const QString &text) |
| Icon | icon () const |
| void | setIcon (Icon) |
| QPixmap | iconPixmap () const |
| void | setIconPixmap (const QPixmap &pixmap) |
| Qt::TextFormat | textFormat () const |
| void | setTextFormat (Qt::TextFormat format) |
| QSize | sizeHint () const |
| QMessageBox (const QString &title, const QString &text, Icon icon, int button0, int button1, int button2, QWidget *parent=0, Qt::WindowFlags f=Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint) | |
| QString | buttonText (int button) const |
| void | setButtonText (int button, const QString &text) |
| QString | informativeText () const |
| void | setInformativeText (const QString &text) |
| QString | detailedText () const |
| void | setDetailedText (const QString &text) |
| void | setWindowTitle (const QString &title) |
| void | setWindowModality (Qt::WindowModality windowModality) |
Static Public Member Functions |
|
| static StandardButton | information (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| static StandardButton | question (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| static StandardButton | warning (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| static StandardButton | critical (QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton) |
| static void | about (QWidget *parent, const QString &title, const QString &text) |
| static void | aboutQt (QWidget *parent, const QString &title=QString()) |
| static int | information (QWidget *parent, const QString &title, const QString &text, int button0, int button1=0, int button2=0) |
| static int | information (QWidget *parent, const QString &title, const QString &text, const QString &button0Text, const QString &button1Text=QString(), const QString &button2Text=QString(), int defaultButtonNumber=0, int escapeButtonNumber=-1) |
| static StandardButton | information (QWidget *parent, const QString &title, const QString &text, StandardButton button0, StandardButton button1=NoButton) |
| static int | question (QWidget *parent, const QString &title, const QString &text, int button0, int button1=0, int button2=0) |
| static int | question (QWidget *parent, const QString &title, const QString &text, const QString &button0Text, const QString &button1Text=QString(), const QString &button2Text=QString(), int defaultButtonNumber=0, int escapeButtonNumber=-1) |
| static int | question (QWidget *parent, const QString &title, const QString &text, StandardButton button0, StandardButton button1) |
| static int | warning (QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2=0) |
| static int | warning (QWidget *parent, const QString &title, const QString &text, const QString &button0Text, const QString &button1Text=QString(), const QString &button2Text=QString(), int defaultButtonNumber=0, int escapeButtonNumber=-1) |
| static int | warning (QWidget *parent, const QString &title, const QString &text, StandardButton button0, StandardButton button1) |
| static int | critical (QWidget *parent, const QString &title, const QString &text, int button0, int button1, int button2=0) |
| static int | critical (QWidget *parent, const QString &title, const QString &text, const QString &button0Text, const QString &button1Text=QString(), const QString &button2Text=QString(), int defaultButtonNumber=0, int escapeButtonNumber=-1) |
| static int | critical (QWidget *parent, const QString &title, const QString &text, StandardButton button0, StandardButton button1) |
| static QPixmap | standardIcon (Icon icon) |
Protected Member Functions |
|
| bool | event (QEvent *e) |
| void | resizeEvent (QResizeEvent *event) |
| void | showEvent (QShowEvent *event) |
| void | closeEvent (QCloseEvent *event) |
| void | keyPressEvent (QKeyEvent *event) |
| void | changeEvent (QEvent *event) |
Properties |
|
| QString | text |
| Icon | icon |
| QPixmap | iconPixmap |
| Qt::TextFormat | textFormat |
| StandardButtons | standardButtons |
| QString | detailedText |
| QString | informativeText |
| typedef StandardButton Button |
Definition at line 133 of file qmessagebox.h.
| enum Icon |
Definition at line 76 of file qmessagebox.h.
{
NoIcon = 0,
Information = 1,
Warning = 2,
Critical = 3,
Question = 4
};
| enum ButtonRole |
| InvalidRole | |
| AcceptRole | |
| RejectRole | |
| DestructiveRole | |
| ActionRole | |
| HelpRole | |
| YesRole | |
| NoRole | |
| ResetRole | |
| ApplyRole | |
| NRoles |
Definition at line 84 of file qmessagebox.h.
{
// keep this in sync with QDialogButtonBox::ButtonRole
InvalidRole = -1,
AcceptRole,
RejectRole,
DestructiveRole,
ActionRole,
HelpRole,
YesRole,
NoRole,
ResetRole,
ApplyRole,
NRoles
};
| enum StandardButton |
| NoButton | |
| Ok | |
| Save | |
| SaveAll | |
| Open | |
| Yes | |
| YesToAll | |
| No | |
| NoToAll | |
| Abort | |
| Retry | |
| Ignore | |
| Close | |
| Cancel | |
| Discard | |
| Help | |
| Apply | |
| Reset | |
| RestoreDefaults | |
| FirstButton | |
| LastButton | |
| YesAll | |
| NoAll | |
| Default | |
| Escape | |
| FlagMask | |
| ButtonMask |
Definition at line 100 of file qmessagebox.h.
{
// keep this in sync with QDialogButtonBox::StandardButton
NoButton = 0x00000000,
Ok = 0x00000400,
Save = 0x00000800,
SaveAll = 0x00001000,
Open = 0x00002000,
Yes = 0x00004000,
YesToAll = 0x00008000,
No = 0x00010000,
NoToAll = 0x00020000,
Abort = 0x00040000,
Retry = 0x00080000,
Ignore = 0x00100000,
Close = 0x00200000,
Cancel = 0x00400000,
Discard = 0x00800000,
Help = 0x01000000,
Apply = 0x02000000,
Reset = 0x04000000,
RestoreDefaults = 0x08000000,
FirstButton = Ok, // internal
LastButton = RestoreDefaults, // internal
YesAll = YesToAll, // obsolete
NoAll = NoToAll, // obsolete
Default = 0x00000100, // obsolete
Escape = 0x00000200, // obsolete
FlagMask = 0x00000300, // obsolete
ButtonMask = ~FlagMask // obsolete
};
| QMessageBox | ( | QWidget * | parent = 0 |
) | [explicit] |
| QMessageBox | ( | Icon | icon, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons =
NoButton, |
||
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | flags =
Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint |
||
| ) |
| ~QMessageBox | ( | ) |
| QMessageBox | ( | const QString & | title, |
| const QString & | text, | ||
| Icon | icon, | ||
| int | button0, | ||
| int | button1, | ||
| int | button2, | ||
| QWidget * | parent = 0, |
||
| Qt::WindowFlags | f =
Qt::Dialog|Qt::MSWindowsFixedSizeDialogHint |
||
| ) |
| void addButton | ( | QAbstractButton * | button, |
| ButtonRole | role | ||
| ) |
| QPushButton* addButton | ( | const QString & | text, |
| ButtonRole | role | ||
| ) |
| QPushButton* addButton | ( | StandardButton | button | ) |
| void removeButton | ( | QAbstractButton * | button | ) |
| void open | ( | QObject * | receiver, |
| const char * | member | ||
| ) |
| QList<QAbstractButton *> buttons | ( | ) | const |
| ButtonRole buttonRole | ( | QAbstractButton * | button | ) | const |
| void setStandardButtons | ( | StandardButtons | buttons | ) |
| StandardButtons standardButtons | ( | ) | const |
| StandardButton standardButton | ( | QAbstractButton * | button | ) | const |
| QAbstractButton* button | ( | StandardButton | which | ) | const |
| QPushButton* defaultButton | ( | ) | const |
| void setDefaultButton | ( | QPushButton * | button | ) |
| void setDefaultButton | ( | StandardButton | button | ) |
| QAbstractButton* escapeButton | ( | ) | const |
| void setEscapeButton | ( | QAbstractButton * | button | ) |
| void setEscapeButton | ( | StandardButton | button | ) |
| QAbstractButton* clickedButton | ( | ) | const |
| QString text | ( | ) | const |
| void setText | ( | const QString & | text | ) |
| Icon icon | ( | ) | const |
| void setIcon | ( | Icon | ) |
| QPixmap iconPixmap | ( | ) | const |
| void setIconPixmap | ( | const QPixmap & | pixmap | ) |
| Qt::TextFormat textFormat | ( | ) | const |
| void setTextFormat | ( | Qt::TextFormat | format | ) |
| static StandardButton information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton =
NoButton |
||
| ) | [static] |
| static StandardButton question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton =
NoButton |
||
| ) | [static] |
| static StandardButton warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton =
NoButton |
||
| ) | [static] |
| static StandardButton critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButtons | buttons = Ok, |
||
| StandardButton | defaultButton =
NoButton |
||
| ) | [static] |
| static StandardButton information | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButton | button0, | ||
| StandardButton | button1 =
NoButton |
||
| ) | [inline, static] |
Definition at line 227 of file qmessagebox.h.
{ return information(parent, title, text, StandardButtons(button0), button1); }
| static int question | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButton | button0, | ||
| StandardButton | button1 | ||
| ) | [inline, static] |
Definition at line 242 of file qmessagebox.h.
{ return question(parent, title, text, StandardButtons(button0), button1); }
| static int warning | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButton | button0, | ||
| StandardButton | button1 | ||
| ) | [inline, static] |
Definition at line 257 of file qmessagebox.h.
{ return warning(parent, title, text, StandardButtons(button0), button1); }
| static int critical | ( | QWidget * | parent, |
| const QString & | title, | ||
| const QString & | text, | ||
| StandardButton | button0, | ||
| StandardButton | button1 | ||
| ) | [inline, static] |
Definition at line 272 of file qmessagebox.h.
{ return critical(parent, title, text, StandardButtons(button0), button1); }
| QString buttonText | ( | int | button | ) | const |
| void setButtonText | ( | int | button, |
| const QString & | text | ||
| ) |
| QString informativeText | ( | ) | const |
| void setInformativeText | ( | const QString & | text | ) |
| QString detailedText | ( | ) | const |
| void setDetailedText | ( | const QString & | text | ) |
| void setWindowModality | ( | Qt::WindowModality | windowModality | ) |
Reimplemented from QWidget.
| void buttonClicked | ( | QAbstractButton * | button | ) | [signal] |
| void resizeEvent | ( | QResizeEvent * | event | ) | [protected, virtual] |
Reimplemented from QDialog.
| void showEvent | ( | QShowEvent * | event | ) | [protected, virtual] |
Reimplemented from QDialog.
| void closeEvent | ( | QCloseEvent * | event | ) | [protected, virtual] |
Reimplemented from QDialog.
QString text [read,
write] |
Definition at line 64 of file qmessagebox.h.
Icon
icon [read, write] |
Definition at line 66 of file qmessagebox.h.
QPixmap iconPixmap [read,
write] |
Definition at line 67 of file qmessagebox.h.
Qt::TextFormat
textFormat [read, write] |
Definition at line 68 of file qmessagebox.h.
StandardButtons standardButtons [read,
write] |
Definition at line 69 of file qmessagebox.h.
QString detailedText [read,
write] |
Definition at line 71 of file qmessagebox.h.
QString informativeText [read,
write] |
Definition at line 73 of file qmessagebox.h.