Changeset 85610 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 5, 2020 10:14:37 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r85572 r85610 244 244 245 245 UIActionMenu::UIActionMenu(UIActionPool *pParent, 246 const QString &strIconNormal, const QString &strIconSmall, 247 const QString &strIconNormalDisabled, const QString &strIconSmallDisabled) 248 : UIAction(pParent, UIActionType_Menu) 249 { 250 if (!strIconNormal.isNull()) 251 setIcon(UIIconPool::iconSetFull(strIconNormal, strIconSmall, strIconNormalDisabled, strIconSmallDisabled)); 252 prepare(); 253 } 254 255 UIActionMenu::UIActionMenu(UIActionPool *pParent, 246 256 const QIcon &icon) 247 257 : UIAction(pParent, UIActionType_Menu) … … 290 300 : UIAction(pParent, UIActionType_Simple, fMachineMenuAction) 291 301 { 292 setIcon(UIIconPool::iconSet(strIcon, strIconDisabled)); 302 if (!strIcon.isNull()) 303 setIcon(UIIconPool::iconSet(strIcon, strIconDisabled)); 293 304 } 294 305 … … 299 310 : UIAction(pParent, UIActionType_Simple, fMachineMenuAction) 300 311 { 301 setIcon(UIIconPool::iconSetFull(strIconNormal, strIconSmall, strIconNormalDisabled, strIconSmallDisabled)); 312 if (!strIconNormal.isNull()) 313 setIcon(UIIconPool::iconSetFull(strIconNormal, strIconSmall, strIconNormalDisabled, strIconSmallDisabled)); 302 314 } 303 315 … … 307 319 : UIAction(pParent, UIActionType_Simple, fMachineMenuAction) 308 320 { 309 setIcon(icon); 321 if (!icon.isNull()) 322 setIcon(icon); 310 323 } 311 324 … … 327 340 : UIAction(pParent, UIActionType_Toggle, fMachineMenuAction) 328 341 { 329 setIcon(UIIconPool::iconSet(strIcon, strIconDisabled)); 342 if (!strIcon.isNull()) 343 setIcon(UIIconPool::iconSet(strIcon, strIconDisabled)); 330 344 prepare(); 331 345 } … … 337 351 : UIAction(pParent, UIActionType_Toggle, fMachineMenuAction) 338 352 { 339 setIcon(UIIconPool::iconSetOnOff(strIconOn, strIconOff, strIconOnDisabled, strIconOffDisabled)); 353 if (!strIconOn.isNull()) 354 setIcon(UIIconPool::iconSetOnOff(strIconOn, strIconOff, strIconOnDisabled, strIconOffDisabled)); 340 355 prepare(); 341 356 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r85572 r85610 324 324 const QString &strIconDisabled = QString()); 325 325 /** Constructs menu action passing @a pParent to the base-class. 326 * @param strIconNormal Brings the normal-icon name. 327 * @param strIconSmall Brings the small-icon name. 328 * @param strIconNormalDisabled Brings the normal-disabled-icon name. 329 * @param strIconSmallDisabled Brings the small-disabled-icon name. */ 330 UIActionMenu(UIActionPool *pParent, 331 const QString &strIconNormal, const QString &strIconSmall, 332 const QString &strIconNormalDisabled, const QString &strIconSmallDisabled); 333 /** Constructs menu action passing @a pParent to the base-class. 326 334 * @param icon Brings the icon. */ 327 335 UIActionMenu(UIActionPool *pParent,
Note:
See TracChangeset
for help on using the changeset viewer.