Changeset 51267 in vbox
- Timestamp:
- May 15, 2014 7:01:07 PM (10 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 11 edited
-
UIVMLogViewer.cpp (modified) (1 diff)
-
globals/UIActionPool.cpp (modified) (4 diffs)
-
globals/UIActionPool.h (modified) (3 diffs)
-
globals/UIIconPool.cpp (modified) (1 diff)
-
globals/UIIconPool.h (modified) (1 diff)
-
medium/UIMediumManager.cpp (modified) (2 diffs)
-
net/UINetworkManagerDialog.cpp (modified) (1 diff)
-
selector/UIActionPoolSelector.cpp (modified) (8 diffs)
-
selector/VBoxSnapshotsWgt.cpp (modified) (1 diff)
-
settings/global/UIGlobalSettingsPortForwardingDlg.cpp (modified) (1 diff)
-
settings/machine/UIMachineSettingsPortForwardingDlg.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UIVMLogViewer.cpp
r50931 r51267 384 384 385 385 /* Apply window icons: */ 386 setWindowIcon(UIIconPool::iconSetFull(QSize(32, 32), QSize(16, 16), 387 ":/vm_show_logs_32px.png", 388 ":/vm_show_logs_16px.png")); 386 setWindowIcon(UIIconPool::iconSetFull(":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png")); 389 387 390 388 /* Create VM Log Vewer container: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r50931 r51267 164 164 /* UIActionSimple stuff: */ 165 165 UIActionSimple::UIActionSimple(UIActionPool *pParent, 166 const QString &strIcon , const QString &strIconDis)166 const QString &strIcon /* = QString() */, const QString &strIconDisabled /* = QString() */) 167 167 : UIAction(pParent, UIActionType_Simple) 168 168 { 169 169 if (!strIcon.isNull()) 170 setIcon(UIIconPool::iconSet(strIcon, strIconDis ));170 setIcon(UIIconPool::iconSet(strIcon, strIconDisabled)); 171 171 } 172 172 173 173 UIActionSimple::UIActionSimple(UIActionPool *pParent, 174 const QSize &normalSize, const QSize &smallSize, 175 const QString &strNormalIcon, const QString &strSmallIcon, 176 const QString &strNormalIconDis, const QString &strSmallIconDis) 174 const QString &strIconNormal, const QString &strIconSmall, 175 const QString &strIconNormalDisabled, const QString &strIconSmallDisabled) 177 176 : UIAction(pParent, UIActionType_Simple) 178 177 { 179 setIcon(UIIconPool::iconSetFull( normalSize, smallSize, strNormalIcon, strSmallIcon, strNormalIconDis, strSmallIconDis));178 setIcon(UIIconPool::iconSetFull(strIconNormal, strIconSmall, strIconNormalDisabled, strIconSmallDisabled)); 180 179 } 181 180 … … 184 183 : UIAction(pParent, UIActionType_Simple) 185 184 { 186 if (!icon.isNull()) 187 setIcon(icon); 185 setIcon(icon); 188 186 } 189 187 190 188 /* UIActionState stuff: */ 191 189 UIActionState::UIActionState(UIActionPool *pParent, 192 const QString &strIcon , const QString &strIconDis)190 const QString &strIcon /* = QString() */, const QString &strIconDisabled /* = QString() */) 193 191 : UIAction(pParent, UIActionType_State) 194 192 , m_iState(0) 195 193 { 196 194 if (!strIcon.isNull()) 197 setIcon(UIIconPool::iconSet(strIcon, strIconDis ));195 setIcon(UIIconPool::iconSet(strIcon, strIconDisabled)); 198 196 } 199 197 200 198 UIActionState::UIActionState(UIActionPool *pParent, 201 const QSize &normalSize, const QSize &smallSize, 202 const QString &strNormalIcon, const QString &strSmallIcon, 203 const QString &strNormalIconDis, const QString &strSmallIconDis) 199 const QString &strIconNormal, const QString &strIconSmall, 200 const QString &strIconNormalDisabled, const QString &strIconSmallDisabled) 204 201 : UIAction(pParent, UIActionType_State) 205 202 , m_iState(0) 206 203 { 207 setIcon(UIIconPool::iconSetFull( normalSize, smallSize, strNormalIcon, strSmallIcon, strNormalIconDis, strSmallIconDis));204 setIcon(UIIconPool::iconSetFull(strIconNormal, strIconSmall, strIconNormalDisabled, strIconSmallDisabled)); 208 205 } 209 206 … … 219 216 /* UIActionToggle stuff: */ 220 217 UIActionToggle::UIActionToggle(UIActionPool *pParent, 221 const QString &strIcon , const QString &strIconDis)218 const QString &strIcon /* = QString() */, const QString &strIconDisabled /* = QString() */) 222 219 : UIAction(pParent, UIActionType_Toggle) 223 220 { 224 221 if (!strIcon.isNull()) 225 setIcon(UIIconPool::iconSet(strIcon, strIconDis ));222 setIcon(UIIconPool::iconSet(strIcon, strIconDisabled)); 226 223 init(); 227 224 } 228 225 229 226 UIActionToggle::UIActionToggle(UIActionPool *pParent, 230 const QSize &normalSize, const QSize &smallSize, 231 const QString &strNormalIcon, const QString &strSmallIcon, 232 const QString &strNormalIconDis, const QString &strSmallIconDis) 227 const QString &strIconOn, const QString &strIconOff, 228 const QString &strIconOnDisabled, const QString &strIconOffDisabled) 233 229 : UIAction(pParent, UIActionType_Toggle) 234 230 { 235 setIcon(UIIconPool::iconSetFull(normalSize, smallSize, strNormalIcon, strSmallIcon, strNormalIconDis, strSmallIconDis)); 236 init(); 237 } 238 239 UIActionToggle::UIActionToggle(UIActionPool *pParent, 240 const QString &strIconOn, const QString &strIconOff, 241 const QString &strIconOnDis, const QString &strIconOffDis) 242 : UIAction(pParent, UIActionType_Toggle) 243 { 244 setIcon(UIIconPool::iconSetOnOff(strIconOn, strIconOff, strIconOnDis, strIconOffDis)); 231 setIcon(UIIconPool::iconSetOnOff(strIconOn, strIconOff, strIconOnDisabled, strIconOffDisabled)); 245 232 init(); 246 233 } … … 293 280 294 281 UIActionSimpleLogDialog(UIActionPool *pParent) 295 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16),282 : UIActionSimple(pParent, 296 283 ":/vm_show_logs_32px.png", ":/vm_show_logs_16px.png", 297 284 ":/vm_show_logs_disabled_32px.png", ":/vm_show_logs_disabled_16px.png") -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r49596 r51267 152 152 /* Constructors: */ 153 153 UIActionSimple(UIActionPool *pParent, 154 const QString &strIcon = QString(), const QString &strIconDis = QString());154 const QString &strIcon = QString(), const QString &strIconDisabled = QString()); 155 155 UIActionSimple(UIActionPool *pParent, 156 const QSize &normalSize, const QSize &smallSize, 157 const QString &strNormalIcon, const QString &strSmallIcon, 158 const QString &strNormalIconDis = QString(), const QString &strSmallIconDis = QString()); 156 const QString &strIconNormal, const QString &strIconSmall, 157 const QString &strIconNormalDisabled, const QString &strIconSmallDisabled); 159 158 UIActionSimple(UIActionPool *pParent, 160 159 const QIcon& icon); … … 175 174 /* Constructors: */ 176 175 UIActionState(UIActionPool *pParent, 177 const QString &strIcon = QString(), const QString &strIconDis = QString());176 const QString &strIcon = QString(), const QString &strIconDisabled = QString()); 178 177 UIActionState(UIActionPool *pParent, 179 const QSize &normalSize, const QSize &smallSize, 180 const QString &strNormalIcon, const QString &strSmallIcon, 181 const QString &strNormalIconDis = QString(), const QString &strSmallIconDis = QString()); 178 const QString &strIconNormal, const QString &strIconSmall, 179 const QString &strIconNormalDisabled, const QString &strIconSmallDisabled); 182 180 UIActionState(UIActionPool *pParent, 183 181 const QIcon& icon); … … 196 194 /* Constructors: */ 197 195 UIActionToggle(UIActionPool *pParent, 198 const QString &strIcon = QString(), const QString &strIconDis = QString());196 const QString &strIcon = QString(), const QString &strIconDisabled = QString()); 199 197 UIActionToggle(UIActionPool *pParent, 200 const QSize &normalSize, const QSize &smallSize, 201 const QString &strNormalIcon, const QString &strSmallIcon, 202 const QString &strNormalIconDis = QString(), const QString &strSmallIconDis = QString()); 203 UIActionToggle(UIActionPool *pParent, 204 const QString &strIconOn, const QString &strIconOff, const QString &strIconOnDis, const QString &strIconOffDis); 198 const QString &strIconOn, const QString &strIconOff, 199 const QString &strIconOnDisabled, const QString &strIconOffDisabled); 205 200 UIActionToggle(UIActionPool *pParent, 206 201 const QIcon &icon); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
r51010 r51267 88 88 89 89 /* static */ 90 QIcon UIIconPool::iconSetFull(const QSize &size, const QSize &smallSize, 91 const QString &strNormal, const QString &strSmallNormal, 92 const QString &strDisabled /* = QString() */, 93 const QString &strSmallDisabled /* = QString() */, 94 const QString &strActive /* = QString() */, 95 const QString &strSmallActive /* = QString() */) 96 { 97 QIcon iconSet; 98 99 Assert(!strNormal.isEmpty()); 100 Assert(!strSmallNormal.isEmpty()); 101 iconSet.addFile(strNormal, size, QIcon::Normal); 102 iconSet.addFile(strSmallNormal, smallSize, QIcon::Normal); 103 90 QIcon UIIconPool::iconSetFull(const QString &strNormal, const QString &strSmall, 91 const QString &strNormalDisabled /* = QString() */, const QString &strSmallDisabled /* = QString() */, 92 const QString &strNormalActive /* = QString() */, const QString &strSmallActive /* = QString() */) 93 { 94 /* Prepare fallback icon: */ 95 static QIcon nullIcon; 96 97 /* Prepare icon: */ 98 QIcon icon; 99 100 /* Add 'normal' & 'small normal' pixmaps: */ 101 AssertReturn(!strNormal.isEmpty(), nullIcon); 102 addName(icon, strNormal, QIcon::Normal); 103 AssertReturn(!strSmall.isEmpty(), nullIcon); 104 addName(icon, strSmall, QIcon::Normal); 105 106 /* Add 'disabled' & 'small disabled' pixmaps (if any): */ 107 if (!strNormalDisabled.isEmpty()) 108 addName(icon, strNormalDisabled, QIcon::Disabled); 104 109 if (!strSmallDisabled.isEmpty()) 105 {106 iconSet.addFile(strDisabled, size, QIcon::Disabled); 107 iconSet.addFile(strSmallDisabled, smallSize, QIcon::Disabled);108 }109 110 addName(icon, strSmallDisabled, QIcon::Disabled); 111 112 /* Add 'active' & 'small active' pixmaps (if any): */ 113 if (!strNormalActive.isEmpty()) 114 addName(icon, strNormalActive, QIcon::Active); 110 115 if (!strSmallActive.isEmpty()) 111 { 112 iconSet.addFile(strActive, size, QIcon::Active); 113 iconSet.addFile(strSmallActive, smallSize, QIcon::Active); 114 } 115 116 return iconSet; 116 addName(icon, strSmallActive, QIcon::Active); 117 118 /* Return icon: */ 119 return icon; 117 120 } 118 121 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h
r50934 r51267 60 60 * @a strNormal, @a strDisabled, @a strActive icon states and 61 61 * their analogs for small-icon case. Used for setting pages. */ 62 static QIcon iconSetFull(const QSize &size, const QSize &smallSize, 63 const QString &strNormal, const QString &strSmallNormal, 64 const QString &strDisabled = QString(), const QString &strSmallDisabled = QString(), 65 const QString &strActive = QString(), const QString &strSmallActive = QString()); 62 static QIcon iconSetFull(const QString &strNormal, const QString &strSmall, 63 const QString &strNormalDisabled = QString(), const QString &strSmallDisabled = QString(), 64 const QString &strNormalActive = QString(), const QString &strSmallActive = QString()); 66 65 67 66 /** Creates icon from passed pixmaps for -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r51001 r51267 994 994 995 995 /* Apply window icons: */ 996 setWindowIcon(UIIconPool::iconSetFull(QSize(32, 32), QSize(16, 16), 997 ":/diskimage_32px.png", ":/diskimage_16px.png")); 996 setWindowIcon(UIIconPool::iconSetFull(":/diskimage_32px.png", ":/diskimage_16px.png")); 998 997 999 998 /* Prepare connections: */ … … 1464 1463 } 1465 1464 if (m_pActionCopy) 1466 m_pActionCopy->setIcon(UIIconPool::iconSetFull(QSize(22, 22), QSize(16, 16), 1467 QString(":/%1_copy_22px.png").arg(strPrefix), 1465 m_pActionCopy->setIcon(UIIconPool::iconSetFull(QString(":/%1_copy_22px.png").arg(strPrefix), 1468 1466 QString(":/%1_copy_16px.png").arg(strPrefix), 1469 1467 QString(":/%1_copy_disabled_22px.png").arg(strPrefix), 1470 1468 QString(":/%1_copy_disabled_16px.png").arg(strPrefix))); 1471 1469 if (m_pActionModify) 1472 m_pActionModify->setIcon(UIIconPool::iconSetFull(QSize(22, 22), QSize(16, 16), 1473 QString(":/%1_modify_22px.png").arg(strPrefix), 1470 m_pActionModify->setIcon(UIIconPool::iconSetFull(QString(":/%1_modify_22px.png").arg(strPrefix), 1474 1471 QString(":/%1_modify_16px.png").arg(strPrefix), 1475 1472 QString(":/%1_modify_disabled_22px.png").arg(strPrefix), 1476 1473 QString(":/%1_modify_disabled_16px.png").arg(strPrefix))); 1477 1474 if (m_pActionRemove) 1478 m_pActionRemove->setIcon(UIIconPool::iconSetFull(QSize(22, 22), QSize(16, 16), 1479 QString(":/%1_remove_22px.png").arg(strPrefix), 1475 m_pActionRemove->setIcon(UIIconPool::iconSetFull(QString(":/%1_remove_22px.png").arg(strPrefix), 1480 1476 QString(":/%1_remove_16px.png").arg(strPrefix), 1481 1477 QString(":/%1_remove_disabled_22px.png").arg(strPrefix), 1482 1478 QString(":/%1_remove_disabled_16px.png").arg(strPrefix))); 1483 1479 if (m_pActionRelease) 1484 m_pActionRelease->setIcon(UIIconPool::iconSetFull(QSize(22, 22), QSize(16, 16), 1485 QString(":/%1_release_22px.png").arg(strPrefix), 1480 m_pActionRelease->setIcon(UIIconPool::iconSetFull(QString(":/%1_release_22px.png").arg(strPrefix), 1486 1481 QString(":/%1_release_16px.png").arg(strPrefix), 1487 1482 QString(":/%1_release_disabled_22px.png").arg(strPrefix), 1488 1483 QString(":/%1_release_disabled_16px.png").arg(strPrefix))); 1489 1484 if (m_pActionRefresh && m_pActionRefresh->icon().isNull()) 1490 m_pActionRefresh->setIcon(UIIconPool::iconSetFull(QSize(22, 22), QSize(16, 16), 1491 ":/refresh_22px.png", ":/refresh_16px.png", 1485 m_pActionRefresh->setIcon(UIIconPool::iconSetFull(":/refresh_22px.png", ":/refresh_16px.png", 1492 1486 ":/refresh_disabled_22px.png", ":/refresh_disabled_16px.png")); 1493 1487 } -
trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkManagerDialog.cpp
r50041 r51267 52 52 { 53 53 /* Apply window icons: */ 54 setWindowIcon(UIIconPool::iconSetFull( QSize (32, 32), QSize (16, 16),":/nw_32px.png", ":/nw_16px.png"));54 setWindowIcon(UIIconPool::iconSetFull(":/nw_32px.png", ":/nw_16px.png")); 55 55 56 56 /* Do not count that window as important for application, -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIActionPoolSelector.cpp
r48950 r51267 232 232 233 233 UIActionSimpleGroupNew(UIActionPool *pParent) 234 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16),":/vm_new_32px.png", ":/vm_new_16px.png")234 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") 235 235 { 236 236 retranslateUi(); … … 405 405 406 406 UIActionSimpleMachineNew(UIActionPool *pParent) 407 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16),":/vm_new_32px.png", ":/vm_new_16px.png")407 : UIActionSimple(pParent, ":/vm_new_32px.png", ":/vm_new_16px.png") 408 408 { 409 409 retranslateUi(); … … 500 500 501 501 UIActionSimpleMachineSettings(UIActionPool *pParent) 502 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16),502 : UIActionSimple(pParent, 503 503 ":/vm_settings_32px.png", ":/vm_settings_16px.png", 504 504 ":/vm_settings_disabled_32px.png", ":/vm_settings_disabled_16px.png") … … 566 566 567 567 UIActionSimpleMachineRemove(UIActionPool *pParent) 568 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16),568 : UIActionSimple(pParent, 569 569 ":/vm_delete_32px.png", ":/vm_delete_16px.png", 570 570 ":/vm_delete_disabled_32px.png", ":/vm_delete_disabled_16px.png") … … 600 600 601 601 UIActionStateCommonStartOrShow(UIActionPool *pParent) 602 : UIActionState(pParent, QSize(32, 32), QSize(16, 16),602 : UIActionState(pParent, 603 603 ":/vm_start_32px.png", ":/vm_start_16px.png", 604 604 ":/vm_start_disabled_32px.png", ":/vm_start_disabled_16px.png") … … 647 647 648 648 UIActionToggleCommonPauseAndResume(UIActionPool *pParent) 649 : UIActionToggle(pParent, QSize(32, 32), QSize(16, 16),649 : UIActionToggle(pParent, 650 650 ":/vm_pause_32px.png", ":/vm_pause_16px.png", 651 651 ":/vm_pause_disabled_32px.png", ":/vm_pause_disabled_16px.png") … … 711 711 712 712 UIActionSimpleCommonDiscard(UIActionPool *pParent) 713 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16),713 : UIActionSimple(pParent, 714 714 ":/vm_discard_32px.png", ":/vm_discard_16px.png", 715 715 ":/vm_discard_disabled_32px.png", ":/vm_discard_disabled_16px.png") … … 747 747 748 748 UIActionSimpleCommonRefresh(UIActionPool *pParent) 749 : UIActionSimple(pParent, QSize(32, 32), QSize(16, 16),749 : UIActionSimple(pParent, 750 750 ":/refresh_32px.png", ":/refresh_16px.png", 751 751 ":/refresh_disabled_32px.png", ":/refresh_disabled_16px.png") -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
r51054 r51267 380 380 /* Setup actions */ 381 381 mRestoreSnapshotAction->setIcon(UIIconPool::iconSetFull( 382 QSize (22, 22), QSize (16, 16),383 382 ":/snapshot_restore_22px.png", ":/snapshot_restore_16px.png", 384 383 ":/snapshot_restore_disabled_22px.png", ":/snapshot_restore_disabled_16px.png")); 385 384 mDeleteSnapshotAction->setIcon(UIIconPool::iconSetFull( 386 QSize (22, 22), QSize (16, 16),387 385 ":/snapshot_delete_22px.png", ":/snapshot_delete_16px.png", 388 386 ":/snapshot_delete_disabled_22px.png", ":/snapshot_delete_disabled_16px.png")); 389 387 mShowSnapshotDetailsAction->setIcon(UIIconPool::iconSetFull( 390 QSize (22, 22), QSize (16, 16),391 388 ":/snapshot_show_details_22px.png", ":/snapshot_show_details_16px.png", 392 389 ":/snapshot_show_details_disabled_22px.png", ":/snapshot_details_show_disabled_16px.png")); 393 390 mTakeSnapshotAction->setIcon(UIIconPool::iconSetFull( 394 QSize (22, 22), QSize (16, 16),395 391 ":/snapshot_take_22px.png", ":/snapshot_take_16px.png", 396 392 ":/snapshot_take_disabled_22px.png", ":/snapshot_take_disabled_16px.png")); 397 393 mCloneSnapshotAction->setIcon(UIIconPool::iconSetFull( 398 QSize (22, 22), QSize (16, 16),399 394 ":/vm_clone_22px.png", ":/vm_clone_16px.png", 400 395 ":/vm_clone_disabled_22px.png", ":/vm_clone_disabled_16px.png")); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsPortForwardingDlg.cpp
r48548 r51267 37 37 { 38 38 /* Set dialog icon: */ 39 setWindowIcon(UIIconPool::iconSetFull( QSize(32, 32), QSize(16, 16),":/nw_32px.png", ":/nw_16px.png"));39 setWindowIcon(UIIconPool::iconSetFull(":/nw_32px.png", ":/nw_16px.png")); 40 40 41 41 /* Create layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsPortForwardingDlg.cpp
r48548 r51267 34 34 { 35 35 /* Set dialog icon: */ 36 setWindowIcon(UIIconPool::iconSetFull( QSize(32, 32), QSize(16, 16),":/nw_32px.png", ":/nw_16px.png"));36 setWindowIcon(UIIconPool::iconSetFull(":/nw_32px.png", ":/nw_16px.png")); 37 37 38 38 /* Create layout: */
Note:
See TracChangeset
for help on using the changeset viewer.

