Changeset 89928 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 28, 2021 10:45:05 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 145386
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r89926 r89928 313 313 case AlertButton_Choice2: strText = tr("No"); role = QDialogButtonBox::NoRole; break; 314 314 case AlertButton_Copy: strText = tr("Copy"); role = QDialogButtonBox::ActionRole; break; 315 case AlertButton_Help: strText = tr("Copy"); role = QDialogButtonBox::HelpRole; break;316 315 default: 317 316 AssertMsgFailed(("Type %d is not supported!", iButton)); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h
r89926 r89928 47 47 AlertButton_Choice2 = 0x8, /* 00000000 00001000 */ 48 48 AlertButton_Copy = 0x10, /* 00000000 00010000 */ 49 AlertButton_Help = 0x11, /* 00000000 00010001 */50 49 AlertButtonMask = 0xFF /* 00000000 11111111 */ 51 50 }; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r89926 r89928 160 160 int iButton2 /* = 0*/, 161 161 int iButton3 /* = 0*/, 162 int iButton4 /* = 0*/,163 162 const QString &strButtonText1 /* = QString() */, 164 163 const QString &strButtonText2 /* = QString() */, 165 const QString &strButtonText3 /* = QString() */, 166 const QString &strButtonText4 /* = QString() */) const 164 const QString &strButtonText3 /* = QString() */) const 167 165 { 168 166 /* If this is NOT a GUI thread: */ … … 173 171 emit sigToShowMessageBox(pParent, enmType, 174 172 strMessage, strDetails, 175 iButton1, iButton2, iButton3, iButton4,176 strButtonText1, strButtonText2, strButtonText3, strButtonText4,173 iButton1, iButton2, iButton3, 174 strButtonText1, strButtonText2, strButtonText3, 177 175 QString(pcszAutoConfirmId)); 178 176 /* Inter-thread communications are not yet implemented: */ … … 207 205 AlertButton_Cancel | AlertButtonOption_Escape, 208 206 0 /* third button */, 209 0 /* fourth button */,210 207 strOkButtonText, 211 208 strCancelButtonText, 212 QString() /* third button */, 213 QString() /* fourth button */) & 209 QString() /* third button */) & 214 210 AlertButtonMask) == AlertButton_Ok; 215 211 } … … 228 224 int iButton2 /* = 0*/, 229 225 int iButton3 /* = 0*/, 230 int iButton4 /* = 0*/,231 226 const QString &strButtonText1 /* = QString()*/, 232 227 const QString &strButtonText2 /* = QString()*/, 233 const QString &strButtonText3 /* = QString()*/, 234 const QString &strButtonText4 /* = QString()*/) const 228 const QString &strButtonText3 /* = QString()*/) const 235 229 { 236 230 return message(pParent, enmType, strMessage, QString(), pcszAutoConfirmId, 237 iButton1, iButton2, iButton3, iButton4, strButtonText1, strButtonText2, strButtonText3, strButtonText4);231 iButton1, iButton2, iButton3, strButtonText1, strButtonText2, strButtonText3); 238 232 } 239 233 … … 250 244 AlertButton_Cancel | AlertButtonOption_Escape, 251 245 0 /* third button */, 252 0 /* fourth button */,253 246 strOkButtonText, 254 247 strCancelButtonText, 255 QString() /* third button */, 256 QString() /* fourth button */) & 248 QString() /* third button */) & 257 249 AlertButtonMask) == AlertButton_Ok) : 258 250 ((question(pParent, enmType, strMessage, pcszAutoConfirmId, … … 260 252 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 261 253 0 /* third button */, 262 0 /* fourth button */,263 254 strOkButtonText, 264 255 strCancelButtonText, 265 QString() /* third button */, 266 QString() /* fourth button */) & 256 QString() /* third button */) & 267 257 AlertButtonMask) == AlertButton_Ok); 268 258 } … … 279 269 AlertButton_Choice2 | AlertButtonOption_Default, 280 270 AlertButton_Cancel | AlertButtonOption_Escape, 281 0 /* fourth button */,282 271 strChoice1ButtonText, 283 272 strChoice2ButtonText, 284 strCancelButtonText, 285 QString() /* fourth button text*/); 273 strCancelButtonText); 286 274 } 287 275 … … 293 281 int iButton2 /* = 0*/, 294 282 int iButton3 /* = 0*/, 295 int iButton4 /* = 0*/,296 283 const QString &strButtonName1 /* = QString() */, 297 284 const QString &strButtonName2 /* = QString() */, 298 const QString &strButtonName3 /* = QString() */, 299 const QString &strButtonName4 /* = QString() */) const 285 const QString &strButtonName3 /* = QString() */) const 300 286 { 301 287 /* If no buttons are set, using single 'OK' button: */ 302 if (iButton1 == 0 && iButton2 == 0 && iButton3 == 0 && iButton4 == 0)288 if (iButton1 == 0 && iButton2 == 0 && iButton3 == 0) 303 289 iButton1 = AlertButton_Ok | AlertButtonOption_Default; 304 290 … … 355 341 if (!strButtonName3.isNull()) 356 342 pBox->setButtonText(2, strButtonName3); 357 if (!strButtonName4.isNull())358 pBox->setButtonText(3, strButtonName4);359 343 360 344 /* Show box: */ … … 778 762 AlertButton_Ok, 779 763 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 780 0 /* button 3 */, 781 0 /* button 4 */, 764 0, 782 765 tr("Remove")) : 783 766 message(0, MessageType_Question, … … 787 770 AlertButton_Choice2, 788 771 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 789 0 /* button 4 */,790 772 tr("Delete all files"), 791 773 tr("Remove only")); … … 816 798 AlertButton_Choice2, 817 799 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 818 0 /* button 4 */,819 800 tr("Delete everything"), 820 801 tr("Remove only")); … … 1146 1127 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 1147 1128 0 /* 3rd button */, 1148 0 /* 4th button */,1149 1129 tr("Restore"), tr("Cancel"), QString() /* 3rd button text */) : 1150 1130 message(0, MessageType_Question, … … 1156 1136 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 1157 1137 0 /* 3rd button */, 1158 0 /* 4th button */,1159 1138 tr("Restore"), tr("Cancel"), QString() /* 3rd button text */); 1160 1139 } … … 2238 2217 AlertButton_Choice2, 2239 2218 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 2240 0 /* 4th button */,2241 2219 tr("Accept", "cloud profile manager changes"), 2242 2220 tr("Reject", "cloud profile manager changes")); … … 2775 2753 AlertButton_Ok | AlertButtonOption_Default, 2776 2754 AlertButton_Cancel | AlertButtonOption_Escape, 2777 0 /* 3rd button */, 2778 0 /* 4th button */, 2755 0, 2779 2756 tr("Capture", "do input capture")); 2780 2757 /* Was the message auto-confirmed? */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r89926 r89928 71 71 * @param iButton2 Brings the button 2 type. 72 72 * @param iButton3 Brings the button 3 type. 73 * @param iButton4 Brings the button 4 type.74 73 * @param strButtonText1 Brings the button 1 text. 75 74 * @param strButtonText2 Brings the button 2 text. 76 75 * @param strButtonText3 Brings the button 3 text. 77 * @param strButtonText4 Brings the button 4 text.78 76 * @param strAutoConfirmId Brings whether this message can be auto-confirmed. */ 79 77 void sigToShowMessageBox(QWidget *pParent, MessageType enmType, 80 78 const QString &strMessage, const QString &strDetails, 81 int iButton1, int iButton2, int iButton3, int iButton4, 82 const QString &strButtonText1, const QString &strButtonText2, 83 const QString &strButtonText3, const QString &strButtonText4, 79 int iButton1, int iButton2, int iButton3, 80 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3, 84 81 const QString &strAutoConfirmId) const; 85 82 … … 105 102 * @param iButton2 Brings the button 2 type. 106 103 * @param iButton3 Brings the button 3 type. 107 * @param iButton4 Brings the button 4 type.108 104 * @param strButtonText1 Brings the button 1 text. 109 105 * @param strButtonText2 Brings the button 2 text. 110 * @param strButtonText3 Brings the button 3 text. 111 * @param strButtonText3 Brings the button 4 text. */ 106 * @param strButtonText3 Brings the button 3 text. */ 112 107 int message(QWidget *pParent, MessageType enmType, 113 108 const QString &strMessage, const QString &strDetails, 114 109 const char *pcszAutoConfirmId = 0, 115 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, int iButton4 = 0,110 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, 116 111 const QString &strButtonText1 = QString(), 117 112 const QString &strButtonText2 = QString(), 118 const QString &strButtonText3 = QString(), 119 const QString &strButtonText4 = QString()) const; 113 const QString &strButtonText3 = QString()) const; 120 114 121 115 /** Shows an 'Error' type of 'Message'. … … 166 160 * @param iButton2 Brings the button 2 type. 167 161 * @param iButton3 Brings the button 3 type. 168 * @param iButton4 Brings the button 4 type.169 162 * @param strButtonText1 Brings the button 1 text. 170 163 * @param strButtonText2 Brings the button 2 text. 171 * @param strButtonText3 Brings the button 3 text. 172 * @param strButtonText4 Brings the button 4 text. */ 164 * @param strButtonText3 Brings the button 3 text. */ 173 165 int question(QWidget *pParent, MessageType enmType, 174 166 const QString &strMessage, 175 167 const char *pcszAutoConfirmId = 0, 176 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, int iButton4 = 0,168 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, 177 169 const QString &strButtonText1 = QString(), 178 170 const QString &strButtonText2 = QString(), 179 const QString &strButtonText3 = QString(), 180 const QString &strButtonText4 = QString()) const; 171 const QString &strButtonText3 = QString()) const; 181 172 182 173 /** Shows a 'Binary' type of 'Question'. … … 221 212 * @param iButton2 Brings the button 2 type. 222 213 * @param iButton3 Brings the button 3 type. 223 * @param iButton4 Brings the button 4 type.224 214 * @param strButtonText1 Brings the button 1 text. 225 215 * @param strButtonText2 Brings the button 2 text. … … 229 219 const QString &strOptionText, 230 220 bool fDefaultOptionValue = true, 231 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, int iButton4 = 0,221 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, 232 222 const QString &strButtonText1 = QString(), 233 223 const QString &strButtonText2 = QString(), 234 const QString &strButtonText3 = QString(), 235 const QString &strButtonText4 = QString()) const; 224 const QString &strButtonText3 = QString()) const; 236 225 237 226 /** Shows modal progress-dialog.
Note:
See TracChangeset
for help on using the changeset viewer.