- Timestamp:
- Sep 27, 2023 6:48:22 AM (16 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 8 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r101183 r101278 1405 1405 src/globals/UIErrorString.cpp \ 1406 1406 src/globals/UIExtension.cpp \ 1407 src/globals/UIGuestOSType II.cpp \1407 src/globals/UIGuestOSType.cpp \ 1408 1408 src/globals/UIIconPool.cpp \ 1409 1409 src/globals/UIImageTools.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r101265 r101278 63 63 #include "UIConverter.h" 64 64 #include "UIDesktopWidgetWatchdog.h" 65 #include "UIGuestOSType II.h"65 #include "UIGuestOSType.h" 66 66 #include "UIExtraDataDefs.h" 67 67 #include "UIExtraDataManager.h" -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp
r101277 r101278 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIGuestOSType IIclass implementation.3 * VBox Qt GUI - UIGuestOSType class implementation. 4 4 */ 5 5 … … 27 27 28 28 /* GUI includes: */ 29 #include "UIGuestOSType II.h"29 #include "UIGuestOSType.h" 30 30 31 31 … … 52 52 void UIGuestOSTypeManager::addGuestOSType(const CGuestOSType &comType) 53 53 { 54 m_guestOSTypes << UIGuestOSType II(comType);54 m_guestOSTypes << UIGuestOSType(comType); 55 55 QPair<QString, QString> family = QPair<QString, QString>(m_guestOSTypes.last().getFamilyId(), m_guestOSTypes.last().getFamilyDescription()); 56 56 if (!m_guestOSFamilies.contains(family)) … … 66 66 { 67 67 QStringList variantList; 68 foreach (const UIGuestOSType II&type, m_guestOSTypes)68 foreach (const UIGuestOSType &type, m_guestOSTypes) 69 69 { 70 70 if (type.getFamilyId() != strFamilyId) … … 80 80 { 81 81 UIGuestOSTypeInfo typeInfoList; 82 foreach (const UIGuestOSType II&type, m_guestOSTypes)82 foreach (const UIGuestOSType &type, m_guestOSTypes) 83 83 { 84 84 if (type.getFamilyId() != strFamilyId) … … 98 98 return typeInfoList; 99 99 100 foreach (const UIGuestOSType II&type, m_guestOSTypes)100 foreach (const UIGuestOSType &type, m_guestOSTypes) 101 101 { 102 102 if (type.getVariant() != strVariant) … … 109 109 } 110 110 111 UIGuestOSType IIUIGuestOSTypeManager::findGuestTypeById(const QString &strTypeId) const112 { 113 if (strTypeId.isEmpty()) 114 return UIGuestOSType II();115 foreach (const UIGuestOSType II&type, m_guestOSTypes)111 UIGuestOSType UIGuestOSTypeManager::findGuestTypeById(const QString &strTypeId) const 112 { 113 if (strTypeId.isEmpty()) 114 return UIGuestOSType(); 115 foreach (const UIGuestOSType &type, m_guestOSTypes) 116 116 { 117 117 if (type.getId() == strTypeId) 118 118 return type; 119 119 } 120 return UIGuestOSType II();120 return UIGuestOSType(); 121 121 } 122 122 … … 125 125 if (strTypeId.isEmpty()) 126 126 return KGraphicsControllerType_Null; 127 foreach (const UIGuestOSType II&type, m_guestOSTypes)127 foreach (const UIGuestOSType &type, m_guestOSTypes) 128 128 { 129 129 if (type.getId() == strTypeId) … … 137 137 if (strTypeId.isEmpty()) 138 138 return 0; 139 foreach (const UIGuestOSType II&type, m_guestOSTypes)139 foreach (const UIGuestOSType &type, m_guestOSTypes) 140 140 { 141 141 if (type.getId() == strTypeId) … … 149 149 if (strTypeId.isEmpty()) 150 150 return 0; 151 foreach (const UIGuestOSType II&type, m_guestOSTypes)151 foreach (const UIGuestOSType &type, m_guestOSTypes) 152 152 { 153 153 if (type.getId() == strTypeId) … … 161 161 if (strTypeId.isEmpty()) 162 162 return KFirmwareType_Max; 163 foreach (const UIGuestOSType II&type, m_guestOSTypes)163 foreach (const UIGuestOSType &type, m_guestOSTypes) 164 164 { 165 165 if (type.getId() == strTypeId) … … 173 173 if (strTypeId.isEmpty()) 174 174 return QString(); 175 foreach (const UIGuestOSType II&type, m_guestOSTypes)175 foreach (const UIGuestOSType &type, m_guestOSTypes) 176 176 { 177 177 if (type.getId() == strTypeId) … … 185 185 if (strTypeId.isEmpty()) 186 186 return 0; 187 foreach (const UIGuestOSType II&type, m_guestOSTypes)187 foreach (const UIGuestOSType &type, m_guestOSTypes) 188 188 { 189 189 if (type.getId() == strTypeId) … … 197 197 if (strTypeId.isEmpty()) 198 198 return KStorageBus_Null; 199 foreach (const UIGuestOSType II&type, m_guestOSTypes)199 foreach (const UIGuestOSType &type, m_guestOSTypes) 200 200 { 201 201 if (type.getId() == strTypeId) … … 209 209 if (strTypeId.isEmpty()) 210 210 return KStorageBus_Null; 211 foreach (const UIGuestOSType II&type, m_guestOSTypes)211 foreach (const UIGuestOSType &type, m_guestOSTypes) 212 212 { 213 213 if (type.getId() == strTypeId) … … 222 222 if (strTypeId.isEmpty()) 223 223 return false; 224 foreach (const UIGuestOSType II&type, m_guestOSTypes)224 foreach (const UIGuestOSType &type, m_guestOSTypes) 225 225 { 226 226 if (type.getId() == strTypeId) … … 230 230 } 231 231 232 UIGuestOSType II::UIGuestOSTypeII()233 { 234 } 235 236 UIGuestOSType II::UIGuestOSTypeII(const CGuestOSType &comGuestOSType)232 UIGuestOSType::UIGuestOSType() 233 { 234 } 235 236 UIGuestOSType::UIGuestOSType(const CGuestOSType &comGuestOSType) 237 237 : m_comGuestOSType(comGuestOSType) 238 238 { 239 239 } 240 240 241 bool UIGuestOSType II::isOk() const241 bool UIGuestOSType::isOk() const 242 242 { 243 243 return (!m_comGuestOSType.isNull() && m_comGuestOSType.isOk()); 244 244 } 245 245 246 const QString &UIGuestOSType II::getFamilyId() const246 const QString &UIGuestOSType::getFamilyId() const 247 247 { 248 248 if (m_strFamilyId.isEmpty() && m_comGuestOSType.isOk()) … … 251 251 } 252 252 253 const QString &UIGuestOSType II::getFamilyDescription() const253 const QString &UIGuestOSType::getFamilyDescription() const 254 254 { 255 255 if (m_strFamilyDescription.isEmpty() && m_comGuestOSType.isOk()) … … 258 258 } 259 259 260 const QString &UIGuestOSType II::getId() const260 const QString &UIGuestOSType::getId() const 261 261 { 262 262 if (m_strId.isEmpty() && m_comGuestOSType.isOk()) … … 265 265 } 266 266 267 const QString &UIGuestOSType II::getVariant() const267 const QString &UIGuestOSType::getVariant() const 268 268 { 269 269 if (m_strVariant.isEmpty() && m_comGuestOSType.isOk()) … … 272 272 } 273 273 274 const QString &UIGuestOSType II::getDescription() const274 const QString &UIGuestOSType::getDescription() const 275 275 { 276 276 if (m_strDescription.isEmpty() && m_comGuestOSType.isOk()) … … 279 279 } 280 280 281 KStorageBus UIGuestOSType II::getRecommendedHDStorageBus() const281 KStorageBus UIGuestOSType::getRecommendedHDStorageBus() const 282 282 { 283 283 if (m_comGuestOSType.isOk()) … … 286 286 } 287 287 288 ULONG UIGuestOSType II::getRecommendedRAM() const288 ULONG UIGuestOSType::getRecommendedRAM() const 289 289 { 290 290 if (m_comGuestOSType.isOk()) … … 293 293 } 294 294 295 KStorageBus UIGuestOSType II::getRecommendedDVDStorageBus() const295 KStorageBus UIGuestOSType::getRecommendedDVDStorageBus() const 296 296 { 297 297 if (m_comGuestOSType.isOk()) … … 300 300 } 301 301 302 ULONG UIGuestOSType II::getRecommendedCPUCount() const302 ULONG UIGuestOSType::getRecommendedCPUCount() const 303 303 { 304 304 if (m_comGuestOSType.isOk()) … … 307 307 } 308 308 309 KFirmwareType UIGuestOSType II::getRecommendedFirmware() const309 KFirmwareType UIGuestOSType::getRecommendedFirmware() const 310 310 { 311 311 if (m_comGuestOSType.isOk()) … … 314 314 } 315 315 316 bool UIGuestOSType II::getRecommendedFloppy() const316 bool UIGuestOSType::getRecommendedFloppy() const 317 317 { 318 318 if (m_comGuestOSType.isOk()) … … 321 321 } 322 322 323 LONG64 UIGuestOSType II::getRecommendedHDD() const323 LONG64 UIGuestOSType::getRecommendedHDD() const 324 324 { 325 325 if (m_comGuestOSType.isOk()) … … 328 328 } 329 329 330 KGraphicsControllerType UIGuestOSType II::getRecommendedGraphicsController() const330 KGraphicsControllerType UIGuestOSType::getRecommendedGraphicsController() const 331 331 { 332 332 if (m_comGuestOSType.isOk()) … … 335 335 } 336 336 337 bool UIGuestOSType II::operator==(const UIGuestOSTypeII&other)337 bool UIGuestOSType::operator==(const UIGuestOSType &other) 338 338 { 339 339 return m_comGuestOSType == other.m_comGuestOSType; 340 340 } 341 341 342 bool UIGuestOSType II::operator!=(const UIGuestOSTypeII&other)342 bool UIGuestOSType::operator!=(const UIGuestOSType &other) 343 343 { 344 344 return m_comGuestOSType != other.m_comGuestOSType; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.h
r101277 r101278 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UIGuestOSType IIclass declaration.3 * VBox Qt GUI - UIGuestOSType class declaration. 4 4 */ 5 5 … … 26 26 */ 27 27 28 #ifndef FEQT_INCLUDED_SRC_globals_UIGuestOSType II_h29 #define FEQT_INCLUDED_SRC_globals_UIGuestOSType II_h28 #ifndef FEQT_INCLUDED_SRC_globals_UIGuestOSType_h 29 #define FEQT_INCLUDED_SRC_globals_UIGuestOSType_h 30 30 #ifndef RT_WITHOUT_PRAGMA_ONCE 31 31 # pragma once … … 41 41 #include "CGuestOSType.h" 42 42 43 class UIGuestOSType II;43 class UIGuestOSType; 44 44 45 45 … … 61 61 UIGuestOSTypeInfo getTypeListForVariant(const QString &strVariant) const; 62 62 63 UIGuestOSType IIfindGuestTypeById(const QString &strTypeId) const;63 UIGuestOSType findGuestTypeById(const QString &strTypeId) const; 64 64 65 65 KGraphicsControllerType getRecommendedGraphicsController(const QString &strTypeId) const; … … 77 77 void addGuestOSType(const CGuestOSType &comType); 78 78 79 QVector<UIGuestOSType II> m_guestOSTypes;79 QVector<UIGuestOSType> m_guestOSTypes; 80 80 /* First item of the pair is family id and the 2nd is family description. */ 81 81 UIGuestOSTypeInfo m_guestOSFamilies; … … 84 84 85 85 /** A wrapper around CGuestOSType. */ 86 class SHARED_LIBRARY_STUFF UIGuestOSType II86 class SHARED_LIBRARY_STUFF UIGuestOSType 87 87 { 88 88 … … 90 90 91 91 92 UIGuestOSType II(const CGuestOSType &comGuestOSType);93 UIGuestOSType II();92 UIGuestOSType(const CGuestOSType &comGuestOSType); 93 UIGuestOSType(); 94 94 95 95 const QString &getFamilyId() const; … … 112 112 113 113 bool isOk() const; 114 bool operator==(const UIGuestOSType II&other);115 bool operator!=(const UIGuestOSType II&other);114 bool operator==(const UIGuestOSType &other); 115 bool operator!=(const UIGuestOSType &other); 116 116 117 117 private: … … 130 130 }; 131 131 132 #endif /* !FEQT_INCLUDED_SRC_globals_UIGuestOSType II_h */132 #endif /* !FEQT_INCLUDED_SRC_globals_UIGuestOSType_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r101272 r101278 256 256 const UIGuestOSTypeManager * const pGuestOSTypeManager = uiCommon().guestOSTypeManager(); 257 257 AssertReturn(pGuestOSTypeManager, false); 258 const UIGuestOSType II&type = pGuestOSTypeManager->findGuestTypeById(strTypeId);258 const UIGuestOSType &type = pGuestOSTypeManager->findGuestTypeById(strTypeId); 259 259 if (!type.isOk()) 260 260 return false; … … 312 312 return m_strFamilyId; 313 313 } 314 315 // void UINameAndSystemEditor::setType(const CGuestOSType &enmType)316 // {317 // // WORKAROUND:318 // // We're getting here with a NULL enmType when creating new VMs.319 // // Very annoying, so just workarounded for now.320 // /** @todo find out the reason and way to fix that.. */321 // if (enmType.isNull())322 // return;323 324 // /* Pass to function above: */325 // setTypeId(enmType.GetId(), enmType.GetFamilyId());326 // }327 328 // UIGuestOSTypeII UINameAndSystemEditor::type() const329 // {330 // const UIGuestOSTypeManager * const pGuestOSTypeManager = uiCommon().guestOSTypeManager();331 // AssertReturn(pGuestOSTypeManager, UIGuestOSTypeII());332 // return pGuestOSTypeManager->findGuestTypeById(m_strTypeId);333 // }334 314 335 315 void UINameAndSystemEditor::markNameEditor(bool fError) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h
r101277 r101278 34 34 /* GUI includes: */ 35 35 #include "UIEditor.h" 36 #include "UIGuestOSType II.h"36 #include "UIGuestOSType.h" 37 37 38 38 /* COM includes: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r101272 r101278 32 32 /* GUI includes: */ 33 33 #include "UICommon.h" 34 #include "UIGuestOSType II.h"34 #include "UIGuestOSType.h" 35 35 #include "UIMedium.h" 36 36 #include "UINotificationCenter.h" -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp
r101272 r101278 37 37 #include "QIToolButton.h" 38 38 #include "UIIconPool.h" 39 #include "UIGuestOSType II.h"39 #include "UIGuestOSType.h" 40 40 #include "UIMediaComboBox.h" 41 41 #include "UIMediumSelector.h" -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.cpp
r101273 r101278 33 33 #include "UIBaseMemoryEditor.h" 34 34 #include "UICommon.h" 35 #include "UIGuestOSType II.h"35 #include "UIGuestOSType.h" 36 36 #include "UIVirtualCPUEditor.h" 37 37 #include "UIWizardNewVM.h" -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMSummaryPage.cpp
r101272 r101278 36 36 #include "QITreeView.h" 37 37 #include "UIIconPool.h" 38 #include "UIGuestOSType II.h"38 #include "UIGuestOSType.h" 39 39 #include "UIMessageCenter.h" 40 40 #include "UINotificationCenter.h"
Note:
See TracChangeset
for help on using the changeset viewer.