VirtualBox

Ignore:
Timestamp:
Aug 19, 2020 4:45:20 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140001
Message:

FE/Qt: bugref:9812: VM settings: Prepare cascade cleanup for System page.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r85727 r85839  
    153153    , m_fIsUSBEnabled(false)
    154154    , m_pCache(0)
     155    , m_pTabWidget(0)
     156    , m_pTabMotherboard(0)
     157    , m_pLabelBaseMemory(0)
     158    , m_pEditorBaseMemory(0)
     159    , m_pLabelBootOrder(0)
     160    , m_pEditorBootOrder(0)
     161    , m_pLabelChipset(0)
     162    , m_pComboChipset(0)
     163    , m_pLabelPointingHID(0)
     164    , m_pComboPointingHID(0)
     165    , m_pLabelExtendedMotherboard(0)
     166    , m_pCheckBoxAPIC(0)
     167    , m_pCheckBoxEFI(0)
     168    , m_pCheckBoxUTC(0)
     169    , m_pTabProcessor(0)
     170    , m_pLabelProcessorCount(0)
     171    , m_pSliderProcessorCount(0)
     172    , m_pSpinboxProcessorCount(0)
     173    , m_pLabelProcessorCountMin(0)
     174    , m_pLabelProcessorCountMax(0)
     175    , m_pLabelProcessorExecCap(0)
     176    , m_pSliderProcessorExecCap(0)
     177    , m_pSpinboxProcessorExecCap(0)
     178    , m_pLabelProcessorExecCapMin(0)
     179    , m_pLabelProcessorExecCapMax(0)
     180    , m_pLabelExtendedProcessor(0)
     181    , m_pCheckBoxPAE(0)
     182    , m_pCheckBoxNestedVirtualization(0)
     183    , m_pTabAcceleration(0)
     184    , m_pLabelParavirtProvider(0)
     185    , m_pComboParavirtProvider(0)
     186    , m_pLabelVirtualization(0)
     187    , m_pCheckBoxVirtualization(0)
     188    , m_pCheckBoxNestedPaging(0)
    155189{
    156190    /* Prepare: */
     
    199233bool UIMachineSettingsSystem::isHIDEnabled() const
    200234{
    201     return m_pComboPointingHIDType->currentData().value<KPointingHIDType>() != KPointingHIDType_PS2Mouse;
     235    return m_pComboPointingHID->currentData().value<KPointingHIDType>() != KPointingHIDType_PS2Mouse;
    202236}
    203237
    204238KChipsetType UIMachineSettingsSystem::chipsetType() const
    205239{
    206     return m_pComboChipsetType->currentData().value<KChipsetType>();
     240    return m_pComboChipset->currentData().value<KChipsetType>();
    207241}
    208242
     
    281315
    282316    /* Load old 'Motherboard' data from the cache: */
    283     m_pBaseMemoryEditor->setValue(oldSystemData.m_iMemorySize);
    284     m_pBootOrderEditor->setValue(oldSystemData.m_bootItems);
    285     const int iChipsetTypePosition = m_pComboChipsetType->findData(oldSystemData.m_chipsetType);
    286     m_pComboChipsetType->setCurrentIndex(iChipsetTypePosition == -1 ? 0 : iChipsetTypePosition);
    287     const int iHIDTypePosition = m_pComboPointingHIDType->findData(oldSystemData.m_pointingHIDType);
    288     m_pComboPointingHIDType->setCurrentIndex(iHIDTypePosition == -1 ? 0 : iHIDTypePosition);
    289     m_pCheckBoxApic->setChecked(oldSystemData.m_fEnabledIoApic);
     317    m_pEditorBaseMemory->setValue(oldSystemData.m_iMemorySize);
     318    m_pEditorBootOrder->setValue(oldSystemData.m_bootItems);
     319    const int iChipsetTypePosition = m_pComboChipset->findData(oldSystemData.m_chipsetType);
     320    m_pComboChipset->setCurrentIndex(iChipsetTypePosition == -1 ? 0 : iChipsetTypePosition);
     321    const int iHIDTypePosition = m_pComboPointingHID->findData(oldSystemData.m_pointingHIDType);
     322    m_pComboPointingHID->setCurrentIndex(iHIDTypePosition == -1 ? 0 : iHIDTypePosition);
     323    m_pCheckBoxAPIC->setChecked(oldSystemData.m_fEnabledIoApic);
    290324    m_pCheckBoxEFI->setChecked(oldSystemData.m_fEnabledEFI);
    291     m_pCheckBoxUseUTC->setChecked(oldSystemData.m_fEnabledUTC);
     325    m_pCheckBoxUTC->setChecked(oldSystemData.m_fEnabledUTC);
    292326
    293327    /* Load old 'Processor' data from the cache: */
    294     m_pSliderCPUCount->setValue(oldSystemData.m_cCPUCount);
    295     m_pSliderCPUExecCap->setValue(oldSystemData.m_iCPUExecCap);
     328    m_pSliderProcessorCount->setValue(oldSystemData.m_cCPUCount);
     329    m_pSliderProcessorExecCap->setValue(oldSystemData.m_iCPUExecCap);
    296330    m_pCheckBoxPAE->setChecked(oldSystemData.m_fEnabledPAE);
    297331    m_pCheckBoxNestedVirtualization->setChecked(oldSystemData.m_fEnabledNestedHwVirtEx);
    298332
    299333    /* Load old 'Acceleration' data from the cache: */
    300     const int iParavirtProviderPosition = m_pComboParavirtProviderType->findData(oldSystemData.m_paravirtProvider);
    301     m_pComboParavirtProviderType->setCurrentIndex(iParavirtProviderPosition == -1 ? 0 : iParavirtProviderPosition);
     334    const int iParavirtProviderPosition = m_pComboParavirtProvider->findData(oldSystemData.m_paravirtProvider);
     335    m_pComboParavirtProvider->setCurrentIndex(iParavirtProviderPosition == -1 ? 0 : iParavirtProviderPosition);
    302336    m_pCheckBoxVirtualization->setChecked(oldSystemData.m_fEnabledHwVirtEx);
    303337    m_pCheckBoxNestedPaging->setChecked(oldSystemData.m_fEnabledNestedPaging);
     
    322356
    323357    /* Gather 'Motherboard' data: */
    324     newSystemData.m_iMemorySize = m_pBaseMemoryEditor->value();
    325     newSystemData.m_bootItems = m_pBootOrderEditor->value();
    326     newSystemData.m_chipsetType = m_pComboChipsetType->currentData().value<KChipsetType>();
    327     newSystemData.m_pointingHIDType = m_pComboPointingHIDType->currentData().value<KPointingHIDType>();
    328     newSystemData.m_fEnabledIoApic =    m_pCheckBoxApic->isChecked()
    329                                      || m_pSliderCPUCount->value() > 1
    330                                      || m_pComboChipsetType->currentData().value<KChipsetType>() == KChipsetType_ICH9;
     358    newSystemData.m_iMemorySize = m_pEditorBaseMemory->value();
     359    newSystemData.m_bootItems = m_pEditorBootOrder->value();
     360    newSystemData.m_chipsetType = m_pComboChipset->currentData().value<KChipsetType>();
     361    newSystemData.m_pointingHIDType = m_pComboPointingHID->currentData().value<KPointingHIDType>();
     362    newSystemData.m_fEnabledIoApic =    m_pCheckBoxAPIC->isChecked()
     363                                     || m_pSliderProcessorCount->value() > 1
     364                                     || m_pComboChipset->currentData().value<KChipsetType>() == KChipsetType_ICH9;
    331365    newSystemData.m_fEnabledEFI = m_pCheckBoxEFI->isChecked();
    332     newSystemData.m_fEnabledUTC = m_pCheckBoxUseUTC->isChecked();
     366    newSystemData.m_fEnabledUTC = m_pCheckBoxUTC->isChecked();
    333367
    334368    /* Gather 'Processor' data: */
    335     newSystemData.m_cCPUCount = m_pSliderCPUCount->value();
    336     newSystemData.m_iCPUExecCap = m_pSliderCPUExecCap->value();
     369    newSystemData.m_cCPUCount = m_pSliderProcessorCount->value();
     370    newSystemData.m_iCPUExecCap = m_pSliderProcessorExecCap->value();
    337371    newSystemData.m_fEnabledPAE = m_pCheckBoxPAE->isChecked();
    338372    newSystemData.m_fEnabledNestedHwVirtEx = isNestedHWVirtExEnabled();
    339373
    340374    /* Gather 'Acceleration' data: */
    341     newSystemData.m_paravirtProvider = m_pComboParavirtProviderType->currentData().value<KParavirtProvider>();
     375    newSystemData.m_paravirtProvider = m_pComboParavirtProvider->currentData().value<KParavirtProvider>();
    342376    /* Enable HW Virt Ex automatically if it's supported and
    343377     * 1. multiple CPUs, 2. Nested Paging or 3. Nested HW Virt Ex is requested. */
    344378    newSystemData.m_fEnabledHwVirtEx =    isHWVirtExEnabled()
    345379                                       || (   isHWVirtExSupported()
    346                                            && (   m_pSliderCPUCount->value() > 1
     380                                           && (   m_pSliderProcessorCount->value() > 1
    347381                                               || isNestedPagingEnabled()
    348382                                               || isNestedHWVirtExEnabled()));
     
    378412        /* Prepare message: */
    379413        UIValidationMessage message;
    380         message.first = UICommon::removeAccelMark(m_pTabWidgetSystem->tabText(0));
     414        message.first = UICommon::removeAccelMark(m_pTabWidget->tabText(0));
    381415
    382416        /* RAM amount test: */
    383417        const ulong uFullSize = uiCommon().host().GetMemorySize();
    384         if (m_pBaseMemoryEditor->value() > (int)m_pBaseMemoryEditor->maxRAMAlw())
     418        if (m_pEditorBaseMemory->value() > (int)m_pEditorBaseMemory->maxRAMAlw())
    385419        {
    386420            message.second << tr(
    387421                "More than <b>%1%</b> of the host computer's memory (<b>%2</b>) is assigned to the virtual machine. "
    388422                "Not enough memory is left for the host operating system. Please select a smaller amount.")
    389                 .arg((unsigned)qRound((double)m_pBaseMemoryEditor->maxRAMAlw() / uFullSize * 100.0))
     423                .arg((unsigned)qRound((double)m_pEditorBaseMemory->maxRAMAlw() / uFullSize * 100.0))
    390424                .arg(uiCommon().formatSize((uint64_t)uFullSize * _1M));
    391425            fPass = false;
    392426        }
    393         else if (m_pBaseMemoryEditor->value() > (int)m_pBaseMemoryEditor->maxRAMOpt())
     427        else if (m_pEditorBaseMemory->value() > (int)m_pEditorBaseMemory->maxRAMOpt())
    394428        {
    395429            message.second << tr(
    396430                "More than <b>%1%</b> of the host computer's memory (<b>%2</b>) is assigned to the virtual machine. "
    397431                "There might not be enough memory left for the host operating system. Please consider selecting a smaller amount.")
    398                 .arg((unsigned)qRound((double)m_pBaseMemoryEditor->maxRAMOpt() / uFullSize * 100.0))
     432                .arg((unsigned)qRound((double)m_pEditorBaseMemory->maxRAMOpt() / uFullSize * 100.0))
    399433                .arg(uiCommon().formatSize((uint64_t)uFullSize * _1M));
    400434        }
    401435
    402436        /* Chipset type vs IO-APIC test: */
    403         if (m_pComboChipsetType->currentData().value<KChipsetType>() == KChipsetType_ICH9 && !m_pCheckBoxApic->isChecked())
     437        if (m_pComboChipset->currentData().value<KChipsetType>() == KChipsetType_ICH9 && !m_pCheckBoxAPIC->isChecked())
    404438        {
    405439            message.second << tr(
     
    427461        /* Prepare message: */
    428462        UIValidationMessage message;
    429         message.first = UICommon::removeAccelMark(m_pTabWidgetSystem->tabText(1));
     463        message.first = UICommon::removeAccelMark(m_pTabWidget->tabText(1));
    430464
    431465        /* VCPU amount test: */
    432466        const int cTotalCPUs = uiCommon().host().GetProcessorOnlineCoreCount();
    433         if (m_pSliderCPUCount->value() > 2 * cTotalCPUs)
     467        if (m_pSliderProcessorCount->value() > 2 * cTotalCPUs)
    434468        {
    435469            message.second << tr(
     
    439473            fPass = false;
    440474        }
    441         else if (m_pSliderCPUCount->value() > cTotalCPUs)
     475        else if (m_pSliderProcessorCount->value() > cTotalCPUs)
    442476        {
    443477            message.second << tr(
     
    448482
    449483        /* VCPU vs IO-APIC test: */
    450         if (m_pSliderCPUCount->value() > 1 && !m_pCheckBoxApic->isChecked())
     484        if (m_pSliderProcessorCount->value() > 1 && !m_pCheckBoxAPIC->isChecked())
    451485        {
    452486            message.second << tr(
     
    457491
    458492        /* VCPU: */
    459         if (m_pSliderCPUCount->value() > 1)
     493        if (m_pSliderProcessorCount->value() > 1)
    460494        {
    461495            /* HW Virt Ex test: */
     
    470504
    471505        /* CPU execution cap test: */
    472         if (m_pSliderCPUExecCap->value() < (int)m_uMedGuestCPUExecCap)
     506        if (m_pSliderProcessorExecCap->value() < (int)m_uMedGuestCPUExecCap)
    473507        {
    474508            message.second << tr("The processor execution cap is set to a low value. This may make the machine feel slow to respond.");
     
    476510
    477511        /* Warn user about possible performance degradation and suggest lowering # of CPUs assigned to the VM instead: */
    478         if (m_pSliderCPUExecCap->value() < 100)
    479         {
    480             if (m_uMaxGuestCPU > 1 && m_pSliderCPUCount->value() > 1)
     512        if (m_pSliderProcessorExecCap->value() < 100)
     513        {
     514            if (m_uMaxGuestCPU > 1 && m_pSliderProcessorCount->value() > 1)
    481515            {
    482516                message.second << tr("Please consider lowering the number of CPUs assigned to the virtual machine rather "
     
    520554        /* Prepare message: */
    521555        UIValidationMessage message;
    522         message.first = UICommon::removeAccelMark(m_pTabWidgetSystem->tabText(2));
     556        message.first = UICommon::removeAccelMark(m_pTabWidget->tabText(2));
    523557
    524558        /* HW Virt Ex test: */
     
    558592{
    559593    /* Configure navigation for 'motherboard' tab: */
    560     setTabOrder(pWidget, m_pTabWidgetSystem->focusProxy());
    561     setTabOrder(m_pTabWidgetSystem->focusProxy(), m_pBaseMemoryEditor);
    562     setTabOrder(m_pBaseMemoryEditor, m_pBootOrderEditor);
    563     setTabOrder(m_pBootOrderEditor, m_pComboChipsetType);
    564     setTabOrder(m_pComboChipsetType, m_pComboPointingHIDType);
    565     setTabOrder(m_pComboPointingHIDType, m_pCheckBoxApic);
    566     setTabOrder(m_pCheckBoxApic, m_pCheckBoxEFI);
    567     setTabOrder(m_pCheckBoxEFI, m_pCheckBoxUseUTC);
     594    setTabOrder(pWidget, m_pTabWidget->focusProxy());
     595    setTabOrder(m_pTabWidget->focusProxy(), m_pEditorBaseMemory);
     596    setTabOrder(m_pEditorBaseMemory, m_pEditorBootOrder);
     597    setTabOrder(m_pEditorBootOrder, m_pComboChipset);
     598    setTabOrder(m_pComboChipset, m_pComboPointingHID);
     599    setTabOrder(m_pComboPointingHID, m_pCheckBoxAPIC);
     600    setTabOrder(m_pCheckBoxAPIC, m_pCheckBoxEFI);
     601    setTabOrder(m_pCheckBoxEFI, m_pCheckBoxUTC);
    568602
    569603    /* Configure navigation for 'processor' tab: */
    570     setTabOrder(m_pCheckBoxUseUTC, m_pSliderCPUCount);
    571     setTabOrder(m_pSliderCPUCount, m_pEditorCPUCount);
    572     setTabOrder(m_pEditorCPUCount, m_pSliderCPUExecCap);
    573     setTabOrder(m_pSliderCPUExecCap, m_pEditorCPUExecCap);
    574     setTabOrder(m_pEditorCPUExecCap, m_pComboParavirtProviderType);
     604    setTabOrder(m_pCheckBoxUTC, m_pSliderProcessorCount);
     605    setTabOrder(m_pSliderProcessorCount, m_pSpinboxProcessorCount);
     606    setTabOrder(m_pSpinboxProcessorCount, m_pSliderProcessorExecCap);
     607    setTabOrder(m_pSliderProcessorExecCap, m_pSpinboxProcessorExecCap);
     608    setTabOrder(m_pSpinboxProcessorExecCap, m_pComboParavirtProvider);
    575609
    576610    /* Configure navigation for 'acceleration' tab: */
    577     setTabOrder(m_pComboParavirtProviderType, m_pCheckBoxPAE);
     611    setTabOrder(m_pComboParavirtProvider, m_pCheckBoxPAE);
    578612    setTabOrder(m_pCheckBoxPAE, m_pCheckBoxNestedVirtualization);
    579613    setTabOrder(m_pCheckBoxNestedVirtualization, m_pCheckBoxVirtualization);
     
    583617void UIMachineSettingsSystem::retranslateUi()
    584618{
    585     m_pBaseMemoryLabel->setText(QApplication::translate("UIMachineSettingsSystem", "Base &Memory:"));
    586     m_pBaseMemoryEditor->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Controls the amount of memory provided "
     619    m_pLabelBaseMemory->setText(QApplication::translate("UIMachineSettingsSystem", "Base &Memory:"));
     620    m_pEditorBaseMemory->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Controls the amount of memory provided "
    587621                                                              "to the virtual machine. If you assign too much, the machine might not start."));
    588     m_pBootOrderLabel->setText(QApplication::translate("UIMachineSettingsSystem", "&Boot Order:"));
    589     m_pBootOrderEditor->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Defines the boot device order. Use the "
     622    m_pLabelBootOrder->setText(QApplication::translate("UIMachineSettingsSystem", "&Boot Order:"));
     623    m_pEditorBootOrder->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Defines the boot device order. Use the "
    590624                                                             "checkboxes on the left to enable or disable individual boot devices."
    591625                                                             "Move items up and down to change the device order."));
    592     m_pLabelChipsetType->setText(QApplication::translate("UIMachineSettingsSystem", "&Chipset:"));
    593     m_pComboChipsetType->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Selects the chipset to be emulated in "
     626    m_pLabelChipset->setText(QApplication::translate("UIMachineSettingsSystem", "&Chipset:"));
     627    m_pComboChipset->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Selects the chipset to be emulated in "
    594628                                                              "this virtual machine. Note that the ICH9 chipset emulation is experimental "
    595629                                                              "and not recommended except for guest systems (such as Mac OS X) which require it."));
    596     m_pLabelPointingHIDType->setText(QApplication::translate("UIMachineSettingsSystem", "&Pointing Device:"));
    597     m_pComboPointingHIDType->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Determines whether the emulated "
     630    m_pLabelPointingHID->setText(QApplication::translate("UIMachineSettingsSystem", "&Pointing Device:"));
     631    m_pComboPointingHID->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Determines whether the emulated "
    598632                                                                  "pointing device is a standard PS/2 mouse, a USB tablet or a "
    599633                                                                  "USB multi-touch tablet."));
    600     m_pLabelMotherboardExtended->setText(QApplication::translate("UIMachineSettingsSystem", "Extended Features:"));
    601     m_pCheckBoxApic->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "When checked, the virtual machine will "
     634    m_pLabelExtendedMotherboard->setText(QApplication::translate("UIMachineSettingsSystem", "Extended Features:"));
     635    m_pCheckBoxAPIC->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "When checked, the virtual machine will "
    602636                                                          "support the Input Output APIC (I/O APIC), which may slightly decrease "
    603637                                                          "performance. <b>Note:</b> don't disable this feature after having "
    604638                                                          "installed a Windows guest operating system!"));
    605     m_pCheckBoxApic->setText(QApplication::translate("UIMachineSettingsSystem", "Enable &I/O APIC"));
     639    m_pCheckBoxAPIC->setText(QApplication::translate("UIMachineSettingsSystem", "Enable &I/O APIC"));
    606640    m_pCheckBoxEFI->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "When checked, the guest will support the "
    607641                                                         "Extended Firmware Interface (EFI), which is required to boot certain "
    608642                                                         "guest OSes. Non-EFI aware OSes will not be able to boot if this option is activated."));
    609643    m_pCheckBoxEFI->setText(QApplication::translate("UIMachineSettingsSystem", "Enable &EFI (special OSes only)"));
    610     m_pCheckBoxUseUTC->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "When checked, the RTC device will report "
     644    m_pCheckBoxUTC->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "When checked, the RTC device will report "
    611645                                                            "the time in UTC, otherwise in local (host) time. Unix usually expects "
    612646                                                            "the hardware clock to be set to UTC."));
    613     m_pCheckBoxUseUTC->setText(QApplication::translate("UIMachineSettingsSystem", "Hardware Clock in &UTC Time"));
    614     m_pTabWidgetSystem->setTabText(m_pTabWidgetSystem->indexOf(m_pTabMotherboard), QApplication::translate("UIMachineSettingsSystem", "&Motherboard"));
    615     m_pLabelCPUCount->setText(QApplication::translate("UIMachineSettingsSystem", "&Processor(s):"));
    616     m_pSliderCPUCount->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Controls the number of virtual CPUs in the "
     647    m_pCheckBoxUTC->setText(QApplication::translate("UIMachineSettingsSystem", "Hardware Clock in &UTC Time"));
     648    m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabMotherboard), QApplication::translate("UIMachineSettingsSystem", "&Motherboard"));
     649    m_pLabelProcessorCount->setText(QApplication::translate("UIMachineSettingsSystem", "&Processor(s):"));
     650    m_pSliderProcessorCount->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Controls the number of virtual CPUs in the "
    617651                                                            "virtual machine. You need hardware virtualization support on your host "
    618652                                                            "system to use more than one virtual CPU."));
    619     m_pEditorCPUCount->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Controls the number of virtual CPUs in the "
     653    m_pSpinboxProcessorCount->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Controls the number of virtual CPUs in the "
    620654                                                            "virtual machine. You need hardware virtualization support on your host "
    621655                                                            "system to use more than one virtual CPU."));
    622     m_pLabelCPUExecCap->setText(QApplication::translate("UIMachineSettingsSystem", "&Execution Cap:"));
    623     m_pSliderCPUExecCap->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Limits the amount of time that each virtual "
     656    m_pLabelProcessorExecCap->setText(QApplication::translate("UIMachineSettingsSystem", "&Execution Cap:"));
     657    m_pSliderProcessorExecCap->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Limits the amount of time that each virtual "
    624658                                                              "CPU is allowed to run for. Each virtual CPU will be allowed to use up "
    625659                                                              "to this percentage of the processing time available on one physical CPU. "
    626660                                                              "The execution cap can be disabled by setting it to 100%. Setting the cap "
    627661                                                              "too low can make the machine feel slow to respond."));
    628     m_pEditorCPUExecCap->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Limits the amount of time that each virtual CPU "
     662    m_pSpinboxProcessorExecCap->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Limits the amount of time that each virtual CPU "
    629663                                                              "is allowed to run for. Each virtual CPU will be allowed to use up "
    630664                                                              "to this percentage of the processing time available on one physical "
    631665                                                              "CPU. The execution cap can be disabled by setting it to 100%. Setting "
    632666                                                              "the cap too low can make the machine feel slow to respond."));
    633     m_pEditorCPUExecCap->setSuffix(QApplication::translate("UIMachineSettingsSystem", "%"));
    634     m_pLabelCPUExtended->setText(QApplication::translate("UIMachineSettingsSystem", "Extended Features:"));
     667    m_pSpinboxProcessorExecCap->setSuffix(QApplication::translate("UIMachineSettingsSystem", "%"));
     668    m_pLabelExtendedProcessor->setText(QApplication::translate("UIMachineSettingsSystem", "Extended Features:"));
    635669    m_pCheckBoxPAE->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "When checked, the Physical Address Extension "
    636670                                                         "(PAE) feature of the host CPU will be exposed to the virtual machine."));
     
    639673                                                                          "virtualization CPU feature will be exposed to the virtual machine."));
    640674    m_pCheckBoxNestedVirtualization->setText(QApplication::translate("UIMachineSettingsSystem", "Enable Nested &VT-x/AMD-V"));
    641     m_pTabWidgetSystem->setTabText(m_pTabWidgetSystem->indexOf(m_pTabCPU), QApplication::translate("UIMachineSettingsSystem", "&Processor"));
     675    m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabProcessor), QApplication::translate("UIMachineSettingsSystem", "&Processor"));
    642676    m_pLabelParavirtProvider->setText(QApplication::translate("UIMachineSettingsSystem", "&Paravirtualization Interface:"));
    643     m_pComboParavirtProviderType->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Selects the paravirtualization "
     677    m_pComboParavirtProvider->setWhatsThis(QApplication::translate("UIMachineSettingsSystem", "Selects the paravirtualization "
    644678                                                                       "guest interface provider to be used by this virtual machine."));
    645679    m_pLabelVirtualization->setText(QApplication::translate("UIMachineSettingsSystem", "Hardware Virtualization:"));
     
    651685                                                                  "try to make use of the nested paging extension of Intel VT-x and AMD-V."));
    652686    m_pCheckBoxNestedPaging->setText(QApplication::translate("UIMachineSettingsSystem", "Enable Nested Pa&ging"));
    653     m_pTabWidgetSystem->setTabText(m_pTabWidgetSystem->indexOf(m_pTabAcceleration), QApplication::translate("UIMachineSettingsSystem", "Acce&leration"));
     687    m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabAcceleration), QApplication::translate("UIMachineSettingsSystem", "Acce&leration"));
    654688
    655689    /* Retranslate the cpu slider legend: */
    656     m_pLabelCPUMin->setText(tr("%1 CPU", "%1 is 1 for now").arg(m_uMinGuestCPU));
    657     m_pLabelCPUMax->setText(tr("%1 CPUs", "%1 is host cpu count * 2 for now").arg(m_uMaxGuestCPU));
     690    m_pLabelProcessorCountMin->setText(tr("%1 CPU", "%1 is 1 for now").arg(m_uMinGuestCPU));
     691    m_pLabelProcessorCountMax->setText(tr("%1 CPUs", "%1 is host cpu count * 2 for now").arg(m_uMaxGuestCPU));
    658692
    659693    /* Retranslate the cpu cap slider legend: */
    660     m_pLabelCPUExecCapMin->setText(tr("%1%").arg(m_uMinGuestCPUExecCap));
    661     m_pLabelCPUExecCapMax->setText(tr("%1%").arg(m_uMaxGuestCPUExecCap));
     694    m_pLabelProcessorExecCapMin->setText(tr("%1%").arg(m_uMinGuestCPUExecCap));
     695    m_pLabelProcessorExecCapMax->setText(tr("%1%").arg(m_uMaxGuestCPUExecCap));
    662696
    663697    /* Retranslate combo-boxes: */
     
    673707
    674708    /* Polish 'Motherboard' availability: */
    675     m_pBaseMemoryLabel->setEnabled(isMachineOffline());
    676     m_pBaseMemoryEditor->setEnabled(isMachineOffline());
    677     m_pBootOrderLabel->setEnabled(isMachineOffline());
    678     m_pBootOrderEditor->setEnabled(isMachineOffline());
    679     m_pLabelChipsetType->setEnabled(isMachineOffline());
    680     m_pComboChipsetType->setEnabled(isMachineOffline());
    681     m_pLabelPointingHIDType->setEnabled(isMachineOffline());
    682     m_pComboPointingHIDType->setEnabled(isMachineOffline());
    683     m_pLabelMotherboardExtended->setEnabled(isMachineOffline());
    684     m_pCheckBoxApic->setEnabled(isMachineOffline());
     709    m_pLabelBaseMemory->setEnabled(isMachineOffline());
     710    m_pEditorBaseMemory->setEnabled(isMachineOffline());
     711    m_pLabelBootOrder->setEnabled(isMachineOffline());
     712    m_pEditorBootOrder->setEnabled(isMachineOffline());
     713    m_pLabelChipset->setEnabled(isMachineOffline());
     714    m_pComboChipset->setEnabled(isMachineOffline());
     715    m_pLabelPointingHID->setEnabled(isMachineOffline());
     716    m_pComboPointingHID->setEnabled(isMachineOffline());
     717    m_pLabelExtendedMotherboard->setEnabled(isMachineOffline());
     718    m_pCheckBoxAPIC->setEnabled(isMachineOffline());
    685719    m_pCheckBoxEFI->setEnabled(isMachineOffline());
    686     m_pCheckBoxUseUTC->setEnabled(isMachineOffline());
     720    m_pCheckBoxUTC->setEnabled(isMachineOffline());
    687721
    688722    /* Polish 'Processor' availability: */
    689     m_pLabelCPUCount->setEnabled(isMachineOffline());
    690     m_pLabelCPUMin->setEnabled(isMachineOffline());
    691     m_pLabelCPUMax->setEnabled(isMachineOffline());
    692     m_pSliderCPUCount->setEnabled(isMachineOffline() && systemData.m_fSupportedHwVirtEx);
    693     m_pEditorCPUCount->setEnabled(isMachineOffline() && systemData.m_fSupportedHwVirtEx);
    694     m_pLabelCPUExecCap->setEnabled(isMachineInValidMode());
    695     m_pLabelCPUExecCapMin->setEnabled(isMachineInValidMode());
    696     m_pLabelCPUExecCapMax->setEnabled(isMachineInValidMode());
    697     m_pSliderCPUExecCap->setEnabled(isMachineInValidMode());
    698     m_pEditorCPUExecCap->setEnabled(isMachineInValidMode());
    699     m_pLabelCPUExtended->setEnabled(isMachineOffline());
     723    m_pLabelProcessorCount->setEnabled(isMachineOffline());
     724    m_pLabelProcessorCountMin->setEnabled(isMachineOffline());
     725    m_pLabelProcessorCountMax->setEnabled(isMachineOffline());
     726    m_pSliderProcessorCount->setEnabled(isMachineOffline() && systemData.m_fSupportedHwVirtEx);
     727    m_pSpinboxProcessorCount->setEnabled(isMachineOffline() && systemData.m_fSupportedHwVirtEx);
     728    m_pLabelProcessorExecCap->setEnabled(isMachineInValidMode());
     729    m_pLabelProcessorExecCapMin->setEnabled(isMachineInValidMode());
     730    m_pLabelProcessorExecCapMax->setEnabled(isMachineInValidMode());
     731    m_pSliderProcessorExecCap->setEnabled(isMachineInValidMode());
     732    m_pSpinboxProcessorExecCap->setEnabled(isMachineInValidMode());
     733    m_pLabelExtendedProcessor->setEnabled(isMachineOffline());
    700734    m_pCheckBoxPAE->setEnabled(isMachineOffline() && systemData.m_fSupportedPAE);
    701735    m_pCheckBoxNestedVirtualization->setEnabled(   (systemData.m_fSupportedNestedHwVirtEx && isMachineOffline())
     
    709743                                            || (systemData.m_fEnabledNestedPaging && isMachineOffline())));
    710744    m_pLabelParavirtProvider->setEnabled(isMachineOffline());
    711     m_pComboParavirtProviderType->setEnabled(isMachineOffline());
     745    m_pComboParavirtProvider->setEnabled(isMachineOffline());
    712746    m_pLabelVirtualization->setEnabled(isMachineOffline());
    713747}
     
    716750{
    717751    /* Apply new memory-size value: */
    718     m_pEditorCPUCount->blockSignals(true);
    719     m_pEditorCPUCount->setValue(m_pSliderCPUCount->value());
    720     m_pEditorCPUCount->blockSignals(false);
     752    m_pSpinboxProcessorCount->blockSignals(true);
     753    m_pSpinboxProcessorCount->setValue(m_pSliderProcessorCount->value());
     754    m_pSpinboxProcessorCount->blockSignals(false);
    721755
    722756    /* Revalidate: */
     
    727761{
    728762    /* Apply new memory-size value: */
    729     m_pSliderCPUCount->blockSignals(true);
    730     m_pSliderCPUCount->setValue(m_pEditorCPUCount->value());
    731     m_pSliderCPUCount->blockSignals(false);
     763    m_pSliderProcessorCount->blockSignals(true);
     764    m_pSliderProcessorCount->setValue(m_pSpinboxProcessorCount->value());
     765    m_pSliderProcessorCount->blockSignals(false);
    732766
    733767    /* Revalidate: */
     
    738772{
    739773    /* Apply new memory-size value: */
    740     m_pEditorCPUExecCap->blockSignals(true);
    741     m_pEditorCPUExecCap->setValue(m_pSliderCPUExecCap->value());
    742     m_pEditorCPUExecCap->blockSignals(false);
     774    m_pSpinboxProcessorExecCap->blockSignals(true);
     775    m_pSpinboxProcessorExecCap->setValue(m_pSliderProcessorExecCap->value());
     776    m_pSpinboxProcessorExecCap->blockSignals(false);
    743777
    744778    /* Revalidate: */
     
    749783{
    750784    /* Apply new memory-size value: */
    751     m_pSliderCPUExecCap->blockSignals(true);
    752     m_pSliderCPUExecCap->setValue(m_pEditorCPUExecCap->value());
    753     m_pSliderCPUExecCap->blockSignals(false);
     785    m_pSliderProcessorExecCap->blockSignals(true);
     786    m_pSliderProcessorExecCap->setValue(m_pSpinboxProcessorExecCap->value());
     787    m_pSliderProcessorExecCap->blockSignals(false);
    754788
    755789    /* Revalidate: */
     
    771805void UIMachineSettingsSystem::prepare()
    772806{
    773     prepareWidgets();
    774 
    775807    /* Prepare cache: */
    776808    m_pCache = new UISettingsCacheMachineSystem;
    777809    AssertPtrReturnVoid(m_pCache);
    778810
    779     /* Tree-widget created in the .ui file. */
    780     {
    781         /* Prepare 'Motherboard' tab: */
    782         prepareTabMotherboard();
    783         /* Prepare 'Processor' tab: */
    784         prepareTabProcessor();
    785         /* Prepare 'Acceleration' tab: */
    786         prepareTabAcceleration();
    787         /* Prepare connections: */
    788         prepareConnections();
    789     }
     811    /* Prepare widgets: */
     812    prepareWidgets();
    790813
    791814    /* Apply language settings: */
     
    795818void UIMachineSettingsSystem::prepareWidgets()
    796819{
    797     // QVBoxLayout *pVBoxLayout1;
    798     // QHBoxLayout *pHBoxLayout2;
    799     // QSpacerItem *pSpacerHorizontal5;
    800     // QVBoxLayout *pVBoxLayout2;
    801     // QHBoxLayout *pHBoxLayout3;
    802     // QSpacerItem *pSpacerHorizontal6;
    803     // QSpacerItem *pSpacerVertical3;
    804     // QGridLayout *pGridLayout2;
    805     // QHBoxLayout *pHBoxLayout4;
    806     // QSpacerItem *pSpacerHorizontal7;
    807     // QVBoxLayout *pVerticalLayout1;
    808     // QVBoxLayout *pVerticalLayout2;
    809     // QSpacerItem *pSpacerVertical4;
    810 
    811     if (objectName().isEmpty())
    812         setObjectName(QStringLiteral("UIMachineSettingsSystem"));
    813     QVBoxLayout *pMainLayout = new QVBoxLayout(this);
    814     pMainLayout->setObjectName(QStringLiteral("pMainLayout"));
    815     m_pTabWidgetSystem = new QITabWidget();
    816     m_pTabWidgetSystem->setObjectName(QStringLiteral("m_pTabWidgetSystem"));
    817     m_pTabMotherboard = new QWidget();
    818     m_pTabMotherboard->setObjectName(QStringLiteral("m_pTabMotherboard"));
    819     QGridLayout *pGridLayout = new QGridLayout(m_pTabMotherboard);
    820     pGridLayout->setObjectName(QStringLiteral("gridLayout"));
    821     m_pBaseMemoryLabel = new QLabel(m_pTabMotherboard);
    822     m_pBaseMemoryLabel->setObjectName(QStringLiteral("m_pBaseMemoryLabel"));
    823     m_pBaseMemoryLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    824     pGridLayout->addWidget(m_pBaseMemoryLabel, 0, 0, 1, 1);
    825 
    826     m_pBaseMemoryEditor = new UIBaseMemoryEditor(m_pTabMotherboard);
    827     m_pBaseMemoryEditor->setObjectName(QStringLiteral("m_pBaseMemoryEditor"));
    828     QSizePolicy sizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
    829     sizePolicy.setHorizontalStretch(1);
    830     sizePolicy.setVerticalStretch(0);
    831     sizePolicy.setHeightForWidth(m_pBaseMemoryEditor->sizePolicy().hasHeightForWidth());
    832     m_pBaseMemoryEditor->setSizePolicy(sizePolicy);
    833     pGridLayout->addWidget(m_pBaseMemoryEditor, 0, 1, 2, 3);
    834 
    835     m_pBootOrderLabel = new QLabel(m_pTabMotherboard);
    836     m_pBootOrderLabel->setObjectName(QStringLiteral("m_pBootOrderLabel"));
    837     m_pBootOrderLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    838     pGridLayout->addWidget(m_pBootOrderLabel, 2, 0, 1, 1);
    839 
    840     m_pBootOrderEditor = new UIBootOrderEditor(m_pTabMotherboard);
    841     m_pBootOrderEditor->setObjectName(QStringLiteral("m_pBootOrderEditor"));
    842     QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed);
    843     sizePolicy1.setHorizontalStretch(0);
    844     sizePolicy1.setVerticalStretch(0);
    845     sizePolicy1.setHeightForWidth(m_pBootOrderEditor->sizePolicy().hasHeightForWidth());
    846     m_pBootOrderEditor->setSizePolicy(sizePolicy1);
    847     pGridLayout->addWidget(m_pBootOrderEditor, 2, 1, 3, 3);
    848 
    849     m_pLabelChipsetType = new QLabel(m_pTabMotherboard);
    850     m_pLabelChipsetType->setObjectName(QStringLiteral("m_pLabelChipsetType"));
    851     m_pLabelChipsetType->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    852     pGridLayout->addWidget(m_pLabelChipsetType, 5, 0, 1, 1);
    853 
    854     QHBoxLayout *pHBoxLayout = new QHBoxLayout();
    855     pHBoxLayout->setObjectName(QStringLiteral("hboxLayout"));
    856     m_pComboChipsetType = new QComboBox(m_pTabMotherboard);
    857     m_pComboChipsetType->setObjectName(QStringLiteral("m_pComboChipsetType"));
    858     QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed);
    859     sizePolicy2.setHorizontalStretch(0);
    860     sizePolicy2.setVerticalStretch(0);
    861     sizePolicy2.setHeightForWidth(m_pComboChipsetType->sizePolicy().hasHeightForWidth());
    862     m_pComboChipsetType->setSizePolicy(sizePolicy2);
    863     pHBoxLayout->addWidget(m_pComboChipsetType);
    864     QSpacerItem *pSpacerHorizontal3 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    865 
    866     pHBoxLayout->addItem(pSpacerHorizontal3);
    867     pGridLayout->addLayout(pHBoxLayout, 5, 1, 1, 3);
    868 
    869     m_pLabelPointingHIDType = new QLabel(m_pTabMotherboard);
    870     m_pLabelPointingHIDType->setObjectName(QStringLiteral("m_pLabelPointingHIDType"));
    871     m_pLabelPointingHIDType->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    872     pGridLayout->addWidget(m_pLabelPointingHIDType, 6, 0, 1, 1);
    873 
    874     QHBoxLayout *hboxLayout1 = new QHBoxLayout();
    875     hboxLayout1->setObjectName(QStringLiteral("hboxLayout1"));
    876     m_pComboPointingHIDType = new QComboBox(m_pTabMotherboard);
    877     m_pComboPointingHIDType->setObjectName(QStringLiteral("m_pComboPointingHIDType"));
    878     sizePolicy2.setHeightForWidth(m_pComboPointingHIDType->sizePolicy().hasHeightForWidth());
    879     m_pComboPointingHIDType->setSizePolicy(sizePolicy2);
    880     hboxLayout1->addWidget(m_pComboPointingHIDType);
    881     QSpacerItem *pSpacerHorizontal4 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    882     hboxLayout1->addItem(pSpacerHorizontal4);
    883     pGridLayout->addLayout(hboxLayout1, 6, 1, 1, 3);
    884 
    885     m_pLabelMotherboardExtended = new QLabel(m_pTabMotherboard);
    886     m_pLabelMotherboardExtended->setObjectName(QStringLiteral("m_pLabelMotherboardExtended"));
    887     m_pLabelMotherboardExtended->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    888     pGridLayout->addWidget(m_pLabelMotherboardExtended, 7, 0, 1, 1);
    889 
    890     m_pCheckBoxApic = new QCheckBox(m_pTabMotherboard);
    891     m_pCheckBoxApic->setObjectName(QStringLiteral("m_pCheckBoxApic"));
    892     pGridLayout->addWidget(m_pCheckBoxApic, 7, 1, 1, 3);
    893 
    894     m_pCheckBoxEFI = new QCheckBox(m_pTabMotherboard);
    895     m_pCheckBoxEFI->setObjectName(QStringLiteral("m_pCheckBoxEFI"));
    896     pGridLayout->addWidget(m_pCheckBoxEFI, 8, 1, 1, 3);
    897 
    898     m_pCheckBoxUseUTC = new QCheckBox(m_pTabMotherboard);
    899     m_pCheckBoxUseUTC->setObjectName(QStringLiteral("m_pCheckBoxUseUTC"));
    900     pGridLayout->addWidget(m_pCheckBoxUseUTC, 9, 1, 1, 3);
    901 
    902     QSpacerItem *pSpacerVertical2 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
    903     pGridLayout->addItem(pSpacerVertical2, 10, 0, 1, 4);
    904 
    905     m_pTabWidgetSystem->addTab(m_pTabMotherboard, QString());
    906     m_pTabCPU = new QWidget();
    907     m_pTabCPU->setObjectName(QStringLiteral("m_pTabCPU"));
    908     QGridLayout *pGridLayout1 = new QGridLayout(m_pTabCPU);
    909     pGridLayout1->setObjectName(QStringLiteral("pGridLayout1"));
    910     m_pLabelCPUCount = new QLabel(m_pTabCPU);
    911     m_pLabelCPUCount->setObjectName(QStringLiteral("m_pLabelCPUCount"));
    912     m_pLabelCPUCount->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    913     pGridLayout1->addWidget(m_pLabelCPUCount, 0, 0, 1, 1);
    914 
    915     QWidget *pContainerWidget = new QWidget(m_pTabCPU);
    916     pContainerWidget->setObjectName(QStringLiteral("widget"));
    917     sizePolicy.setHeightForWidth(pContainerWidget->sizePolicy().hasHeightForWidth());
    918     pContainerWidget->setSizePolicy(sizePolicy);
    919     QVBoxLayout *pVBoxLayout1 = new QVBoxLayout(pContainerWidget);
    920     pVBoxLayout1->setSpacing(0);
    921     pVBoxLayout1->setObjectName(QStringLiteral("pVBoxLayout1"));
    922     pVBoxLayout1->setContentsMargins(0, 0, 0, 0);
    923     m_pSliderCPUCount = new QIAdvancedSlider(pContainerWidget);
    924     m_pSliderCPUCount->setObjectName(QStringLiteral("m_pSliderCPUCount"));
    925     m_pSliderCPUCount->setOrientation(Qt::Horizontal);
    926     pVBoxLayout1->addWidget(m_pSliderCPUCount);
    927 
    928     QHBoxLayout *pHBoxLayout2 = new QHBoxLayout();
    929     pHBoxLayout2->setSpacing(0);
    930     pHBoxLayout2->setObjectName(QStringLiteral("pHBoxLayout2"));
    931     m_pLabelCPUMin = new QLabel(pContainerWidget);
    932     m_pLabelCPUMin->setObjectName(QStringLiteral("m_pLabelCPUMin"));
    933     pHBoxLayout2->addWidget(m_pLabelCPUMin);
    934 
    935     QSpacerItem *pSpacerHorizontal5 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    936     pHBoxLayout2->addItem(pSpacerHorizontal5);
    937 
    938     m_pLabelCPUMax = new QLabel(pContainerWidget);
    939     m_pLabelCPUMax->setObjectName(QStringLiteral("m_pLabelCPUMax"));
    940     pHBoxLayout2->addWidget(m_pLabelCPUMax);
    941 
    942     pVBoxLayout1->addLayout(pHBoxLayout2);
    943     pGridLayout1->addWidget(pContainerWidget, 0, 1, 2, 1);
    944 
    945     m_pEditorCPUCount = new QSpinBox(m_pTabCPU);
    946     m_pEditorCPUCount->setObjectName(QStringLiteral("m_pEditorCPUCount"));
    947     pGridLayout1->addWidget(m_pEditorCPUCount, 0, 2, 1, 1);
    948 
    949     m_pLabelCPUExecCap = new QLabel(m_pTabCPU);
    950     m_pLabelCPUExecCap->setObjectName(QStringLiteral("m_pLabelCPUExecCap"));
    951     m_pLabelCPUExecCap->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    952     pGridLayout1->addWidget(m_pLabelCPUExecCap, 2, 0, 1, 1);
    953 
    954     QVBoxLayout *pVBoxLayout2 = new QVBoxLayout();
    955     pVBoxLayout2->setSpacing(0);
    956     pVBoxLayout2->setObjectName(QStringLiteral("pVBoxLayout2"));
    957     m_pSliderCPUExecCap = new QIAdvancedSlider(m_pTabCPU);
    958     m_pSliderCPUExecCap->setObjectName(QStringLiteral("m_pSliderCPUExecCap"));
    959     m_pSliderCPUExecCap->setOrientation(Qt::Horizontal);
    960     pVBoxLayout2->addWidget(m_pSliderCPUExecCap);
    961 
    962     QHBoxLayout *pHBoxLayout3 = new QHBoxLayout();
    963     pHBoxLayout3->setSpacing(0);
    964     pHBoxLayout3->setObjectName(QStringLiteral("pHBoxLayout3"));
    965     m_pLabelCPUExecCapMin = new QLabel(m_pTabCPU);
    966     m_pLabelCPUExecCapMin->setObjectName(QStringLiteral("m_pLabelCPUExecCapMin"));
    967     pHBoxLayout3->addWidget(m_pLabelCPUExecCapMin);
    968     QSpacerItem *pSpacerHorizontal6 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    969     pHBoxLayout3->addItem(pSpacerHorizontal6);
    970 
    971     m_pLabelCPUExecCapMax = new QLabel(m_pTabCPU);
    972     m_pLabelCPUExecCapMax->setObjectName(QStringLiteral("m_pLabelCPUExecCapMax"));
    973     pHBoxLayout3->addWidget(m_pLabelCPUExecCapMax);
    974     pVBoxLayout2->addLayout(pHBoxLayout3);
    975     pGridLayout1->addLayout(pVBoxLayout2, 2, 1, 2, 1);
    976 
    977     m_pEditorCPUExecCap = new QSpinBox(m_pTabCPU);
    978     m_pEditorCPUExecCap->setObjectName(QStringLiteral("m_pEditorCPUExecCap"));
    979     pGridLayout1->addWidget(m_pEditorCPUExecCap, 2, 2, 1, 1);
    980 
    981     m_pLabelCPUExtended = new QLabel(m_pTabCPU);
    982     m_pLabelCPUExtended->setObjectName(QStringLiteral("m_pLabelCPUExtended"));
    983     m_pLabelCPUExtended->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    984     pGridLayout1->addWidget(m_pLabelCPUExtended, 4, 0, 1, 1);
    985 
    986     m_pCheckBoxPAE = new QCheckBox(m_pTabCPU);
    987     m_pCheckBoxPAE->setObjectName(QStringLiteral("m_pCheckBoxPAE"));
    988     pGridLayout1->addWidget(m_pCheckBoxPAE, 4, 1, 1, 2);
    989 
    990     m_pCheckBoxNestedVirtualization = new QCheckBox(m_pTabCPU);
    991     m_pCheckBoxNestedVirtualization->setObjectName(QStringLiteral("m_pCheckBoxNestedVirtualization"));
    992     pGridLayout1->addWidget(m_pCheckBoxNestedVirtualization, 5, 1, 1, 2);
    993     QSpacerItem *pSpacerVertical3 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
    994     pGridLayout1->addItem(pSpacerVertical3, 6, 0, 1, 3);
    995 
    996     m_pTabWidgetSystem->addTab(m_pTabCPU, QString());
    997     m_pTabAcceleration = new QWidget();
    998     m_pTabAcceleration->setObjectName(QStringLiteral("m_pTabAcceleration"));
    999     QGridLayout *pGridLayout2 = new QGridLayout(m_pTabAcceleration);
    1000     pGridLayout2->setObjectName(QStringLiteral("pGridLayout2"));
    1001     m_pLabelParavirtProvider = new QLabel(m_pTabAcceleration);
    1002     m_pLabelParavirtProvider->setObjectName(QStringLiteral("m_pLabelParavirtProvider"));
    1003     m_pLabelParavirtProvider->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    1004     pGridLayout2->addWidget(m_pLabelParavirtProvider, 0, 0, 1, 1);
    1005 
    1006     QHBoxLayout *pHBoxLayout4 = new QHBoxLayout();
    1007     pHBoxLayout4->setObjectName(QStringLiteral("pHBoxLayout4"));
    1008     m_pComboParavirtProviderType = new QComboBox(m_pTabAcceleration);
    1009     m_pComboParavirtProviderType->setObjectName(QStringLiteral("m_pComboParavirtProviderType"));
    1010     sizePolicy2.setHeightForWidth(m_pComboParavirtProviderType->sizePolicy().hasHeightForWidth());
    1011     m_pComboParavirtProviderType->setSizePolicy(sizePolicy2);
    1012     pHBoxLayout4->addWidget(m_pComboParavirtProviderType);
    1013     QSpacerItem *pSpacerHorizontal7 = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
    1014     pHBoxLayout4->addItem(pSpacerHorizontal7);
    1015     pGridLayout2->addLayout(pHBoxLayout4, 0, 1, 1, 1);
    1016 
    1017     QVBoxLayout *pVerticalLayout1 = new QVBoxLayout();
    1018     pVerticalLayout1->setObjectName(QStringLiteral("pVerticalLayout1"));
    1019     m_pLabelVirtualization = new QLabel(m_pTabAcceleration);
    1020     m_pLabelVirtualization->setObjectName(QStringLiteral("m_pLabelVirtualization"));
    1021     m_pLabelVirtualization->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
    1022     pVerticalLayout1->addWidget(m_pLabelVirtualization);
    1023 
    1024     m_pWidgetPlaceholder = new QWidget(m_pTabAcceleration);
    1025     m_pWidgetPlaceholder->setObjectName(QStringLiteral("m_pWidgetPlaceholder"));
    1026     pVerticalLayout1->addWidget(m_pWidgetPlaceholder);
    1027     pGridLayout2->addLayout(pVerticalLayout1, 1, 0, 1, 1);
    1028 
    1029     QVBoxLayout *pVerticalLayout2 = new QVBoxLayout();
    1030     pVerticalLayout2->setObjectName(QStringLiteral("pVerticalLayout2"));
    1031     m_pCheckBoxVirtualization = new QCheckBox(m_pTabAcceleration);
    1032     m_pCheckBoxVirtualization->setObjectName(QStringLiteral("m_pCheckBoxVirtualization"));
    1033     QSizePolicy sizePolicy3(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
    1034     sizePolicy3.setHorizontalStretch(1);
    1035     sizePolicy3.setVerticalStretch(0);
    1036     sizePolicy3.setHeightForWidth(m_pCheckBoxVirtualization->sizePolicy().hasHeightForWidth());
    1037     m_pCheckBoxVirtualization->setSizePolicy(sizePolicy3);
    1038     pVerticalLayout2->addWidget(m_pCheckBoxVirtualization);
    1039 
    1040     m_pCheckBoxNestedPaging = new QCheckBox(m_pTabAcceleration);
    1041     m_pCheckBoxNestedPaging->setObjectName(QStringLiteral("m_pCheckBoxNestedPaging"));
    1042     QSizePolicy sizePolicy4(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
    1043     sizePolicy4.setHorizontalStretch(0);
    1044     sizePolicy4.setVerticalStretch(0);
    1045     sizePolicy4.setHeightForWidth(m_pCheckBoxNestedPaging->sizePolicy().hasHeightForWidth());
    1046     m_pCheckBoxNestedPaging->setSizePolicy(sizePolicy4);
    1047     pVerticalLayout2->addWidget(m_pCheckBoxNestedPaging);
    1048     pGridLayout2->addLayout(pVerticalLayout2, 1, 1, 1, 1);
    1049 
    1050     QSpacerItem *pSpacerVertical4 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
    1051     pGridLayout2->addItem(pSpacerVertical4, 2, 0, 1, 2);
    1052 
    1053     m_pTabWidgetSystem->addTab(m_pTabAcceleration, QString());
    1054     pMainLayout->addWidget(m_pTabWidgetSystem);
    1055 
    1056     m_pBootOrderLabel->setBuddy(m_pBootOrderEditor);
    1057     m_pLabelChipsetType->setBuddy(m_pComboChipsetType);
    1058     m_pLabelPointingHIDType->setBuddy(m_pComboPointingHIDType);
    1059     m_pLabelCPUCount->setBuddy(m_pEditorCPUCount);
    1060     m_pLabelCPUExecCap->setBuddy(m_pEditorCPUExecCap);
    1061     m_pLabelParavirtProvider->setBuddy(m_pComboParavirtProviderType);
     820    /* Prepare main layout: */
     821    QVBoxLayout *pLayoutMain = new QVBoxLayout(this);
     822    if (pLayoutMain)
     823    {
     824        /* Prepare tab-widget: */
     825        m_pTabWidget = new QITabWidget();
     826        if (m_pTabWidget)
     827        {
     828            /* Prepare each tab separately: */
     829            prepareTabMotherboard();
     830            prepareTabProcessor();
     831            prepareTabAcceleration();
     832            prepareConnections();
     833
     834            pLayoutMain->addWidget(m_pTabWidget);
     835        }
     836    }
    1062837}
    1063838
    1064839void UIMachineSettingsSystem::prepareTabMotherboard()
    1065840{
    1066     /* Tab and it's layout created in the .ui file. */
    1067     {
    1068         /* Base-memory label and editor created in the .ui file. */
    1069         AssertPtrReturnVoid(m_pBaseMemoryLabel);
    1070         AssertPtrReturnVoid(m_pBaseMemoryEditor);
    1071         {
    1072             /* Configure label & editor: */
    1073             m_pBaseMemoryLabel->setBuddy(m_pBaseMemoryEditor->focusProxy());
    1074         }
    1075 
    1076         /* Boot-order label and editor created in the .ui file. */
    1077         AssertPtrReturnVoid(m_pBootOrderLabel);
    1078         AssertPtrReturnVoid(m_pBootOrderEditor);
    1079         {
    1080             /* Configure label & editor: */
    1081             m_pBootOrderLabel->setBuddy(m_pBootOrderEditor->focusProxy());
    1082         }
    1083 
    1084         /* Chipset Type combo-box created in the .ui file. */
    1085         AssertPtrReturnVoid(m_pComboChipsetType);
    1086         {
    1087             /* Configure combo-box: */
    1088             m_pComboChipsetType->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    1089         }
    1090 
    1091         /* Pointing HID Type combo-box created in the .ui file. */
    1092         AssertPtrReturnVoid(m_pComboPointingHIDType);
    1093         {
    1094             /* Configure combo-box: */
    1095             m_pComboPointingHIDType->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    1096         }
     841    /* Prepare Motherboard tab: */
     842    m_pTabMotherboard = new QWidget;
     843    if (m_pTabMotherboard)
     844    {
     845        /* Prepare Motherboard tab layout: */
     846        QGridLayout *pLayoutMotherboard = new QGridLayout(m_pTabMotherboard);
     847        if (pLayoutMotherboard)
     848        {
     849            pLayoutMotherboard->setColumnStretch(4, 1);
     850            pLayoutMotherboard->setRowStretch(9, 1);
     851
     852            /* Prepare base memory label: */
     853            m_pLabelBaseMemory = new QLabel(m_pTabMotherboard);
     854            if (m_pLabelBaseMemory)
     855            {
     856                m_pLabelBaseMemory->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     857                pLayoutMotherboard->addWidget(m_pLabelBaseMemory, 0, 0);
     858            }
     859            /* Prepare base memory editor: */
     860            m_pEditorBaseMemory = new UIBaseMemoryEditor(m_pTabMotherboard);
     861            if (m_pEditorBaseMemory)
     862            {
     863                m_pLabelBaseMemory->setBuddy(m_pEditorBaseMemory->focusProxy());
     864                m_pEditorBaseMemory->setSizePolicy(QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed));
     865
     866                pLayoutMotherboard->addWidget(m_pEditorBaseMemory, 0, 1, 2, 4);
     867            }
     868
     869            /* Prepare boot order label: */
     870            m_pLabelBootOrder = new QLabel(m_pTabMotherboard);
     871            if (m_pLabelBootOrder)
     872            {
     873                m_pLabelBootOrder->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     874                pLayoutMotherboard->addWidget(m_pLabelBootOrder, 2, 0);
     875            }
     876            /* Prepare boot order editor: */
     877            m_pEditorBootOrder = new UIBootOrderEditor(m_pTabMotherboard);
     878            if (m_pEditorBootOrder)
     879            {
     880                m_pLabelBootOrder->setBuddy(m_pEditorBootOrder->focusProxy());
     881                m_pEditorBootOrder->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     882
     883                pLayoutMotherboard->addWidget(m_pEditorBootOrder, 2, 1, 2, 2);
     884            }
     885
     886            /* Prepare chipset label: */
     887            m_pLabelChipset = new QLabel(m_pTabMotherboard);
     888            if (m_pLabelChipset)
     889            {
     890                m_pLabelChipset->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     891                pLayoutMotherboard->addWidget(m_pLabelChipset, 4, 0);
     892            }
     893            /* Prepare chipset combo: */
     894            m_pComboChipset = new QComboBox(m_pTabMotherboard);
     895            if (m_pComboChipset)
     896            {
     897                m_pLabelChipset->setBuddy(m_pComboChipset);
     898                m_pComboChipset->setSizeAdjustPolicy(QComboBox::AdjustToContents);
     899                m_pComboChipset->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     900
     901                pLayoutMotherboard->addWidget(m_pComboChipset, 4, 1);
     902            }
     903
     904            /* Prepare pointing HID label: */
     905            m_pLabelPointingHID = new QLabel(m_pTabMotherboard);
     906            if (m_pLabelPointingHID)
     907            {
     908                m_pLabelPointingHID->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     909                pLayoutMotherboard->addWidget(m_pLabelPointingHID, 5, 0);
     910            }
     911            /* Prepare pointing HID combo: */
     912            m_pComboPointingHID = new QComboBox(m_pTabMotherboard);
     913            if (m_pComboPointingHID)
     914            {
     915                m_pLabelPointingHID->setBuddy(m_pComboPointingHID);
     916                m_pComboPointingHID->setSizeAdjustPolicy(QComboBox::AdjustToContents);
     917                m_pComboPointingHID->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     918
     919                pLayoutMotherboard->addWidget(m_pComboPointingHID, 5, 1);
     920            }
     921
     922            /* Prepare extended motherboard label: */
     923            m_pLabelExtendedMotherboard = new QLabel(m_pTabMotherboard);
     924            if (m_pLabelExtendedMotherboard)
     925            {
     926                m_pLabelExtendedMotherboard->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     927                pLayoutMotherboard->addWidget(m_pLabelExtendedMotherboard, 6, 0);
     928            }
     929            /* Prepare APIC check-box: */
     930            m_pCheckBoxAPIC = new QCheckBox(m_pTabMotherboard);
     931            if (m_pCheckBoxAPIC)
     932            {
     933                m_pCheckBoxAPIC->setObjectName(QStringLiteral("m_pCheckBoxAPIC"));
     934                pLayoutMotherboard->addWidget(m_pCheckBoxAPIC, 6, 1, 1, 3);
     935            }
     936            /* Prepare EFI check-box: */
     937            m_pCheckBoxEFI = new QCheckBox(m_pTabMotherboard);
     938            if (m_pCheckBoxEFI)
     939            {
     940                m_pCheckBoxEFI->setObjectName(QStringLiteral("m_pCheckBoxEFI"));
     941                pLayoutMotherboard->addWidget(m_pCheckBoxEFI, 7, 1, 1, 3);
     942            }
     943            /* Prepare UTC check-box: */
     944            m_pCheckBoxUTC = new QCheckBox(m_pTabMotherboard);
     945            if (m_pCheckBoxUTC)
     946            {
     947                m_pCheckBoxUTC->setObjectName(QStringLiteral("m_pCheckBoxUTC"));
     948                pLayoutMotherboard->addWidget(m_pCheckBoxUTC, 8, 1, 1, 3);
     949            }
     950        }
     951
     952        m_pTabWidget->addTab(m_pTabMotherboard, QString());
    1097953    }
    1098954}
     
    1101957{
    1102958    /* Prepare common variables: */
    1103     const CSystemProperties properties = uiCommon().virtualBox().GetSystemProperties();
     959    const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
    1104960    const uint uHostCPUs = uiCommon().host().GetProcessorOnlineCoreCount();
    1105     m_uMinGuestCPU = properties.GetMinGuestCPUCount();
    1106     m_uMaxGuestCPU = qMin(2 * uHostCPUs, (uint)properties.GetMaxGuestCPUCount());
     961    m_uMinGuestCPU = comProperties.GetMinGuestCPUCount();
     962    m_uMaxGuestCPU = qMin(2 * uHostCPUs, (uint)comProperties.GetMaxGuestCPUCount());
    1107963    m_uMinGuestCPUExecCap = 1;
    1108964    m_uMedGuestCPUExecCap = 40;
    1109965    m_uMaxGuestCPUExecCap = 100;
    1110966
    1111     /* Tab and it's layout created in the .ui file. */
    1112     {
    1113         /* CPU-count slider created in the .ui file. */
    1114         AssertPtrReturnVoid(m_pSliderCPUCount);
    1115         {
    1116             /* Configure slider: */
    1117             m_pSliderCPUCount->setPageStep(1);
    1118             m_pSliderCPUCount->setSingleStep(1);
    1119             m_pSliderCPUCount->setTickInterval(1);
    1120             m_pSliderCPUCount->setMinimum(m_uMinGuestCPU);
    1121             m_pSliderCPUCount->setMaximum(m_uMaxGuestCPU);
    1122             m_pSliderCPUCount->setOptimalHint(1, uHostCPUs);
    1123             m_pSliderCPUCount->setWarningHint(uHostCPUs, m_uMaxGuestCPU);
    1124         }
    1125 
    1126         /* CPU-count editor created in the .ui file. */
    1127         AssertPtrReturnVoid(m_pEditorCPUCount);
    1128         {
    1129             /* Configure editor: */
    1130             m_pEditorCPUCount->setMinimum(m_uMinGuestCPU);
    1131             m_pEditorCPUCount->setMaximum(m_uMaxGuestCPU);
    1132             uiCommon().setMinimumWidthAccordingSymbolCount(m_pEditorCPUCount, 4);
    1133         }
    1134 
    1135         /* CPU-execution-cap slider created in the .ui file. */
    1136         AssertPtrReturnVoid(m_pSliderCPUExecCap);
    1137         {
    1138             /* Configure slider: */
    1139             m_pSliderCPUExecCap->setPageStep(10);
    1140             m_pSliderCPUExecCap->setSingleStep(1);
    1141             m_pSliderCPUExecCap->setTickInterval(10);
    1142             /* Setup the scale so that ticks are at page step boundaries: */
    1143             m_pSliderCPUExecCap->setMinimum(m_uMinGuestCPUExecCap);
    1144             m_pSliderCPUExecCap->setMaximum(m_uMaxGuestCPUExecCap);
    1145             m_pSliderCPUExecCap->setWarningHint(m_uMinGuestCPUExecCap, m_uMedGuestCPUExecCap);
    1146             m_pSliderCPUExecCap->setOptimalHint(m_uMedGuestCPUExecCap, m_uMaxGuestCPUExecCap);
    1147         }
    1148 
    1149         /* CPU-execution-cap editor created in the .ui file. */
    1150         AssertPtrReturnVoid(m_pEditorCPUExecCap);
    1151         {
    1152             /* Configure editor: */
    1153             m_pEditorCPUExecCap->setMinimum(m_uMinGuestCPUExecCap);
    1154             m_pEditorCPUExecCap->setMaximum(m_uMaxGuestCPUExecCap);
    1155             uiCommon().setMinimumWidthAccordingSymbolCount(m_pEditorCPUExecCap, 4);
    1156         }
     967    /* Prepare Processor tab: */
     968    m_pTabProcessor = new QWidget;
     969    if (m_pTabProcessor)
     970    {
     971        /* Prepare Processor tab layout: */
     972        QGridLayout *pLayoutProcessor = new QGridLayout(m_pTabProcessor);
     973        if (pLayoutProcessor)
     974        {
     975            pLayoutProcessor->setRowStretch(6, 1);
     976
     977            /* Prepare processor count label: */
     978            m_pLabelProcessorCount = new QLabel(m_pTabProcessor);
     979            if (m_pLabelProcessorCount)
     980            {
     981                m_pLabelProcessorCount->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     982                pLayoutProcessor->addWidget(m_pLabelProcessorCount, 0, 0);
     983            }
     984            /* Prepare processor count layout: */
     985            QVBoxLayout *pLayoutProcessorCount = new QVBoxLayout;
     986            if (pLayoutProcessorCount)
     987            {
     988                pLayoutProcessorCount->setContentsMargins(0, 0, 0, 0);
     989
     990                /* Prepare processor count slider: */
     991                m_pSliderProcessorCount = new QIAdvancedSlider(m_pTabProcessor);
     992                if (m_pSliderProcessorCount)
     993                {
     994                    m_pSliderProcessorCount->setOrientation(Qt::Horizontal);
     995                    m_pSliderProcessorCount->setPageStep(1);
     996                    m_pSliderProcessorCount->setSingleStep(1);
     997                    m_pSliderProcessorCount->setTickInterval(1);
     998                    m_pSliderProcessorCount->setMinimum(m_uMinGuestCPU);
     999                    m_pSliderProcessorCount->setMaximum(m_uMaxGuestCPU);
     1000                    m_pSliderProcessorCount->setOptimalHint(1, uHostCPUs);
     1001                    m_pSliderProcessorCount->setWarningHint(uHostCPUs, m_uMaxGuestCPU);
     1002
     1003                    pLayoutProcessorCount->addWidget(m_pSliderProcessorCount);
     1004                }
     1005                /* Prepare processor count scale layout: */
     1006                QHBoxLayout *m_pLayoutProcessorCountScale = new QHBoxLayout;
     1007                if (m_pLayoutProcessorCountScale)
     1008                {
     1009                    m_pLayoutProcessorCountScale->setSpacing(0);
     1010
     1011                    /* Prepare processor count min label: */
     1012                    m_pLabelProcessorCountMin = new QLabel(m_pTabProcessor);
     1013                    if (m_pLabelProcessorCountMin)
     1014                        m_pLayoutProcessorCountScale->addWidget(m_pLabelProcessorCountMin);
     1015                    m_pLayoutProcessorCountScale->addStretch();
     1016                    /* Prepare processor count max label: */
     1017                    m_pLabelProcessorCountMax = new QLabel(m_pTabProcessor);
     1018                    if (m_pLabelProcessorCountMax)
     1019                        m_pLayoutProcessorCountScale->addWidget(m_pLabelProcessorCountMax);
     1020
     1021                    pLayoutProcessorCount->addLayout(m_pLayoutProcessorCountScale);
     1022                }
     1023
     1024                pLayoutProcessor->addLayout(pLayoutProcessorCount, 0, 1, 2, 1);
     1025            }
     1026            /* Prepare processor count spinbox: */
     1027            m_pSpinboxProcessorCount = new QSpinBox(m_pTabProcessor);
     1028            if (m_pSpinboxProcessorCount)
     1029            {
     1030                m_pLabelProcessorCount->setBuddy(m_pSpinboxProcessorCount);
     1031                m_pSpinboxProcessorCount->setMinimum(m_uMinGuestCPU);
     1032                m_pSpinboxProcessorCount->setMaximum(m_uMaxGuestCPU);
     1033                uiCommon().setMinimumWidthAccordingSymbolCount(m_pSpinboxProcessorCount, 4);
     1034
     1035                pLayoutProcessor->addWidget(m_pSpinboxProcessorCount, 0, 2);
     1036            }
     1037
     1038            /* Prepare processor exec cap label: */
     1039            m_pLabelProcessorExecCap = new QLabel(m_pTabProcessor);
     1040            if (m_pLabelProcessorExecCap)
     1041            {
     1042                m_pLabelProcessorExecCap->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     1043                pLayoutProcessor->addWidget(m_pLabelProcessorExecCap, 2, 0);
     1044            }
     1045            /* Prepare processor exec cap layout: */
     1046            QVBoxLayout *pLayoutProcessorExecCap = new QVBoxLayout;
     1047            if (pLayoutProcessorExecCap)
     1048            {
     1049                pLayoutProcessorExecCap->setContentsMargins(0, 0, 0, 0);
     1050
     1051                /* Prepare processor exec cap slider: */
     1052                m_pSliderProcessorExecCap = new QIAdvancedSlider(m_pTabProcessor);
     1053                if (m_pSliderProcessorExecCap)
     1054                {
     1055                    m_pSliderProcessorExecCap->setOrientation(Qt::Horizontal);
     1056                    m_pSliderProcessorExecCap->setPageStep(10);
     1057                    m_pSliderProcessorExecCap->setSingleStep(1);
     1058                    m_pSliderProcessorExecCap->setTickInterval(10);
     1059                    m_pSliderProcessorExecCap->setMinimum(m_uMinGuestCPUExecCap);
     1060                    m_pSliderProcessorExecCap->setMaximum(m_uMaxGuestCPUExecCap);
     1061                    m_pSliderProcessorExecCap->setWarningHint(m_uMinGuestCPUExecCap, m_uMedGuestCPUExecCap);
     1062                    m_pSliderProcessorExecCap->setOptimalHint(m_uMedGuestCPUExecCap, m_uMaxGuestCPUExecCap);
     1063
     1064                    pLayoutProcessorExecCap->addWidget(m_pSliderProcessorExecCap);
     1065                }
     1066                /* Prepare processor exec cap scale layout: */
     1067                QHBoxLayout *m_pLayoutProcessorExecCapScale = new QHBoxLayout;
     1068                if (m_pLayoutProcessorExecCapScale)
     1069                {
     1070                    m_pLayoutProcessorExecCapScale->setSpacing(0);
     1071
     1072                    /* Prepare processor exec cap min label: */
     1073                    m_pLabelProcessorExecCapMin = new QLabel(m_pTabProcessor);
     1074                    if (m_pLabelProcessorExecCapMin)
     1075                        m_pLayoutProcessorExecCapScale->addWidget(m_pLabelProcessorExecCapMin);
     1076                    m_pLayoutProcessorExecCapScale->addStretch();
     1077                    /* Prepare processor exec cap max label: */
     1078                    m_pLabelProcessorExecCapMax = new QLabel(m_pTabProcessor);
     1079                    if (m_pLabelProcessorExecCapMax)
     1080                        m_pLayoutProcessorExecCapScale->addWidget(m_pLabelProcessorExecCapMax);
     1081
     1082                    pLayoutProcessorExecCap->addLayout(m_pLayoutProcessorExecCapScale);
     1083                }
     1084
     1085                pLayoutProcessor->addLayout(pLayoutProcessorExecCap, 2, 1, 2, 1);
     1086            }
     1087            /* Prepare processor exec cap spinbox: */
     1088            m_pSpinboxProcessorExecCap = new QSpinBox(m_pTabProcessor);
     1089            if (m_pSpinboxProcessorExecCap)
     1090            {
     1091                m_pLabelProcessorExecCap->setBuddy(m_pSpinboxProcessorExecCap);
     1092                m_pSpinboxProcessorExecCap->setMinimum(m_uMinGuestCPUExecCap);
     1093                m_pSpinboxProcessorExecCap->setMaximum(m_uMaxGuestCPUExecCap);
     1094                uiCommon().setMinimumWidthAccordingSymbolCount(m_pSpinboxProcessorExecCap, 4);
     1095
     1096                pLayoutProcessor->addWidget(m_pSpinboxProcessorExecCap, 2, 2);
     1097            }
     1098
     1099            /* Prepare extended processor label: */
     1100            m_pLabelExtendedProcessor = new QLabel(m_pTabProcessor);
     1101            if (m_pLabelExtendedProcessor)
     1102            {
     1103                m_pLabelExtendedProcessor->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     1104                pLayoutProcessor->addWidget(m_pLabelExtendedProcessor, 4, 0);
     1105            }
     1106            /* Prepare PAE check-box: */
     1107            m_pCheckBoxPAE = new QCheckBox(m_pTabProcessor);
     1108            if (m_pCheckBoxPAE)
     1109                pLayoutProcessor->addWidget(m_pCheckBoxPAE, 4, 1, 1, 2);
     1110            /* Prepare nested virtualization check-box: */
     1111            m_pCheckBoxNestedVirtualization = new QCheckBox(m_pTabProcessor);
     1112            if (m_pCheckBoxNestedVirtualization)
     1113                pLayoutProcessor->addWidget(m_pCheckBoxNestedVirtualization, 5, 1, 1, 2);
     1114        }
     1115
     1116        m_pTabWidget->addTab(m_pTabProcessor, QString());
    11571117    }
    11581118}
     
    11601120void UIMachineSettingsSystem::prepareTabAcceleration()
    11611121{
    1162     /* Tab and it's layout created in the .ui file. */
    1163     {
    1164         /* Other widgets created in the .ui file. */
    1165         AssertPtrReturnVoid(m_pWidgetPlaceholder);
    1166         AssertPtrReturnVoid(m_pCheckBoxVirtualization);
    1167         {
    1168             /* Configure widgets: */
     1122    /* Prepare Acceleration tab: */
     1123    m_pTabAcceleration = new QWidget;
     1124    if (m_pTabAcceleration)
     1125    {
     1126        /* Prepare Acceleration tab layout: */
     1127        QGridLayout *pLayoutAcceleration = new QGridLayout(m_pTabAcceleration);
     1128        if (pLayoutAcceleration)
     1129        {
     1130            pLayoutAcceleration->setColumnStretch(2, 1);
     1131            pLayoutAcceleration->setRowStretch(3, 1);
     1132
     1133            /* Prepare paravirtualization provider label: */
     1134            m_pLabelParavirtProvider = new QLabel(m_pTabAcceleration);
     1135            if (m_pLabelParavirtProvider)
     1136            {
     1137                m_pLabelParavirtProvider->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     1138                pLayoutAcceleration->addWidget(m_pLabelParavirtProvider, 0, 0);
     1139            }
     1140            /* Prepare paravirtualization provider combo: */
     1141            m_pComboParavirtProvider = new QComboBox(m_pTabAcceleration);
     1142            if (m_pComboParavirtProvider)
     1143            {
     1144                m_pLabelParavirtProvider->setBuddy(m_pComboParavirtProvider);
     1145                m_pComboParavirtProvider->setSizeAdjustPolicy(QComboBox::AdjustToContents);
     1146                m_pComboParavirtProvider->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
     1147
     1148                pLayoutAcceleration->addWidget(m_pComboParavirtProvider, 0, 1);
     1149            }
     1150
     1151            /* Prepare virtualization label layout: */
     1152            QVBoxLayout *pLayoutVirtualizationLabel = new QVBoxLayout;
     1153            if (pLayoutVirtualizationLabel)
     1154            {
     1155                /* Prepare virtualization label: */
     1156                m_pLabelVirtualization = new QLabel(m_pTabAcceleration);
     1157                if (m_pLabelVirtualization)
     1158                {
     1159                    m_pLabelVirtualization->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
     1160                    pLayoutVirtualizationLabel->addWidget(m_pLabelVirtualization);
     1161                }
     1162                /* Prepare placeholder: */
     1163                QWidget *pWidgetPlaceholder = new QWidget(m_pTabAcceleration);
     1164                if (pWidgetPlaceholder)
     1165                {
    11691166#ifndef VBOX_WITH_RAW_MODE
    1170             /* Hide HW Virt Ex checkbox when raw-mode is not supported: */
    1171             m_pWidgetPlaceholder->setVisible(false);
    1172             m_pCheckBoxVirtualization->setVisible(false);
     1167                    /* Hide placeholder when raw-mode is not supported: */
     1168                    pWidgetPlaceholder->setVisible(false);
    11731169#endif
     1170
     1171                    pLayoutVirtualizationLabel->addWidget(pWidgetPlaceholder);
     1172                }
     1173
     1174                pLayoutAcceleration->addLayout(pLayoutVirtualizationLabel, 1, 0);
     1175            }
     1176            /* Prepare virtualization stuff layout: */
     1177            QVBoxLayout *pLayoutVirtualizationStuff = new QVBoxLayout;
     1178            if (pLayoutVirtualizationStuff)
     1179            {
     1180                /* Prepare virtualization check-box: */
     1181                m_pCheckBoxVirtualization = new QCheckBox(m_pTabAcceleration);
     1182                if (m_pCheckBoxVirtualization)
     1183                {
     1184#ifndef VBOX_WITH_RAW_MODE
     1185                    /* Hide HW Virt Ex checkbox when raw-mode is not supported: */
     1186                    m_pCheckBoxVirtualization->setVisible(false);
     1187#endif
     1188
     1189                    pLayoutVirtualizationStuff->addWidget(m_pCheckBoxVirtualization);
     1190                }
     1191                /* Prepare nested paging check-box: */
     1192                m_pCheckBoxNestedPaging = new QCheckBox(m_pTabAcceleration);
     1193                if (m_pCheckBoxNestedPaging)
     1194                    pLayoutVirtualizationStuff->addWidget(m_pCheckBoxNestedPaging);
     1195
     1196                pLayoutAcceleration->addLayout(pLayoutVirtualizationStuff, 1, 1);
     1197            }
     1198
     1199            m_pTabWidget->addTab(m_pTabAcceleration, QString());
    11741200        }
    11751201    }
     
    11791205{
    11801206    /* Configure 'Motherboard' connections: */
    1181     connect(m_pComboChipsetType, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
     1207    connect(m_pComboChipset, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    11821208            this, &UIMachineSettingsSystem::revalidate);
    1183     connect(m_pComboPointingHIDType, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
     1209    connect(m_pComboPointingHID, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    11841210            this, &UIMachineSettingsSystem::revalidate);
    1185     connect(m_pBaseMemoryEditor, &UIBaseMemoryEditor::sigValidChanged, this, &UIMachineSettingsSystem::revalidate);
    1186     connect(m_pCheckBoxApic, &QCheckBox::stateChanged, this, &UIMachineSettingsSystem::revalidate);
     1211    connect(m_pEditorBaseMemory, &UIBaseMemoryEditor::sigValidChanged, this, &UIMachineSettingsSystem::revalidate);
     1212    connect(m_pCheckBoxAPIC, &QCheckBox::stateChanged, this, &UIMachineSettingsSystem::revalidate);
    11871213
    11881214    /* Configure 'Processor' connections: */
    1189     connect(m_pSliderCPUCount, &QIAdvancedSlider::valueChanged, this, &UIMachineSettingsSystem::sltHandleCPUCountSliderChange);
    1190     connect(m_pEditorCPUCount, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
     1215    connect(m_pSliderProcessorCount, &QIAdvancedSlider::valueChanged, this, &UIMachineSettingsSystem::sltHandleCPUCountSliderChange);
     1216    connect(m_pSpinboxProcessorCount, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
    11911217            this, &UIMachineSettingsSystem::sltHandleCPUCountEditorChange);
    1192     connect(m_pSliderCPUExecCap, &QIAdvancedSlider::valueChanged, this, &UIMachineSettingsSystem::sltHandleCPUExecCapSliderChange);
    1193     connect(m_pEditorCPUExecCap, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
     1218    connect(m_pSliderProcessorExecCap, &QIAdvancedSlider::valueChanged, this, &UIMachineSettingsSystem::sltHandleCPUExecCapSliderChange);
     1219    connect(m_pSpinboxProcessorExecCap, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
    11941220            this, &UIMachineSettingsSystem::sltHandleCPUExecCapEditorChange);
    11951221    connect(m_pCheckBoxNestedVirtualization, &QCheckBox::stateChanged, this, &UIMachineSettingsSystem::revalidate);
     
    12121238{
    12131239    /* Chipset Type combo-box created in the .ui file. */
    1214     AssertPtrReturnVoid(m_pComboChipsetType);
     1240    AssertPtrReturnVoid(m_pComboChipset);
    12151241    {
    12161242        /* Clear combo first of all: */
    1217         m_pComboChipsetType->clear();
     1243        m_pComboChipset->clear();
    12181244
    12191245        /* Load currently supported chipset types: */
     
    12271253        /* Populate combo finally: */
    12281254        foreach (const KChipsetType &enmType, chipsetTypes)
    1229             m_pComboChipsetType->addItem(gpConverter->toString(enmType), QVariant::fromValue(enmType));
     1255            m_pComboChipset->addItem(gpConverter->toString(enmType), QVariant::fromValue(enmType));
    12301256    }
    12311257}
     
    12341260{
    12351261    /* Pointing HID Type combo-box created in the .ui file. */
    1236     AssertPtrReturnVoid(m_pComboPointingHIDType);
     1262    AssertPtrReturnVoid(m_pComboPointingHID);
    12371263    {
    12381264        /* Clear combo first of all: */
    1239         m_pComboPointingHIDType->clear();
     1265        m_pComboPointingHID->clear();
    12401266
    12411267        /* Load currently supported pointing HID types: */
     
    12491275        /* Populate combo finally: */
    12501276        foreach (const KPointingHIDType &enmType, pointingHidTypes)
    1251             m_pComboPointingHIDType->addItem(gpConverter->toString(enmType), QVariant::fromValue(enmType));
     1277            m_pComboPointingHID->addItem(gpConverter->toString(enmType), QVariant::fromValue(enmType));
    12521278    }
    12531279}
     
    12561282{
    12571283    /* Paravirtualization Provider Type combo-box created in the .ui file. */
    1258     AssertPtrReturnVoid(m_pComboParavirtProviderType);
     1284    AssertPtrReturnVoid(m_pComboParavirtProvider);
    12591285    {
    12601286        /* Clear combo first of all: */
    1261         m_pComboParavirtProviderType->clear();
     1287        m_pComboParavirtProvider->clear();
    12621288
    12631289        /* Load currently supported paravirtualization provider types: */
     
    12711297        /* Populate combo finally: */
    12721298        foreach (const KParavirtProvider &enmProvider, supportedProviderTypes)
    1273             m_pComboParavirtProviderType->addItem(gpConverter->toString(enmProvider), QVariant::fromValue(enmProvider));
     1299            m_pComboParavirtProvider->addItem(gpConverter->toString(enmProvider), QVariant::fromValue(enmProvider));
    12741300    }
    12751301}
     
    12771303void UIMachineSettingsSystem::retranslateComboChipsetType()
    12781304{
    1279     /* For each the element in m_pComboChipsetType: */
    1280     for (int iIndex = 0; iIndex < m_pComboChipsetType->count(); ++iIndex)
     1305    /* For each the element in m_pComboChipset: */
     1306    for (int iIndex = 0; iIndex < m_pComboChipset->count(); ++iIndex)
    12811307    {
    12821308        /* Apply retranslated text: */
    1283         const KChipsetType enmType = m_pComboChipsetType->currentData().value<KChipsetType>();
    1284         m_pComboChipsetType->setItemText(iIndex, gpConverter->toString(enmType));
     1309        const KChipsetType enmType = m_pComboChipset->currentData().value<KChipsetType>();
     1310        m_pComboChipset->setItemText(iIndex, gpConverter->toString(enmType));
    12851311    }
    12861312}
     
    12881314void UIMachineSettingsSystem::retranslateComboPointingHIDType()
    12891315{
    1290     /* For each the element in m_pComboPointingHIDType: */
    1291     for (int iIndex = 0; iIndex < m_pComboPointingHIDType->count(); ++iIndex)
     1316    /* For each the element in m_pComboPointingHID: */
     1317    for (int iIndex = 0; iIndex < m_pComboPointingHID->count(); ++iIndex)
    12921318    {
    12931319        /* Apply retranslated text: */
    1294         const KPointingHIDType enmType = m_pComboPointingHIDType->currentData().value<KPointingHIDType>();
    1295         m_pComboPointingHIDType->setItemText(iIndex, gpConverter->toString(enmType));
     1320        const KPointingHIDType enmType = m_pComboPointingHID->currentData().value<KPointingHIDType>();
     1321        m_pComboPointingHID->setItemText(iIndex, gpConverter->toString(enmType));
    12961322    }
    12971323}
     
    12991325void UIMachineSettingsSystem::retranslateComboParavirtProvider()
    13001326{
    1301     /* For each the element in m_pComboParavirtProviderType: */
    1302     for (int iIndex = 0; iIndex < m_pComboParavirtProviderType->count(); ++iIndex)
     1327    /* For each the element in m_pComboParavirtProvider: */
     1328    for (int iIndex = 0; iIndex < m_pComboParavirtProvider->count(); ++iIndex)
    13031329    {
    13041330        /* Apply retranslated text: */
    1305         const KParavirtProvider enmType = m_pComboParavirtProviderType->currentData().value<KParavirtProvider>();
    1306         m_pComboParavirtProviderType->setItemText(iIndex, gpConverter->toString(enmType));
     1331        const KParavirtProvider enmType = m_pComboParavirtProvider->currentData().value<KParavirtProvider>();
     1332        m_pComboParavirtProvider->setItemText(iIndex, gpConverter->toString(enmType));
    13071333    }
    13081334}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h

    r85727 r85839  
    178178    /** @name Widgets
    179179     * @{ */
    180        QLabel *m_pBaseMemoryLabel;
    181        QLabel *m_pBootOrderLabel;
    182        QLabel *m_pLabelChipsetType;
    183        QLabel *m_pLabelPointingHIDType;
    184        QLabel *m_pLabelMotherboardExtended;
    185        QLabel *m_pLabelCPUCount;
    186        QLabel *m_pLabelCPUExecCap;
    187        QLabel *m_pLabelCPUExtended;
    188        QLabel *m_pLabelParavirtProvider;
    189        QLabel *m_pLabelVirtualization;
    190        QLabel *m_pLabelCPUMin;
    191        QLabel *m_pLabelCPUMax;
    192        QLabel *m_pLabelCPUExecCapMin;
    193        QLabel *m_pLabelCPUExecCapMax;
    194        QWidget *m_pTabMotherboard;
    195        QWidget *m_pTabCPU;
    196        QWidget *m_pTabAcceleration;
    197        QWidget *m_pWidgetPlaceholder;
    198        QCheckBox *m_pCheckBoxVirtualization;
    199        QCheckBox *m_pCheckBoxNestedPaging;
    200        QCheckBox *m_pCheckBoxNestedVirtualization;
    201        QCheckBox *m_pCheckBoxApic;
    202        QCheckBox *m_pCheckBoxEFI;
    203        QCheckBox *m_pCheckBoxPAE;
    204        QCheckBox *m_pCheckBoxUseUTC;
    205        QComboBox *m_pComboPointingHIDType;
    206        QComboBox *m_pComboChipsetType;
    207        QComboBox *m_pComboParavirtProviderType;
    208        QIAdvancedSlider *m_pSliderCPUCount;
    209        QIAdvancedSlider *m_pSliderCPUExecCap;
    210        UIBaseMemoryEditor *m_pBaseMemoryEditor;
    211        UIBootOrderEditor *m_pBootOrderEditor;
    212        QITabWidget *m_pTabWidgetSystem;
    213        QSpinBox *m_pEditorCPUCount;
    214        QSpinBox *m_pEditorCPUExecCap;
     180        /** Holds the tab-widget instance. */
     181        QITabWidget *m_pTabWidget;
     182
     183        /** Holds the 'Motherboard' tab instance. */
     184        QWidget            *m_pTabMotherboard;
     185        /** Holds the base memory label instance. */
     186        QLabel             *m_pLabelBaseMemory;
     187        /** Holds the base memory editor instance. */
     188        UIBaseMemoryEditor *m_pEditorBaseMemory;
     189        /** Holds the boot order label instance. */
     190        QLabel             *m_pLabelBootOrder;
     191        /** Holds the boot order editor instance. */
     192        UIBootOrderEditor  *m_pEditorBootOrder;
     193        /** Holds the chipset label instance. */
     194        QLabel             *m_pLabelChipset;
     195        /** Holds the chipset combo instance. */
     196        QComboBox          *m_pComboChipset;
     197        /** Holds the pointing HID label instance. */
     198        QLabel             *m_pLabelPointingHID;
     199        /** Holds the pointing HID combo instance. */
     200        QComboBox          *m_pComboPointingHID;
     201        /** Holds the extended motherboard label instance. */
     202        QLabel             *m_pLabelExtendedMotherboard;
     203        /** Holds the APIC check-box instance. */
     204        QCheckBox          *m_pCheckBoxAPIC;
     205        /** Holds the EFI check-box instance. */
     206        QCheckBox          *m_pCheckBoxEFI;
     207        /** Holds the UTC check-box instance. */
     208        QCheckBox          *m_pCheckBoxUTC;
     209
     210        /** Holds the 'Processor' tab instance. */
     211        QWidget          *m_pTabProcessor;
     212        /** Holds the processor count label instance. */
     213        QLabel           *m_pLabelProcessorCount;
     214        /** Holds the processor count slider instance. */
     215        QIAdvancedSlider *m_pSliderProcessorCount;
     216        /** Holds the processor count spinbox instance. */
     217        QSpinBox         *m_pSpinboxProcessorCount;
     218        /** Holds the processor count min label instance. */
     219        QLabel           *m_pLabelProcessorCountMin;
     220        /** Holds the processor count max label instance. */
     221        QLabel           *m_pLabelProcessorCountMax;
     222        /** Holds the processor exec cap label instance. */
     223        QLabel           *m_pLabelProcessorExecCap;
     224        /** Holds the processor exec cap slider instance. */
     225        QIAdvancedSlider *m_pSliderProcessorExecCap;
     226        /** Holds the processor exec cap spinbox instance. */
     227        QSpinBox         *m_pSpinboxProcessorExecCap;
     228        /** Holds the processor exec cap min label instance. */
     229        QLabel           *m_pLabelProcessorExecCapMin;
     230        /** Holds the processor exec cap max label instance. */
     231        QLabel           *m_pLabelProcessorExecCapMax;
     232        /** Holds the extended processor label instance. */
     233        QLabel           *m_pLabelExtendedProcessor;
     234        /** Holds the PAE check-box instance. */
     235        QCheckBox        *m_pCheckBoxPAE;
     236        /** Holds the nested virtualization check-box instance. */
     237        QCheckBox        *m_pCheckBoxNestedVirtualization;
     238
     239        /** Holds the 'Acceleration' tab instance. */
     240        QWidget   *m_pTabAcceleration;
     241        /** Holds the paravirtualization provider label instance. */
     242        QLabel    *m_pLabelParavirtProvider;
     243        /** Holds the paravirtualization provider combo instance. */
     244        QComboBox *m_pComboParavirtProvider;
     245        /** Holds the virtualization label instance. */
     246        QLabel *m_pLabelVirtualization;
     247        /** Holds the virtualization check-box instance. */
     248        QCheckBox *m_pCheckBoxVirtualization;
     249        /** Holds the nested paging check-box instance. */
     250        QCheckBox *m_pCheckBoxNestedPaging;
    215251   /** @} */
    216252};
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette