23 #ifndef SUIT_MESSAGEBOX_H
24 #define SUIT_MESSAGEBOX_H
30 #include <QMessageBox>
38 SUIT_MessageBox( Icon,
const QString&,
const QString&, StandardButtons buttons = NoButton,
39 QWidget* = 0, Qt::WindowFlags = Qt::Dialog | Qt::MSWindowsFixedSizeDialogHint );
43 QString buttonText( StandardButton )
const;
44 void setButtonText( StandardButton,
const QString& );
47 static StandardButton critical(
QWidget* parent,
const QString& title,
const QString& text,
48 StandardButtons buttons = Ok, StandardButton defaultButton = NoButton );
49 static StandardButton warning(
QWidget* parent,
const QString& title,
const QString& text,
50 StandardButtons buttons = Ok, StandardButton defaultButton = NoButton );
51 static StandardButton information(
QWidget* parent,
const QString& title,
const QString& text,
52 StandardButtons buttons = Ok, StandardButton defaultButton = NoButton );
53 static StandardButton question(
QWidget* parent,
const QString& title,
const QString& text,
54 StandardButtons buttons = Ok, StandardButton defaultButton = NoButton );
57 static int critical(
QWidget* parent,
const QString& title,
const QString& text,
58 const QString& button );
59 static int warning(
QWidget* parent,
const QString& title,
const QString& text,
60 const QString& button );
61 static int information(
QWidget* parent,
const QString& title,
const QString& text,
62 const QString& button );
63 static int question(
QWidget* parent,
const QString& title,
const QString& text,
64 const QString& button );
67 static int critical(
QWidget* parent,
const QString& title,
const QString& text,
68 const QString& button1,
const QString& button2,
69 const int defaultButton = -1,
const int escapeButton = -1 );
70 static int warning(
QWidget* parent,
const QString& title,
const QString& text,
71 const QString& button1,
const QString& button2,
72 const int defaultButton = -1,
const int escapeButton = -1 );
73 static int information(
QWidget* parent,
const QString& title,
const QString& text,
74 const QString& button1,
const QString& button2,
75 const int defaultButton = -1,
const int escapeButton = -1 );
76 static int question(
QWidget* parent,
const QString& title,
const QString& text,
77 const QString& button1,
const QString& button2,
78 const int defaultButton = -1,
const int escapeButton = -1 );
81 static int critical(
QWidget* parent,
const QString& title,
const QString& text,
82 const QString& button1,
const QString& button2,
const QString& button3,
83 const int defaultButton = -1,
const int escapeButton = -1 );
84 static int warning(
QWidget* parent,
const QString& title,
const QString& text,
85 const QString& button1,
const QString& button2,
const QString& button3,
86 const int defaultButton = -1,
const int escapeButton = -1 );
87 static int information(
QWidget* parent,
const QString& title,
const QString& text,
88 const QString& button1,
const QString& button2,
const QString& button3,
89 const int defaultButton = -1,
const int escapeButton = -1 );
90 static int question(
QWidget* parent,
const QString& title,
const QString& text,
91 const QString& button1,
const QString& button2,
const QString& button3,
92 const int defaultButton = -1,
const int escapeButton = -1 );
95 static int critical(
QWidget* parent,
const QString& title,
const QString& text,
96 const QString& button1,
const QString& button2,
97 const QString& button3,
const QString& button4,
98 const int defaultButton = -1,
const int escapeButton = -1 );
99 static int warning(
QWidget* parent,
const QString& title,
const QString& text,
100 const QString& button1,
const QString& button2,
101 const QString& button3,
const QString& button4,
102 const int defaultButton = -1,
const int escapeButton = -1 );
103 static int information(
QWidget* parent,
const QString& title,
const QString& text,
104 const QString& button1,
const QString& button2,
105 const QString& button3,
const QString& button4,
106 const int defaultButton = -1,
const int escapeButton = -1 );
107 static int question(
QWidget* parent,
const QString& title,
const QString& text,
108 const QString& button1,
const QString& button2,
109 const QString& button3,
const QString& button4,
110 const int defaultButton = -1,
const int escapeButton = -1 );
113 static int critical(
QWidget* parent,
const QString& title,
const QString& text,
114 const QStringList& buttons,
115 const int defaultButton = -1,
const int escapeButton = -1 );
116 static int warning(
QWidget* parent,
const QString& title,
const QString& text,
117 const QStringList& buttons,
118 const int defaultButton = -1,
const int escapeButton = -1 );
119 static int information(
QWidget* parent,
const QString& title,
const QString& text,
120 const QStringList& buttons,
121 const int defaultButton = -1,
const int escapeButton = -1 );
122 static int question(
QWidget* parent,
const QString& title,
const QString& text,
123 const QStringList& buttons,
124 const int defaultButton = -1,
const int escapeButton = -1 );
126 static int critical(
QWidget* parent,
const QString& title,
const QString& text,
127 const int defaultButton,
const int escapeButton,
129 static int warning(
QWidget* parent,
const QString& title,
const QString& text,
130 const int defaultButton,
const int escapeButton,
132 static int information(
QWidget* parent,
const QString& title,
const QString& text,
133 const int defaultButton,
const int escapeButton,
135 static int question(
QWidget* parent,
const QString& title,
const QString& text,
136 const int defaultButton,
const int escapeButton,
145 const ButtonRole role = ActionRole )
146 : myId( id ), myText( text ), myRole( role ) {}
147 int id()
const {
return myId; }
148 QString
text()
const {
return myText; }
149 ButtonRole
role()
const {
return myRole; }
159 static int messageBox( SUIT_MessageBox::Icon icon,
QWidget* parent,
160 const QString& title,
const QString& text,
162 const int defaultButton = -1,
163 const int escapeButton = -1 );