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