Changeset 91125 in vbox
- Timestamp:
- Sep 6, 2021 2:32:23 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 146778
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r91109 r91125 408 408 /* If proper machine ID passed => return corresponding pixmap/size: */ 409 409 if (index.data(Field_ID).toUuid() != UIExtraDataManager::GlobalID) 410 pixmap = uiCommon().vmGuestOSTypePixmapDefault(index.data(Field_OsTypeID).toString(), &pixmapSize);410 pixmap = generalIconPool().guestOSTypePixmapDefault(index.data(Field_OsTypeID).toString(), &pixmapSize); 411 411 else 412 412 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r91122 r91125 25 25 #include <QMenu> 26 26 #include <QMutex> 27 #include <QPainter>28 27 #include <QProcess> 29 28 #include <QProgressDialog> … … 215 214 , m_pThreadPool(0) 216 215 , m_pThreadPoolCloud(0) 217 , m_pIconPool(0)218 216 , m_pMediumEnumerator(0) 219 217 { … … 257 255 258 256 /* Prepare general icon-pool: */ 259 m_pIconPool = new UIIconPoolGeneral;257 UIIconPoolGeneral::create(); 260 258 261 259 /* Load translation based on the current locale: */ … … 824 822 delete m_pThreadPoolCloud; 825 823 m_pThreadPoolCloud = 0; 824 826 825 /* Cleanup general icon-pool: */ 827 delete m_pIconPool; 828 m_pIconPool = 0; 826 UIIconPoolGeneral::destroy(); 829 827 830 828 /* Ensure CGuestOSType objects are no longer used: */ … … 2737 2735 } 2738 2736 2739 QIcon UICommon::vmUserIcon(const CMachine &comMachine) const2740 {2741 /* Prepare fallback icon: */2742 static QIcon nullIcon;2743 2744 /* Make sure general icon-pool initialized: */2745 AssertReturn(m_pIconPool, nullIcon);2746 2747 /* Redirect to general icon-pool: */2748 return m_pIconPool->userMachineIcon(comMachine);2749 }2750 2751 QPixmap UICommon::vmUserPixmap(const CMachine &comMachine, const QSize &size) const2752 {2753 /* Prepare fallback pixmap: */2754 static QPixmap nullPixmap;2755 2756 /* Make sure general icon-pool initialized: */2757 AssertReturn(m_pIconPool, nullPixmap);2758 2759 /* Redirect to general icon-pool: */2760 return m_pIconPool->userMachinePixmap(comMachine, size);2761 }2762 2763 QPixmap UICommon::vmUserPixmapDefault(const CMachine &comMachine, QSize *pLogicalSize /* = 0 */) const2764 {2765 /* Prepare fallback pixmap: */2766 static QPixmap nullPixmap;2767 2768 /* Make sure general icon-pool initialized: */2769 AssertReturn(m_pIconPool, nullPixmap);2770 2771 /* Redirect to general icon-pool: */2772 return m_pIconPool->userMachinePixmapDefault(comMachine, pLogicalSize);2773 }2774 2775 QIcon UICommon::vmGuestOSTypeIcon(const QString &strOSTypeID) const2776 {2777 /* Prepare fallback icon: */2778 static QIcon nullIcon;2779 2780 /* Make sure general icon-pool initialized: */2781 AssertReturn(m_pIconPool, nullIcon);2782 2783 /* Redirect to general icon-pool: */2784 return m_pIconPool->guestOSTypeIcon(strOSTypeID);2785 }2786 2787 QPixmap UICommon::vmGuestOSTypePixmap(const QString &strOSTypeID, const QSize &size) const2788 {2789 /* Prepare fallback pixmap: */2790 static QPixmap nullPixmap;2791 2792 /* Make sure general icon-pool initialized: */2793 AssertReturn(m_pIconPool, nullPixmap);2794 2795 /* Redirect to general icon-pool: */2796 return m_pIconPool->guestOSTypePixmap(strOSTypeID, size);2797 }2798 2799 QPixmap UICommon::vmGuestOSTypePixmapDefault(const QString &strOSTypeID, QSize *pLogicalSize /* = 0 */) const2800 {2801 /* Prepare fallback pixmap: */2802 static QPixmap nullPixmap;2803 2804 /* Make sure general icon-pool initialized: */2805 AssertReturn(m_pIconPool, nullPixmap);2806 2807 /* Redirect to general icon-pool: */2808 return m_pIconPool->guestOSTypePixmapDefault(strOSTypeID, pLogicalSize);2809 }2810 2811 /* static */2812 QPixmap UICommon::joinPixmaps(const QPixmap &pixmap1, const QPixmap &pixmap2)2813 {2814 if (pixmap1.isNull())2815 return pixmap2;2816 if (pixmap2.isNull())2817 return pixmap1;2818 2819 QPixmap result(pixmap1.width() + pixmap2.width() + 2,2820 qMax(pixmap1.height(), pixmap2.height()));2821 result.fill(Qt::transparent);2822 2823 QPainter painter(&result);2824 painter.drawPixmap(0, 0, pixmap1);2825 painter.drawPixmap(pixmap1.width() + 2, result.height() - pixmap2.height(), pixmap2);2826 painter.end();2827 2828 return result;2829 }2830 2831 2737 /* static */ 2832 2738 void UICommon::setHelpKeyword(QObject *pObject, const QString &strHelpKeyword) … … 3006 2912 void UICommon::retranslateUi() 3007 2913 { 3008 m_pixWarning = UIIconPool::defaultIcon(UIIconPool::UIDefaultIconType_MessageBoxWarning).pixmap(16, 16);3009 Assert(!m_pixWarning.isNull());3010 3011 m_pixError = UIIconPool::defaultIcon(UIIconPool::UIDefaultIconType_MessageBoxCritical).pixmap(16, 16);3012 Assert(!m_pixError.isNull());3013 3014 2914 /* Re-enumerate uimedium since they contain some translations too: */ 3015 2915 if (m_fValid) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r91122 r91125 23 23 24 24 /* Qt includes: */ 25 #include <QFileIconProvider>26 25 #include <QMap> 27 26 #include <QReadWriteLock> 27 #include <QObject> 28 28 29 29 /* GUI includes: */ … … 56 56 class CMachine; 57 57 class CUSBDevice; 58 class UIIconPoolGeneral;59 58 class UIMedium; 60 59 class UIMediumEnumerator; … … 516 515 /** Returns the thread-pool instance for cloud needs. */ 517 516 UIThreadPool *threadPoolCloud() const { return m_pThreadPoolCloud; } 518 /** @} */519 520 /** @name Icon/Pixmap stuff.521 * @{ */522 /** Returns icon defined for a passed @a comMachine. */523 QIcon vmUserIcon(const CMachine &comMachine) const;524 /** Returns pixmap of a passed @a size defined for a passed @a comMachine. */525 QPixmap vmUserPixmap(const CMachine &comMachine, const QSize &size) const;526 /** Returns pixmap defined for a passed @a comMachine.527 * In case if non-null @a pLogicalSize pointer provided, it will be updated properly. */528 QPixmap vmUserPixmapDefault(const CMachine &comMachine, QSize *pLogicalSize = 0) const;529 530 /** Returns pixmap corresponding to passed @a strOSTypeID. */531 QIcon vmGuestOSTypeIcon(const QString &strOSTypeID) const;532 /** Returns pixmap corresponding to passed @a strOSTypeID and @a size. */533 QPixmap vmGuestOSTypePixmap(const QString &strOSTypeID, const QSize &size) const;534 /** Returns pixmap corresponding to passed @a strOSTypeID.535 * In case if non-null @a pLogicalSize pointer provided, it will be updated properly. */536 QPixmap vmGuestOSTypePixmapDefault(const QString &strOSTypeID, QSize *pLogicalSize = 0) const;537 538 /** Returns default icon of certain @a enmType. */539 QIcon icon(QFileIconProvider::IconType enmType) { return m_fileIconProvider.icon(enmType); }540 /** Returns file icon fetched from passed file @a info. */541 QIcon icon(const QFileInfo &info) { return m_fileIconProvider.icon(info); }542 543 /** Returns cached default warning pixmap. */544 QPixmap warningIcon() const { return m_pixWarning; }545 /** Returns cached default error pixmap. */546 QPixmap errorIcon() const { return m_pixError; }547 548 /** Joins two pixmaps horizontally with 2px space between them and returns the result. */549 static QPixmap joinPixmaps(const QPixmap &pixmap1, const QPixmap &pixmap2);550 517 /** @} */ 551 518 … … 830 797 /** @} */ 831 798 832 /** @name Icon/Pixmap stuff.833 * @{ */834 /** Holds the general icon-pool instance. */835 UIIconPoolGeneral *m_pIconPool;836 837 /** Holds the global file icon provider instance. */838 QFileIconProvider m_fileIconProvider;839 840 /** Holds the warning pixmap. */841 QPixmap m_pixWarning;842 /** Holds the error pixmap. */843 QPixmap m_pixError;844 /** @} */845 846 799 /** @name Media related stuff. 847 800 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
r83488 r91125 5 5 6 6 /* 7 * Copyright (C) 2010-202 0Oracle Corporation7 * Copyright (C) 2010-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 19 19 #include <QApplication> 20 20 #include <QFile> 21 #include <QPainter> 21 22 #include <QStyle> 22 23 #include <QWidget> … … 236 237 237 238 /* static */ 239 QPixmap UIIconPool::joinPixmaps(const QPixmap &pixmap1, const QPixmap &pixmap2) 240 { 241 if (pixmap1.isNull()) 242 return pixmap2; 243 if (pixmap2.isNull()) 244 return pixmap1; 245 246 QPixmap result(pixmap1.width() + pixmap2.width() + 2, 247 qMax(pixmap1.height(), pixmap2.height())); 248 result.fill(Qt::transparent); 249 250 QPainter painter(&result); 251 painter.drawPixmap(0, 0, pixmap1); 252 painter.drawPixmap(pixmap1.width() + 2, result.height() - pixmap2.height(), pixmap2); 253 painter.end(); 254 255 return result; 256 } 257 258 /* static */ 238 259 void UIIconPool::addName(QIcon &icon, const QString &strName, 239 260 QIcon::Mode mode /* = QIcon::Normal */, QIcon::State state /* = QIcon::Off */) … … 270 291 *********************************************************************************************************************************/ 271 292 293 /* static */ 294 UIIconPoolGeneral *UIIconPoolGeneral::s_pInstance = 0; 295 296 /* static */ 297 void UIIconPoolGeneral::create() 298 { 299 AssertReturnVoid(!s_pInstance); 300 new UIIconPoolGeneral; 301 } 302 303 /* static */ 304 void UIIconPoolGeneral::destroy() 305 { 306 AssertPtrReturnVoid(s_pInstance); 307 delete s_pInstance; 308 } 309 310 /* static */ 311 UIIconPoolGeneral *UIIconPoolGeneral::instance() 312 { 313 return s_pInstance; 314 } 315 272 316 UIIconPoolGeneral::UIIconPoolGeneral() 273 317 { 318 /* Init instance: */ 319 s_pInstance = this; 320 274 321 /* Prepare OS type icon-name hash: */ 275 322 m_guestOSTypeIconNames.insert("Other", ":/os_other.png"); … … 367 414 m_guestOSTypeIconNames.insert("VBoxBS_64", ":/os_other_64.png"); 368 415 m_guestOSTypeIconNames.insert("Cloud", ":/os_cloud.png"); 416 417 /* Prepare warning/error icons: */ 418 m_pixWarning = defaultIcon(UIDefaultIconType_MessageBoxWarning).pixmap(16, 16); 419 Assert(!m_pixWarning.isNull()); 420 m_pixError = defaultIcon(UIDefaultIconType_MessageBoxCritical).pixmap(16, 16); 421 Assert(!m_pixError.isNull()); 422 } 423 424 UIIconPoolGeneral::~UIIconPoolGeneral() 425 { 426 /* Deinit instance: */ 427 s_pInstance = 0; 369 428 } 370 429 … … 534 593 return pixmap; 535 594 } 536 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.h
r82968 r91125 5 5 6 6 /* 7 * Copyright (C) 2010-202 0Oracle Corporation7 * Copyright (C) 2010-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 23 23 24 24 /* Qt includes: */ 25 #include <QFileIconProvider> 25 26 #include <QIcon> 26 27 #include <QPixmap> … … 32 33 /* Forward declarations: */ 33 34 class CMachine; 34 35 35 36 36 /** Interface which provides GUI with static API … … 88 88 static QIcon defaultIcon(UIDefaultIconType defaultIconType, const QWidget *pWidget = 0); 89 89 90 /** Joins two pixmaps horizontally with 2px space between them and returns the result. */ 91 static QPixmap joinPixmaps(const QPixmap &pixmap1, const QPixmap &pixmap2); 92 90 93 protected: 91 94 … … 106 109 }; 107 110 108 109 111 /** UIIconPool interface extension used as general GUI icon-pool. 110 112 * Provides GUI with guest OS types pixmap cache. */ … … 113 115 public: 114 116 115 /** Constructs general icon-pool. */ 116 UIIconPoolGeneral(); 117 /** Creates singleton instance. */ 118 static void create(); 119 /** Destroys singleton instance. */ 120 static void destroy(); 121 /** Returns singleton instance. */ 122 static UIIconPoolGeneral *instance(); 117 123 118 124 /** Returns icon defined for a passed @a comMachine. */ … … 132 138 QPixmap guestOSTypePixmapDefault(const QString &strOSTypeID, QSize *pLogicalSize = 0) const; 133 139 140 /** Returns default system icon of certain @a enmType. */ 141 QIcon defaultSystemIcon(QFileIconProvider::IconType enmType) { return m_fileIconProvider.icon(enmType); } 142 /** Returns file icon fetched from passed file @a info. */ 143 QIcon defaultFileIcon(const QFileInfo &info) { return m_fileIconProvider.icon(info); } 144 145 /** Returns cached default warning pixmap. */ 146 QPixmap warningIcon() const { return m_pixWarning; } 147 /** Returns cached default error pixmap. */ 148 QPixmap errorIcon() const { return m_pixError; } 149 134 150 private: 135 151 152 /** Constructs general icon-pool. */ 153 UIIconPoolGeneral(); 154 /** Destructs general icon-pool. */ 155 virtual ~UIIconPoolGeneral() /* override final */; 156 157 /** Holds the singleton instance. */ 158 static UIIconPoolGeneral *s_pInstance; 159 160 /** Holds the global file icon provider instance. */ 161 QFileIconProvider m_fileIconProvider; 162 136 163 /** Guest OS type icon-names cache. */ 137 QHash<QString, QString> m_guestOSTypeIconNames;164 QHash<QString, QString> m_guestOSTypeIconNames; 138 165 /** Guest OS type icons cache. */ 139 mutable QHash<QString, QIcon> m_guestOSTypeIcons; 166 mutable QHash<QString, QIcon> m_guestOSTypeIcons; 167 168 /** Holds the warning pixmap. */ 169 QPixmap m_pixWarning; 170 /** Holds the error pixmap. */ 171 QPixmap m_pixError; 172 173 /** Allows for shortcut access. */ 174 friend UIIconPoolGeneral &generalIconPool(); 140 175 }; 141 176 177 /** Singleton UIIconPoolGeneral 'official' name. */ 178 inline UIIconPoolGeneral &generalIconPool() { return *UIIconPoolGeneral::instance(); } 142 179 143 180 #endif /* !FEQT_INCLUDED_SRC_globals_UIIconPool_h */ 144 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r86922 r91125 269 269 if ( itemType() == UIVirtualMachineItemType_CloudFake 270 270 && fakeCloudItemState() == UIFakeCloudVirtualMachineItemState_Loading) 271 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault("Cloud", &m_logicalPixmapSize);271 m_pixmap = generalIconPool().guestOSTypePixmapDefault("Cloud", &m_logicalPixmapSize); 272 272 else 273 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);273 m_pixmap = generalIconPool().guestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize); 274 274 } 275 275 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemLocal.cpp
r91079 r91125 25 25 #include "UIErrorString.h" 26 26 #include "UIExtraDataManager.h" 27 #include "UIIconPool.h" 27 28 #include "UIVirtualMachineItemLocal.h" 28 29 #ifdef VBOX_WS_MAC … … 155 156 { 156 157 /* First, we are trying to acquire personal machine guest OS type icon: */ 157 m_pixmap = uiCommon().vmUserPixmapDefault(m_comMachine, &m_logicalPixmapSize);158 m_pixmap = generalIconPool().userMachinePixmapDefault(m_comMachine, &m_logicalPixmapSize); 158 159 /* If there is nothing, we are using icon corresponding to cached guest OS type: */ 159 160 if (m_pixmap.isNull()) 160 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize);161 m_pixmap = generalIconPool().guestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize); 161 162 } 162 163 /* Otherwise: */ … … 164 165 { 165 166 /* We are using "Other" guest OS type icon: */ 166 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault("Other", &m_logicalPixmapSize);167 m_pixmap = generalIconPool().guestOSTypePixmapDefault("Other", &m_logicalPixmapSize); 167 168 } 168 169 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r90967 r91125 469 469 470 470 if (state(fNoDiffs) == KMediumState_Inaccessible) 471 pixmap = result(fNoDiffs).isOk() ? uiCommon().warningIcon() : uiCommon().errorIcon();471 pixmap = result(fNoDiffs).isOk() ? generalIconPool().warningIcon() : generalIconPool().errorIcon(); 472 472 473 473 if (fCheckRO && m_fReadOnly) 474 474 { 475 475 QIcon icon = UIIconPool::iconSet(":/hd_create_16px.png"); 476 pixmap = UI Common::joinPixmaps(pixmap, icon.pixmap(icon.availableSizes().value(0, QSize(16, 16))));476 pixmap = UIIconPool::joinPixmaps(pixmap, icon.pixmap(icon.availableSizes().value(0, QSize(16, 16)))); 477 477 } 478 478 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r90748 r91125 31 31 #include "QIMessageBox.h" 32 32 #include "QITabWidget.h" 33 #include "UIActionPoolManager.h" 33 34 #include "UICommon.h" 34 #include "UIActionPoolManager.h"35 35 #include "UIExtraDataManager.h" 36 #include "UIIconPool.h" 36 37 #include "UIMediumDetailsWidget.h" 37 38 #include "UIMediumItem.h" … … 1143 1144 1144 1145 if (m_pTabWidget) 1145 m_pTabWidget->setTabIcon(tabIndex(mediumType), uiCommon().warningIcon());1146 m_pTabWidget->setTabIcon(tabIndex(mediumType), generalIconPool().warningIcon()); 1146 1147 1147 1148 break; … … 1180 1181 { 1181 1182 if (*pfInaccessible) 1182 m_pTabWidget->setTabIcon(tabIndex(mediumType), uiCommon().warningIcon());1183 m_pTabWidget->setTabIcon(tabIndex(mediumType), generalIconPool().warningIcon()); 1183 1184 else 1184 1185 m_pTabWidget->setTabIcon(tabIndex(mediumType), *pIcon); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r91122 r91125 1259 1259 1260 1260 /* Now the dock icon preview: */ 1261 QPixmap pixmap = uiCommon().vmUserPixmap(machine(), QSize(42, 42));1261 QPixmap pixmap = generalIconPool().userMachinePixmap(machine(), QSize(42, 42)); 1262 1262 if (pixmap.isNull()) 1263 pixmap = uiCommon().vmGuestOSTypePixmap(guest().GetOSTypeId(), QSize(42, 42));1263 pixmap = generalIconPool().guestOSTypePixmap(guest().GetOSTypeId(), QSize(42, 42)); 1264 1264 m_pDockIconPreview = new UIDockIconPreview(uisession(), pixmap); 1265 1265 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r91104 r91125 36 36 #include "UIDesktopWidgetWatchdog.h" 37 37 #include "UIExtraDataManager.h" 38 #include "UIIconPool.h" 38 39 #include "UISession.h" 39 40 #include "UIMachine.h" … … 1128 1129 { 1129 1130 /* Acquire user machine-window icon: */ 1130 QIcon icon = uiCommon().vmUserIcon(machine());1131 QIcon icon = generalIconPool().userMachineIcon(machine()); 1131 1132 /* Use the OS type icon if user one was not set: */ 1132 1133 if (icon.isNull()) 1133 icon = uiCommon().vmGuestOSTypeIcon(machine().GetOSTypeId());1134 icon = generalIconPool().guestOSTypeIcon(machine().GetOSTypeId()); 1134 1135 /* Use the default icon if nothing else works: */ 1135 1136 if (icon.isNull()) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r90094 r91125 25 25 #include "QILineEdit.h" 26 26 #include "UICommon.h" 27 #include "UIIconPool.h" 27 28 #include "UIFilePathSelector.h" 28 29 #include "UINameAndSystemEditor.h" … … 397 398 398 399 /* Update selected type pixmap: */ 399 m_pIconType->setPixmap( uiCommon().vmGuestOSTypePixmapDefault(m_strTypeId));400 m_pIconType->setPixmap(generalIconPool().guestOSTypePixmapDefault(m_strTypeId)); 400 401 401 402 /* Save the most recently used item: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r90967 r91125 19 19 #include <QCheckBox> 20 20 #include <QComboBox> 21 #include <QFileInfo> 21 22 #include <QGridLayout> 22 23 #include <QLabel> -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotPane.cpp
r90967 r91125 1545 1545 1546 1546 /* Assign corresponding icon: */ 1547 QIcon icon = uiCommon().vmUserIcon(m_comMachine);1547 QIcon icon = generalIconPool().userMachineIcon(m_comMachine); 1548 1548 if (icon.isNull()) 1549 icon = uiCommon().vmGuestOSTypeIcon(m_comMachine.GetOSTypeId());1549 icon = generalIconPool().guestOSTypeIcon(m_comMachine.GetOSTypeId()); 1550 1550 pDlg->setIcon(icon); 1551 1551 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r88447 r91125 664 664 case KVirtualSystemDescriptionType_USBController: value = UIIconPool::iconSet(":/usb_16px.png"); break; 665 665 case KVirtualSystemDescriptionType_SoundCard: value = UIIconPool::iconSet(":/sound_16px.png"); break; 666 case KVirtualSystemDescriptionType_BaseFolder: value = uiCommon().icon(QFileIconProvider::Folder); break;666 case KVirtualSystemDescriptionType_BaseFolder: value = generalIconPool().defaultSystemIcon(QFileIconProvider::Folder); break; 667 667 case KVirtualSystemDescriptionType_PrimaryGroup: value = UIIconPool::iconSet(":/vm_group_name_16px.png"); break; 668 668 case KVirtualSystemDescriptionType_CloudProfileName: … … 680 680 } 681 681 else if (iColumn == ApplianceViewSection_ConfigValue && m_enmVSDType == KVirtualSystemDescriptionType_OS) 682 value = uiCommon().vmGuestOSTypeIcon(m_strConfigValue);682 value = generalIconPool().guestOSTypeIcon(m_strConfigValue); 683 683 break; 684 684 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilePathSelector.cpp
r88551 r91125 439 439 { 440 440 if (m_enmMode == Mode_Folder) 441 return uiCommon().icon(QFileIconProvider::Folder);441 return generalIconPool().defaultSystemIcon(QFileIconProvider::Folder); 442 442 else 443 return uiCommon().icon(QFileIconProvider::File);443 return generalIconPool().defaultSystemIcon(QFileIconProvider::File); 444 444 } 445 445 … … 579 579 /* Attach corresponding icon: */ 580 580 setItemIcon(PathId, QFileInfo(m_strPath).exists() ? 581 uiCommon().icon(QFileInfo(m_strPath)) :581 generalIconPool().defaultFileIcon(QFileInfo(m_strPath)) : 582 582 defaultIcon()); 583 583 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.cpp
r82968 r91125 24 24 #include "UICommon.h" 25 25 #include "UIGuestOSTypeSelectionButton.h" 26 #include "UIIconPool.h" 26 27 27 28 … … 65 66 #ifndef VBOX_WS_MAC 66 67 /* Looks ugly on the Mac: */ 67 setIcon( uiCommon().vmGuestOSTypePixmapDefault(enmType.GetId()));68 setIcon(generalIconPool().guestOSTypePixmapDefault(enmType.GetId())); 68 69 #endif 69 70 … … 87 88 foreach (const CGuestOSType &comType, uiCommon().vmGuestOSTypeList(strFamilyId)) 88 89 { 89 QAction *pAction = pSubMenu->addAction( uiCommon().vmGuestOSTypePixmapDefault(comType.GetId()),90 QAction *pAction = pSubMenu->addAction(generalIconPool().guestOSTypePixmapDefault(comType.GetId()), 90 91 comType.GetDescription()); 91 92 connect(pAction, &QAction::triggered, -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
r87719 r91125 23 23 #include "QIRichTextLabel.h" 24 24 #include "UICommon.h" 25 #include "UIIconPool.h" 25 26 #include "UIMessageCenter.h" 26 27 #include "UIWizardExportApp.h" … … 54 55 if (machine.GetAccessible()) 55 56 { 56 pixIcon = uiCommon().vmUserPixmapDefault(machine);57 pixIcon = generalIconPool().userMachinePixmapDefault(machine); 57 58 if (pixIcon.isNull()) 58 pixIcon = uiCommon().vmGuestOSTypePixmapDefault(machine.GetOSTypeId());59 pixIcon = generalIconPool().guestOSTypePixmapDefault(machine.GetOSTypeId()); 59 60 strName = machine.GetName(); 60 61 uUuid = machine.GetId();
Note:
See TracChangeset
for help on using the changeset viewer.