UISettingsCacheGlobalExtensionItem UIGlobalSettingsExtension::fetchData(const CExtPack &package) const { UISettingsCacheGlobalExtensionItem item; item.m_strName = package.GetName(); item.m_strDescription = package.GetDescription(); item.m_strVersion = package.GetVersion(); item.m_strRevision = package.GetRevision(); item.m_fIsUsable = package.GetUsable(); if (!item.m_fIsUsable) item.m_strWhyUnusable = package.GetWhyUnusable(); return item; }
bool UIMachineSettingsDisplay::validate(QList<UIValidationMessage> &messages) { /* Check if video RAM requirement changed first: */ checkVRAMRequirements(); /* Pass by default: */ bool fPass = true; /* Video tab: */ { /* Prepare message: */ UIValidationMessage message; message.first = VBoxGlobal::removeAccelMark(m_pTabWidget->tabText(0)); /* 3D acceleration test: */ if (m_pCheckbox3D->isChecked() && !vboxGlobal().is3DAvailable()) { message.second << tr("The virtual machine is set up to use hardware graphics acceleration. " "However the host system does not currently provide this, " "so you will not be able to start the machine."); } /* Video RAM amount test: */ if (shouldWeWarnAboutLowVideoMemory() && !m_guestOSType.isNull()) { quint64 uNeedBytes = VBoxGlobal::requiredVideoMemory(m_guestOSType.GetId(), m_pEditorVideoScreenCount->value()); /* Basic video RAM amount test: */ if ((quint64)m_pEditorVideoMemorySize->value() * _1M < uNeedBytes) { message.second << tr("The virtual machine is currently assigned less than <b>%1</b> of video memory " "which is the minimum amount required to switch to fullscreen or seamless mode.") .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp)); } #ifdef VBOX_WITH_VIDEOHWACCEL /* 2D acceleration video RAM amount test: */ else if (m_pCheckbox2DVideo->isChecked() && m_f2DVideoAccelerationSupported) { uNeedBytes += VBoxGlobal::required2DOffscreenVideoMemory(); if ((quint64)m_pEditorVideoMemorySize->value() * _1M < uNeedBytes) { message.second << tr("The virtual machine is currently assigned less than <b>%1</b> of video memory " "which is the minimum amount required for High Definition Video to be played efficiently.") .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp)); } } #endif /* VBOX_WITH_VIDEOHWACCEL */ #if 0 # ifdef VBOX_WITH_CRHGSMI /* 3D acceleration video RAM amount test: */ else if (m_pCheckbox3D->isChecked() && m_fWddmModeSupported) { int cGuestScreenCount = m_pEditorVideoScreenCount->value(); uNeedBytes += VBoxGlobal::required3DWddmOffscreenVideoMemory(m_guestOSType.GetId(), cGuestScreenCount); uNeedBytes = qMax(uNeedBytes, 128 * _1M); uNeedBytes = qMin(uNeedBytes, 256 * _1M); if ((quint64)m_pEditorVideoMemorySize->value() * _1M < uNeedBytes) { message.second << tr("The virtual machine is set up to use hardware graphics acceleration " "and the operating system hint is set to Windows Vista or later. " "For best performance you should set the machine's video memory to at least b>%1</b>.") .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp)); } } # endif /* VBOX_WITH_CRHGSMI */ #endif /* 0 */ } #ifdef VBOX_WITH_VIDEOHWACCEL /* 2D video acceleration is available for Windows guests only: */ if (m_pCheckbox2DVideo->isChecked() && !m_f2DVideoAccelerationSupported) { message.second << tr("The virtual machine is set up to use Video Stream Acceleration. " "As this feature only works with Windows guest systems it will be disabled."); } #endif /* VBOX_WITH_VIDEOHWACCEL */ /* Serialize message: */ if (!message.second.isEmpty()) messages << message; } /* Remote Display tab: */ { /* Prepare message: */ UIValidationMessage message; message.first = VBoxGlobal::removeAccelMark(m_pTabWidget->tabText(1)); #ifdef VBOX_WITH_EXTPACK CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName); if (m_pCheckboxRemoteDisplay->isChecked() && (extPack.isNull() || !extPack.GetUsable())) { message.second << tr("Remote Display is currently enabled for this virtual machine. " "However, this requires the <b>%1</b> to be installed. " "Please install the Extension Pack from the VirtualBox download site as " "otherwise your VM will be started with Remote Display disabled.") .arg(GUI_ExtPackName); } #endif /* VBOX_WITH_EXTPACK */ /* Check VRDE server port: */ if (m_pEditorRemoteDisplayPort->text().trimmed().isEmpty()) { message.second << tr("The VRDE server port value is not currently specified."); fPass = false; } /* Check VRDE server timeout: */ if (m_pEditorRemoteDisplayTimeout->text().trimmed().isEmpty()) { message.second << tr("The VRDE authentication timeout value is not currently specified."); fPass = false; } /* Serialize message: */ if (!message.second.isEmpty()) messages << message; } /* Return result: */ return fPass; }