Changeset 45266 in vbox
- Timestamp:
- Apr 1, 2013 9:28:29 AM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r45247 r45266 91 91 int iButton2 /* = 0 */, 92 92 int iButton3 /* = 0 */, 93 const QString &strButton 1 /* = QString() */,94 const QString &strButton 2 /* = QString() */,95 const QString &strButton 3 /* = QString() */) const93 const QString &strButtonText1 /* = QString() */, 94 const QString &strButtonText2 /* = QString() */, 95 const QString &strButtonText3 /* = QString() */) const 96 96 { 97 97 /* If this is NOT a GUI thread: */ … … 103 103 strMessage, strDetails, 104 104 iButton1, iButton2, iButton3, 105 strButton 1, strButton2, strButton3,105 strButtonText1, strButtonText2, strButtonText3, 106 106 QString(pcszAutoConfirmId)); 107 107 /* Inter-thread communications are not yet implemented: */ … … 112 112 strMessage, strDetails, 113 113 iButton1, iButton2, iButton3, 114 strButton 1, strButton2, strButton3,114 strButtonText1, strButtonText2, strButtonText3, 115 115 QString(pcszAutoConfirmId)); 116 116 } … … 2809 2809 const QString &strMessage, const QString &strDetails, 2810 2810 int iButton1, int iButton2, int iButton3, 2811 const QString &strButton 1, const QString &strButton2, const QString &strButton3,2811 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3, 2812 2812 const QString &strAutoConfirmId) const 2813 2813 { … … 2816 2816 strMessage, strDetails, 2817 2817 iButton1, iButton2, iButton3, 2818 strButton 1, strButton2, strButton3,2818 strButtonText1, strButtonText2, strButtonText3, 2819 2819 strAutoConfirmId); 2820 2820 } … … 2999 2999 const QString &strMessage, const QString &strDetails, 3000 3000 int iButton1, int iButton2, int iButton3, 3001 const QString &strButton 1, const QString &strButton2, const QString &strButton3,3001 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3, 3002 3002 const QString &strAutoConfirmId) const 3003 3003 { … … 3077 3077 3078 3078 /* Configure button-text: */ 3079 if (!strButton 1.isNull())3080 pMessageBox->setButtonText(0, strButton 1);3081 if (!strButton 2.isNull())3082 pMessageBox->setButtonText(1, strButton 2);3083 if (!strButton 3.isNull())3084 pMessageBox->setButtonText(2, strButton 3);3079 if (!strButtonText1.isNull()) 3080 pMessageBox->setButtonText(0, strButtonText1); 3081 if (!strButtonText2.isNull()) 3082 pMessageBox->setButtonText(1, strButtonText2); 3083 if (!strButtonText3.isNull()) 3084 pMessageBox->setButtonText(2, strButtonText3); 3085 3085 3086 3086 /* Show message-box: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r45247 r45266 62 62 const QString &strMessage, const QString &strDetails, 63 63 int iButton1, int iButton2, int iButton3, 64 const QString &strButton 1, const QString &strButton2, const QString &strButton3,64 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3, 65 65 const QString &strAutoConfirmId) const; 66 66 … … 80 80 void setWarningShown(const QString &strWarningName, bool fWarningShown); 81 81 82 /* API: Message posting stuff: Main function: */82 /* API: Alert providing stuff: Main function: */ 83 83 int message(QWidget *pParent, MessageType type, 84 84 const QString &strMessage, 85 85 const QString &strDetails = QString(), 86 86 const char *pcszAutoConfirmId = 0, 87 int button1 = 0, int button2 = 0, int button3 = 0, 88 const QString &strText1 = QString(), 89 const QString &strText2 = QString(), 90 const QString &strText3 = QString()) const; 91 92 /* API: Message posting stuff: Wrapper to above function: */ 87 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, 88 const QString &strButtonText1 = QString(), 89 const QString &strButtonText2 = QString(), 90 const QString &strButtonText3 = QString()) const; 91 92 /* API: Alert providing stuff: Wrapper to the main function, 93 * Omits details: */ 93 94 int message(QWidget *pParent, MessageType type, 94 95 const QString &strMessage, 95 96 const char *pcszAutoConfirmId, 96 int button1 = 0, int button2 = 0, int button3 = 0,97 const QString &str Text1 = QString(),98 const QString &str Text2 = QString(),99 const QString &str Text3 = QString()) const97 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, 98 const QString &strButtonText1 = QString(), 99 const QString &strButtonText2 = QString(), 100 const QString &strButtonText3 = QString()) const 100 101 { 101 102 return message(pParent, type, strMessage, QString(), pcszAutoConfirmId, 102 button1, button2, button3, strText1, strText2, strText3);103 iButton1, iButton2, iButton3, strButtonText1, strButtonText2, strButtonText3); 103 104 } 104 105 105 /* API: Message posting stuff: Wrapper to above function: */ 106 /* API: Alert providing stuff: Wrapper to the main function, 107 * Takes button type(s) as "Yes / No": */ 106 108 bool messageYesNo(QWidget *pParent, MessageType type, 107 109 const QString &strMessage, 108 110 const QString &strDetails = QString(), 109 111 const char *pcszAutoConfirmId = 0, 110 const QString &strYes Text = QString(),111 const QString &strNo Text = QString()) const112 { 113 return (message(pParent, type, strMessage, strDetails, pcszAutoConfirmId,114 QIMessageBox::Yes | QIMessageBox::Default,115 QIMessageBox::No | QIMessageBox::Escape,116 0,117 strYesText, strNoText, QString()) &118 QIMessageBox::ButtonMask) == QIMessageBox::Yes;112 const QString &strYesButtonText = QString(), 113 const QString &strNoButtonText = QString()) const 114 { 115 return (message(pParent, type, strMessage, strDetails, pcszAutoConfirmId, 116 QIMessageBox::Yes | QIMessageBox::Default, 117 QIMessageBox::No | QIMessageBox::Escape, 118 0, 119 strYesButtonText, strNoButtonText, QString()) & 120 QIMessageBox::ButtonMask) == QIMessageBox::Yes; 119 121 } 120 122 121 /* API: Message posting stuff: Wrapper to above function: */ 123 /* API: Alert providing stuff: Wrapper to the function above, 124 * Omits details. Takes button type(s) as "Yes / No": */ 122 125 bool messageYesNo(QWidget *pParent, MessageType type, 123 126 const QString &strMessage, 124 127 const char *pcszAutoConfirmId, 125 const QString &strYes Text = QString(),126 const QString &strNo Text = QString()) const128 const QString &strYesButtonText = QString(), 129 const QString &strNoButtonText = QString()) const 127 130 { 128 131 return messageYesNo(pParent, type, strMessage, QString(), 129 pcszAutoConfirmId, strYes Text, strNoText);132 pcszAutoConfirmId, strYesButtonText, strNoButtonText); 130 133 } 131 134 132 /* API: Message posting stuff: Wrapper to above function: */ 135 /* API: Alert providing stuff: Wrapper to the main function, 136 * Takes button type(s) as "Ok / Cancel": */ 133 137 bool messageOkCancel(QWidget *pParent, MessageType type, 134 138 const QString &strMessage, 135 139 const QString &strDetails = QString(), 136 140 const char *pcszAutoConfirmId = 0, 137 const QString &strOk Text = QString(),138 const QString &strCancel Text = QString()) const139 { 140 return (message(pParent, type, strMessage, strDetails, pcszAutoConfirmId,141 QIMessageBox::Ok | QIMessageBox::Default,142 QIMessageBox::Cancel | QIMessageBox::Escape,143 0,144 strOkText, strCancelText, QString()) &145 QIMessageBox::ButtonMask) == QIMessageBox::Ok;141 const QString &strOkButtonText = QString(), 142 const QString &strCancelButtonText = QString()) const 143 { 144 return (message(pParent, type, strMessage, strDetails, pcszAutoConfirmId, 145 QIMessageBox::Ok | QIMessageBox::Default, 146 QIMessageBox::Cancel | QIMessageBox::Escape, 147 0, 148 strOkButtonText, strCancelButtonText, QString()) & 149 QIMessageBox::ButtonMask) == QIMessageBox::Ok; 146 150 } 147 151 148 /* API: Message posting stuff: Wrapper to above function: */ 152 /* API: Alert providing stuff: Wrapper to the function above, 153 * Omits details. Takes button type(s) as "Ok / Cancel": */ 149 154 bool messageOkCancel(QWidget *pParent, MessageType type, 150 155 const QString &strMessage, 151 156 const char *pcszAutoConfirmId, 152 const QString &strOk Text = QString(),153 const QString &strCancel Text = QString()) const157 const QString &strOkButtonText = QString(), 158 const QString &strCancelButtonText = QString()) const 154 159 { 155 160 return messageOkCancel(pParent, type, strMessage, QString(), 156 pcszAutoConfirmId, strOk Text, strCancelText);161 pcszAutoConfirmId, strOkButtonText, strCancelButtonText); 157 162 } 158 163 159 /* API: Message posting stuff: One more main function: */164 /* API: Alert providing stuff: One more main function: */ 160 165 int messageWithOption(QWidget *pParent, MessageType type, 161 166 const QString &strMessage, … … 164 169 const QString &strDetails = QString(), 165 170 int iButton1 = 0, int iButton2 = 0, int iButton3 = 0, 166 const QString &strButton Name1 = QString(),167 const QString &strButton Name2 = QString(),168 const QString &strButton Name3 = QString()) const;171 const QString &strButtonText1 = QString(), 172 const QString &strButtonText2 = QString(), 173 const QString &strButtonText3 = QString()) const; 169 174 170 175 /* API: Progress-dialog stuff: */ … … 419 424 const QString &strMessage, const QString &strDetails, 420 425 int iButton1, int iButton2, int iButton3, 421 const QString &strButton 1, const QString &strButton2, const QString &strButton3,426 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3, 422 427 const QString &strAutoConfirmId) const; 423 428 … … 442 447 const QString &strMessage, const QString &strDetails, 443 448 int iButton1, int iButton2, int iButton3, 444 const QString &strButton 1, const QString &strButton2, const QString &strButton3,449 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3, 445 450 const QString &strAutoConfirmId) const; 446 451
Note:
See TracChangeset
for help on using the changeset viewer.