E5Gui/E5MessageBox.py

changeset 562
8bf0dbc1ca6a
parent 553
5af61623ae3c
child 564
b3d966393ba9
equal deleted inserted replaced
561:c4315307961b 562:8bf0dbc1ca6a
101 @param icon type of icon to be shown (QMessageBox.Icon) 101 @param icon type of icon to be shown (QMessageBox.Icon)
102 @param buttons flags indicating which buttons to show 102 @param buttons flags indicating which buttons to show
103 (QMessageBox.StandardButtons) 103 (QMessageBox.StandardButtons)
104 @param defaultButton flag indicating the default button 104 @param defaultButton flag indicating the default button
105 (QMessageBox.StandardButton) 105 (QMessageBox.StandardButton)
106 @return button pressed by the user 106 @return button pressed by the user (QMessageBox.StandardButton)
107 (QMessageBox.StandardButton)
108 """ 107 """
109 messageBox = QMessageBox(parent) 108 messageBox = QMessageBox(parent)
110 messageBox.setIcon(icon) 109 messageBox.setIcon(icon)
111 if parent is not None: 110 if parent is not None:
112 messageBox.setWindowModality(Qt.WindowModal) 111 messageBox.setWindowModality(Qt.WindowModal)
136 @param text text to be shown by the message box (string) 135 @param text text to be shown by the message box (string)
137 @param buttons flags indicating which buttons to show 136 @param buttons flags indicating which buttons to show
138 (QMessageBox.StandardButtons) 137 (QMessageBox.StandardButtons)
139 @param defaultButton flag indicating the default button 138 @param defaultButton flag indicating the default button
140 (QMessageBox.StandardButton) 139 (QMessageBox.StandardButton)
141 @return button pressed by the user 140 @return button pressed by the user (QMessageBox.StandardButton)
142 (QMessageBox.StandardButton)
143 """ 141 """
144 return __messageBox(parent, title, text, QMessageBox.Critical, 142 return __messageBox(parent, title, text, QMessageBox.Critical,
145 buttons, defaultButton) 143 buttons, defaultButton)
146 144
147 def information(parent, title, text, 145 def information(parent, title, text,
154 @param text text to be shown by the message box (string) 152 @param text text to be shown by the message box (string)
155 @param buttons flags indicating which buttons to show 153 @param buttons flags indicating which buttons to show
156 (QMessageBox.StandardButtons) 154 (QMessageBox.StandardButtons)
157 @param defaultButton flag indicating the default button 155 @param defaultButton flag indicating the default button
158 (QMessageBox.StandardButton) 156 (QMessageBox.StandardButton)
159 @return button pressed by the user 157 @return button pressed by the user (QMessageBox.StandardButton)
160 (QMessageBox.StandardButton)
161 """ 158 """
162 return __messageBox(parent, title, text, QMessageBox.Information, 159 return __messageBox(parent, title, text, QMessageBox.Information,
163 buttons, defaultButton) 160 buttons, defaultButton)
164 161
165 def question(parent, title, text, 162 def question(parent, title, text,
172 @param text text to be shown by the message box (string) 169 @param text text to be shown by the message box (string)
173 @param buttons flags indicating which buttons to show 170 @param buttons flags indicating which buttons to show
174 (QMessageBox.StandardButtons) 171 (QMessageBox.StandardButtons)
175 @param defaultButton flag indicating the default button 172 @param defaultButton flag indicating the default button
176 (QMessageBox.StandardButton) 173 (QMessageBox.StandardButton)
177 @return button pressed by the user 174 @return button pressed by the user (QMessageBox.StandardButton)
178 (QMessageBox.StandardButton)
179 """ 175 """
180 return __messageBox(parent, title, text, QMessageBox.Question, 176 return __messageBox(parent, title, text, QMessageBox.Question,
181 buttons, defaultButton) 177 buttons, defaultButton)
182 178
183 def warning(parent, title, text, 179 def warning(parent, title, text,
190 @param text text to be shown by the message box (string) 186 @param text text to be shown by the message box (string)
191 @param buttons flags indicating which buttons to show 187 @param buttons flags indicating which buttons to show
192 (QMessageBox.StandardButtons) 188 (QMessageBox.StandardButtons)
193 @param defaultButton flag indicating the default button 189 @param defaultButton flag indicating the default button
194 (QMessageBox.StandardButton) 190 (QMessageBox.StandardButton)
195 @return button pressed by the user 191 @return button pressed by the user (QMessageBox.StandardButton)
196 (QMessageBox.StandardButton)
197 """ 192 """
198 return __messageBox(parent, title, text, QMessageBox.Warning, 193 return __messageBox(parent, title, text, QMessageBox.Warning,
199 buttons, defaultButton) 194 buttons, defaultButton)
200 195
201 ################################################################################ 196 ################################################################################

eric ide

mercurial