Changeset 101263 in vbox
- Timestamp:
- Sep 26, 2023 10:42:38 AM (14 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSTypeII.cpp
r101253 r101263 218 218 return 0; 219 219 } 220 221 KGraphicsControllerType UIGuestOSTypeII::getRecommendedGraphicsController() const 222 { 223 if (m_comGuestOSType.isOk()) 224 return m_comGuestOSType.GetRecommendedGraphicsController(); 225 return KGraphicsControllerType_Null; 226 } 227 228 bool UIGuestOSTypeII::operator==(const UIGuestOSTypeII &other) 229 { 230 return m_comGuestOSType == other.m_comGuestOSType; 231 } 232 233 bool UIGuestOSTypeII::operator!=(const UIGuestOSTypeII &other) 234 { 235 return m_comGuestOSType != other.m_comGuestOSType; 236 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSTypeII.h
r101253 r101263 98 98 bool getRecommendedFloppy() const; 99 99 LONG64 getRecommendedHDD() const; 100 KGraphicsControllerType getRecommendedGraphicsController() const; 100 101 /** @} */ 101 102 102 103 bool isOk() const; 104 bool operator==(const UIGuestOSTypeII &other); 105 bool operator!=(const UIGuestOSTypeII &other); 103 106 104 107 private: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r101253 r101263 35 35 #include "QILineEdit.h" 36 36 #include "UICommon.h" 37 #include "UIGuestOSTypeII.h"38 37 #include "UIIconPool.h" 39 38 #include "UIFilePathSelector.h" … … 304 303 QString UINameAndSystemEditor::typeId() const 305 304 { 306 if (!m_pComboType)307 return QString();308 305 return m_strTypeId; 309 306 } … … 329 326 // } 330 327 331 CGuestOSType UINameAndSystemEditor::type() const 332 { 333 return uiCommon().vmGuestOSType(typeId(), familyId()); 328 UIGuestOSTypeII UINameAndSystemEditor::type() const 329 { 330 const UIGuestOSTypeManager * const pGuestOSTypeManager = uiCommon().guestOSTypeManager(); 331 AssertReturn(pGuestOSTypeManager, UIGuestOSTypeII()); 332 return pGuestOSTypeManager->findGuestTypeById(m_strTypeId); 334 333 } 335 334 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.h
r101242 r101263 34 34 /* GUI includes: */ 35 35 #include "UIEditor.h" 36 #include "UIGuestOSTypeII.h" 36 37 37 38 /* COM includes: */ … … 130 131 131 132 /** Returns the VM OS type. */ 132 CGuestOSTypetype() const;133 UIGuestOSTypeII type() const; 133 134 134 135 /** Passes the @p fError to QILineEdit::mark(bool) effectively marking it for error. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.cpp
r101011 r101263 45 45 : UIEditor(pParent) 46 46 , m_iValue(0) 47 , m_ comGuestOSType(CGuestOSType())47 , m_guestOSType(UIGuestOSTypeII()) 48 48 , m_cGuestScreenCount(1) 49 49 , m_enmGraphicsControllerType(KGraphicsControllerType_Null) … … 85 85 } 86 86 87 void UIVideoMemoryEditor::setGuestOSType(const CGuestOSType &comGuestOSType)88 { 89 /* Update cached value and 90 * requirements if value has changed: */ 91 if (m_ comGuestOSType != comGuestOSType)87 void UIVideoMemoryEditor::setGuestOSType(const UIGuestOSTypeII &guestOSType) 88 { 89 /* Update cached value and 90 * requirements if value has changed: */ 91 if (m_guestOSType != guestOSType) 92 92 { 93 93 /* Remember new guest OS type: */ 94 m_ comGuestOSType = comGuestOSType;94 m_guestOSType = guestOSType; 95 95 96 96 /* Update requirements: */ … … 316 316 { 317 317 /* Make sure guest OS type is set: */ 318 if ( m_comGuestOSType.isNull())318 if (!m_guestOSType.isOk()) 319 319 return; 320 320 … … 323 323 324 324 /* Get monitors count and recommended VRAM: */ 325 int iNeedMBytes = UICommon::requiredVideoMemory(m_ comGuestOSType.GetId(), m_cGuestScreenCount) / _1M;325 int iNeedMBytes = UICommon::requiredVideoMemory(m_guestOSType.getId(), m_cGuestScreenCount) / _1M; 326 326 /* Adjust visible maximum VRAM to be no less than 128MB (if possible): */ 327 327 if (m_iMaxVRAMVisible < 128 && m_iMaxVRAM >= 128) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.h
r101011 r101263 34 34 /* GUI includes: */ 35 35 #include "UIEditor.h" 36 #include "UIGuestOSTypeII.h" 36 37 37 38 /* COM includes: */ 38 39 #include "COMEnums.h" 39 #include "CGuestOSType.h"40 40 41 41 /* Forward declarations: */ … … 66 66 67 67 /** Defines @a comGuestOSType. */ 68 void setGuestOSType(const CGuestOSType&comGuestOSType);68 void setGuestOSType(const UIGuestOSTypeII &comGuestOSType); 69 69 70 70 /** Defines @a cGuestScreenCount. */ … … 118 118 * @{ */ 119 119 /** Holds the guest OS type ID. */ 120 CGuestOSType m_comGuestOSType;120 UIGuestOSTypeII m_guestOSType; 121 121 /** Holds the guest screen count. */ 122 122 int m_cGuestScreenCount; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r101231 r101263 294 294 295 295 UIMachineSettingsDisplay::UIMachineSettingsDisplay() 296 : m_ comGuestOSType(CGuestOSType())296 : m_guestOSType(CGuestOSType()) 297 297 #ifdef VBOX_WITH_3D_ACCELERATION 298 298 , m_fWddmModeSupported(false) … … 322 322 } 323 323 324 void UIMachineSettingsDisplay::setGuestOSType( CGuestOSType comGuestOSType)324 void UIMachineSettingsDisplay::setGuestOSType(UIGuestOSTypeII guestOSType) 325 325 { 326 326 /* Check if guest OS type changed: */ 327 if (m_ comGuestOSType == comGuestOSType)327 if (m_guestOSType == guestOSType) 328 328 return; 329 329 330 330 /* Remember new guest OS type: */ 331 m_ comGuestOSType = comGuestOSType;332 m_pEditorVideoMemorySize->setGuestOSType(m_ comGuestOSType);331 m_guestOSType = guestOSType; 332 m_pEditorVideoMemorySize->setGuestOSType(m_guestOSType); 333 333 334 334 #ifdef VBOX_WITH_3D_ACCELERATION 335 335 /* Check if WDDM mode supported by the guest OS type: */ 336 const QString strGuestOSTypeId = m_ comGuestOSType.isNotNull() ? m_comGuestOSType.GetId() : QString();336 const QString strGuestOSTypeId = m_guestOSType.isOk() ? m_guestOSType.getId() : QString(); 337 337 m_fWddmModeSupported = UICommon::isWddmCompatibleOsType(strGuestOSTypeId); 338 338 m_pEditorVideoMemorySize->set3DAccelerationSupported(m_fWddmModeSupported); 339 339 #endif /* VBOX_WITH_3D_ACCELERATION */ 340 340 /* Acquire recommended graphics controller type: */ 341 m_enmGraphicsControllerTypeRecommended = m_ comGuestOSType.GetRecommendedGraphicsController();341 m_enmGraphicsControllerTypeRecommended = m_guestOSType.getRecommendedGraphicsController(); 342 342 343 343 /* Revalidate: */ … … 636 636 637 637 /* Video RAM amount test: */ 638 if (shouldWeWarnAboutLowVRAM() && !m_comGuestOSType.isNull())639 { 640 quint64 uNeedBytes = UICommon::requiredVideoMemory(m_ comGuestOSType.GetId(), m_pEditorMonitorCount->value());638 if (shouldWeWarnAboutLowVRAM() && m_guestOSType.isOk()) 639 { 640 quint64 uNeedBytes = UICommon::requiredVideoMemory(m_guestOSType.getId(), m_pEditorMonitorCount->value()); 641 641 642 642 /* Basic video RAM amount test: */ … … 664 664 665 665 /* Graphics controller type test: */ 666 if ( !m_comGuestOSType.isNull())666 if (m_guestOSType.isOk()) 667 667 { 668 668 if (graphicsControllerTypeCurrent() != graphicsControllerTypeRecommended()) … … 1027 1027 QStringList excludingOSList = QStringList() 1028 1028 << "Other" << "DOS" << "Netware" << "L4" << "QNX" << "JRockitVE"; 1029 if ( m_comGuestOSType.isNull() || excludingOSList.contains(m_comGuestOSType.GetId()))1029 if (!m_guestOSType.isOk() || excludingOSList.contains(m_guestOSType.getId())) 1030 1030 fResult = false; 1031 1031 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r101231 r101263 33 33 34 34 /* GUI includes: */ 35 #include "UIGuestOSTypeII.h" 35 36 #include "UISettingsPage.h" 36 37 /* COM includes: */38 #include "CGuestOSType.h"39 37 40 38 /* Forward declarations: */ … … 65 63 66 64 /** Defines @a comGuestOSType. */ 67 void setGuestOSType( CGuestOSTypecomGuestOSType);65 void setGuestOSType(UIGuestOSTypeII comGuestOSType); 68 66 69 67 #ifdef VBOX_WITH_3D_ACCELERATION … … 150 148 bool saveRecordingData(); 151 149 152 /** Holds the guest OS type ID. */153 CGuestOSType m_comGuestOSType;150 /** Holds the guest OS type. */ 151 UIGuestOSTypeII m_guestOSType; 154 152 #ifdef VBOX_WITH_3D_ACCELERATION 155 153 /** Holds whether the guest OS supports WDDM. */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r101231 r101263 158 158 } 159 159 160 CGuestOSTypeUIMachineSettingsGeneral::guestOSType() const161 { 162 AssertPtrReturn(m_pEditorNameAndSystem, CGuestOSType());160 UIGuestOSTypeII UIMachineSettingsGeneral::guestOSType() const 161 { 162 AssertPtrReturn(m_pEditorNameAndSystem, UIGuestOSTypeII()); 163 163 return m_pEditorNameAndSystem->type(); 164 164 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.h
r101231 r101263 33 33 34 34 /* GUI includes: */ 35 #include "UIGuestOSTypeII.h" 35 36 #include "UISettingsPage.h" 36 37 … … 58 59 virtual ~UIMachineSettingsGeneral() RT_OVERRIDE; 59 60 60 /** Returns the VM OS type ID. */61 CGuestOSTypeguestOSType() const;61 /** Returns the VM OS type. */ 62 UIGuestOSTypeII guestOSType() const; 62 63 63 64 protected:
Note:
See TracChangeset
for help on using the changeset viewer.