Changeset 89946 in vbox
- Timestamp:
- Jun 29, 2021 9:22:12 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/extensions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r89945 r89946 33 33 #include "UICommon.h" 34 34 #include "UIIconPool.h" 35 #include "UIMessageCenter.h" 35 36 36 37 /* Other VBox includes: */ … … 55 56 , m_pButton2(0) 56 57 , m_pButton3(0) 58 , m_pButtonHelp(0) 57 59 , m_pButtonBox(0) 60 , m_strHelpKeyword(strHelpKeyword) 58 61 , m_fDone(false) 59 62 { 60 if (!strHelpKeyword.isEmpty())61 uiCommon().setHelpKeyword(this, strHelpKeyword);62 63 /* Prepare: */ 63 64 prepare(); … … 261 262 if (m_pButton3) 262 263 connect(m_pButton3, &QPushButton::clicked, this, &QIMessageBox::sltDone3); 264 /* Create the help button and connect it to relevant slot in case a help word is supplied: */ 265 if (!m_strHelpKeyword.isEmpty()) 266 { 267 m_pButtonHelp = createButton(AlertButton_Help); 268 if (m_pButtonHelp) 269 { 270 uiCommon().setHelpKeyword(m_pButtonHelp, m_strHelpKeyword); 271 connect(m_pButtonHelp, &QPushButton::clicked, &msgCenter(), &UIMessageCenter::sltHandleHelpRequest); 272 } 273 } 274 263 275 /* Make sure Escape button always set: */ 264 276 Assert(m_iButtonEsc); … … 316 328 case AlertButton_Choice2: strText = tr("No"); role = QDialogButtonBox::NoRole; break; 317 329 case AlertButton_Copy: strText = tr("Copy"); role = QDialogButtonBox::ActionRole; break; 330 case AlertButton_Help: strText = tr("Help"); role = QDialogButtonBox::HelpRole; break; 318 331 default: 319 332 AssertMsgFailed(("Type %d is not supported!", iButton)); -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h
r89945 r89946 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 }; … … 193 194 /** Holds the 3rd button instance. */ 194 195 QPushButton *m_pButton3; 196 /** Holds the help-button instance. */ 197 QPushButton *m_pButtonHelp; 198 195 199 /** Holds the button-box instance. */ 196 200 QIDialogButtonBox *m_pButtonBox; 197 201 202 /** Holds the help keyword string. */ 203 QString m_strHelpKeyword; 204 198 205 /** Defines whether message was accepted. */ 199 206 bool m_fDone : 1;
Note:
See TracChangeset
for help on using the changeset viewer.