- Timestamp:
- Jun 8, 2022 10:16:27 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151741
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 3 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r95213 r95222 893 893 src/settings/UISettingsSelector.h \ 894 894 src/settings/UISettingsSerializer.h \ 895 src/settings/editors/UIAccelerationFeaturesEditor.h \ 895 896 src/settings/editors/UIAudioControllerEditor.h \ 896 897 src/settings/editors/UIAudioFeaturesEditor.h \ … … 1469 1470 src/settings/UISettingsSelector.cpp \ 1470 1471 src/settings/UISettingsSerializer.cpp \ 1472 src/settings/editors/UIAccelerationFeaturesEditor.cpp \ 1471 1473 src/settings/editors/UIAudioControllerEditor.cpp \ 1472 1474 src/settings/editors/UIAudioFeaturesEditor.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAccelerationFeaturesEditor.cpp
r95221 r95222 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI ProcessorFeaturesEditor class implementation.3 * VBox Qt GUI - UIAccelerationFeaturesEditor class implementation. 4 4 */ 5 5 … … 20 20 #include <QGridLayout> 21 21 #include <QLabel> 22 #include <QVBoxLayout> 22 23 23 24 /* GUI includes: */ 24 #include "UI ProcessorFeaturesEditor.h"25 #include "UIAccelerationFeaturesEditor.h" 25 26 26 27 27 UI ProcessorFeaturesEditor::UIProcessorFeaturesEditor(QWidget *pParent /* = 0 */)28 UIAccelerationFeaturesEditor::UIAccelerationFeaturesEditor(QWidget *pParent /* = 0 */) 28 29 : QIWithRetranslateUI<QWidget>(pParent) 29 , m_fEnable Pae(false)30 , m_fEnableNested Virtualization(false)30 , m_fEnableVirtualization(false) 31 , m_fEnableNestedPaging(false) 31 32 , m_pLabel(0) 32 , m_pCheckBoxEnable Pae(0)33 , m_pCheckBoxEnableNested Virtualization(0)33 , m_pCheckBoxEnableVirtualization(0) 34 , m_pCheckBoxEnableNestedPaging(0) 34 35 { 35 36 prepare(); 36 37 } 37 38 38 void UI ProcessorFeaturesEditor::setEnablePae(bool fOn)39 void UIAccelerationFeaturesEditor::setEnableVirtualization(bool fOn) 39 40 { 40 41 /* Update cached value and 41 42 * check-box if value has changed: */ 42 if (m_fEnable Pae!= fOn)43 if (m_fEnableVirtualization != fOn) 43 44 { 44 m_fEnable Pae= fOn;45 if (m_pCheckBoxEnable Pae)46 m_pCheckBoxEnable Pae->setCheckState(m_fEnablePae? Qt::Checked : Qt::Unchecked);45 m_fEnableVirtualization = fOn; 46 if (m_pCheckBoxEnableVirtualization) 47 m_pCheckBoxEnableVirtualization->setCheckState(m_fEnableVirtualization ? Qt::Checked : Qt::Unchecked); 47 48 } 48 49 } 49 50 50 bool UI ProcessorFeaturesEditor::isEnabledPae() const51 bool UIAccelerationFeaturesEditor::isEnabledVirtualization() const 51 52 { 52 return m_pCheckBoxEnable Pae53 ? m_pCheckBoxEnable Pae->checkState() == Qt::Checked54 : m_fEnable Pae;53 return m_pCheckBoxEnableVirtualization 54 ? m_pCheckBoxEnableVirtualization->checkState() == Qt::Checked 55 : m_fEnableVirtualization; 55 56 } 56 57 57 void UI ProcessorFeaturesEditor::setEnablePaeAvailable(bool fAvailable)58 void UIAccelerationFeaturesEditor::setEnableVirtualizationAvailable(bool fAvailable) 58 59 { 59 m_pCheckBoxEnable Pae->setEnabled(fAvailable);60 m_pCheckBoxEnableVirtualization->setEnabled(fAvailable); 60 61 } 61 62 62 void UI ProcessorFeaturesEditor::setEnableNestedVirtualization(bool fOn)63 void UIAccelerationFeaturesEditor::setEnableNestedPaging(bool fOn) 63 64 { 64 65 /* Update cached value and 65 66 * check-box if value has changed: */ 66 if (m_fEnableNested Virtualization!= fOn)67 if (m_fEnableNestedPaging != fOn) 67 68 { 68 m_fEnableNested Virtualization= fOn;69 if (m_pCheckBoxEnableNested Virtualization)70 m_pCheckBoxEnableNested Virtualization->setCheckState(m_fEnableNestedVirtualization? Qt::Checked : Qt::Unchecked);69 m_fEnableNestedPaging = fOn; 70 if (m_pCheckBoxEnableNestedPaging) 71 m_pCheckBoxEnableNestedPaging->setCheckState(m_fEnableNestedPaging ? Qt::Checked : Qt::Unchecked); 71 72 } 72 73 } 73 74 74 bool UI ProcessorFeaturesEditor::isEnabledNestedVirtualization() const75 bool UIAccelerationFeaturesEditor::isEnabledNestedPaging() const 75 76 { 76 return m_pCheckBoxEnableNested Virtualization77 ? m_pCheckBoxEnableNested Virtualization->checkState() == Qt::Checked78 : m_fEnableNested Virtualization;77 return m_pCheckBoxEnableNestedPaging 78 ? m_pCheckBoxEnableNestedPaging->checkState() == Qt::Checked 79 : m_fEnableNestedPaging; 79 80 } 80 81 81 void UI ProcessorFeaturesEditor::setEnableNestedVirtualizationAvailable(bool fAvailable)82 void UIAccelerationFeaturesEditor::setEnableNestedPagingAvailable(bool fAvailable) 82 83 { 83 m_pCheckBoxEnableNested Virtualization->setEnabled(fAvailable);84 m_pCheckBoxEnableNestedPaging->setEnabled(fAvailable); 84 85 } 85 86 86 int UI ProcessorFeaturesEditor::minimumLabelHorizontalHint() const87 int UIAccelerationFeaturesEditor::minimumLabelHorizontalHint() const 87 88 { 88 89 return m_pLabel ? m_pLabel->minimumSizeHint().width() : 0; 89 90 } 90 91 91 void UI ProcessorFeaturesEditor::setMinimumLayoutIndent(int iIndent)92 void UIAccelerationFeaturesEditor::setMinimumLayoutIndent(int iIndent) 92 93 { 93 94 if (m_pLayout) … … 95 96 } 96 97 97 void UI ProcessorFeaturesEditor::retranslateUi()98 void UIAccelerationFeaturesEditor::retranslateUi() 98 99 { 99 100 if (m_pLabel) 100 m_pLabel->setText(tr(" Extended Features:"));101 if (m_pCheckBoxEnable Pae)101 m_pLabel->setText(tr("Hardware Virtualization:")); 102 if (m_pCheckBoxEnableVirtualization) 102 103 { 103 m_pCheckBoxEnable Pae->setText(tr("Enable PA&E/NX"));104 m_pCheckBoxEnable Pae->setToolTip(tr("When checked, the Physical Address Extension (PAE) feature of the host CPU will be"105 "exposed to the virtual machine."));104 m_pCheckBoxEnableVirtualization->setText(tr("Enable &VT-x/AMD-V")); 105 m_pCheckBoxEnableVirtualization->setToolTip(tr("When checked, the virtual machine will try to make use of the host " 106 "CPU's hardware virtualization extensions such as Intel VT-x and AMD-V.")); 106 107 } 107 if (m_pCheckBoxEnableNested Virtualization)108 if (m_pCheckBoxEnableNestedPaging) 108 109 { 109 m_pCheckBoxEnableNested Virtualization->setText(tr("Enable Nested &VT-x/AMD-V"));110 m_pCheckBoxEnableNested Virtualization->setToolTip(tr("When checked, the nested hardware virtualization CPU feature will"111 "be exposed to the virtual machine."));110 m_pCheckBoxEnableNestedPaging->setText(tr("Enable Nested Pa&ging")); 111 m_pCheckBoxEnableNestedPaging->setToolTip(tr("When checked, the virtual machine will try to make use of the nested " 112 "paging extension of Intel VT-x and AMD-V.")); 112 113 } 113 114 } 114 115 115 void UI ProcessorFeaturesEditor::prepare()116 void UIAccelerationFeaturesEditor::prepare() 116 117 { 117 118 /* Prepare main layout: */ … … 122 123 m_pLayout->setColumnStretch(1, 1); 123 124 124 /* Prepare label : */125 m_pLabel = new QLabel(this);126 if ( m_pLabel)125 /* Prepare label layout: */ 126 QVBoxLayout *pLayoutLabel = new QVBoxLayout; 127 if (pLayoutLabel) 127 128 { 128 m_pLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 129 m_pLayout->addWidget(m_pLabel, 0, 0); 129 /* Prepare virtualization label: */ 130 m_pLabel = new QLabel(this); 131 if (m_pLabel) 132 { 133 m_pLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 134 pLayoutLabel->addWidget(m_pLabel); 135 } 136 /* Prepare placeholder: */ 137 QWidget *pWidgetPlaceholder = new QWidget(this); 138 if (pWidgetPlaceholder) 139 { 140 #ifndef VBOX_WITH_RAW_MODE 141 /* Hide placeholder when raw-mode is not supported: */ 142 pWidgetPlaceholder->setVisible(false); 143 #endif 144 pLayoutLabel->addWidget(pWidgetPlaceholder); 145 } 146 147 m_pLayout->addLayout(pLayoutLabel, 0, 0); 130 148 } 131 /* Prepare 'enable PAE' check-box: */ 132 m_pCheckBoxEnablePae = new QCheckBox(this); 133 if (m_pCheckBoxEnablePae) 149 150 /* Prepare widget layout: */ 151 QVBoxLayout *pLayoutWidget = new QVBoxLayout; 152 if (pLayoutWidget) 134 153 { 135 connect(m_pCheckBoxEnablePae, &QCheckBox::stateChanged, 136 this, &UIProcessorFeaturesEditor::sigChangedPae); 137 m_pLayout->addWidget(m_pCheckBoxEnablePae, 0, 1); 138 } 139 /* Prepare 'enable nested virtualization' check-box: */ 140 m_pCheckBoxEnableNestedVirtualization = new QCheckBox(this); 141 if (m_pCheckBoxEnableNestedVirtualization) 142 { 143 connect(m_pCheckBoxEnableNestedVirtualization, &QCheckBox::stateChanged, 144 this, &UIProcessorFeaturesEditor::sigChangedNestedVirtualization); 145 m_pLayout->addWidget(m_pCheckBoxEnableNestedVirtualization, 1, 1); 154 /* Prepare 'enable PAE' check-box: */ 155 m_pCheckBoxEnableVirtualization = new QCheckBox(this); 156 if (m_pCheckBoxEnableVirtualization) 157 { 158 #ifndef VBOX_WITH_RAW_MODE 159 /* Hide check-box when raw-mode is not supported: */ 160 m_pCheckBoxEnableVirtualization->setVisible(false); 161 #endif 162 connect(m_pCheckBoxEnableVirtualization, &QCheckBox::stateChanged, 163 this, &UIAccelerationFeaturesEditor::sigChangedVirtualization); 164 pLayoutWidget->addWidget(m_pCheckBoxEnableVirtualization); 165 } 166 /* Prepare 'enable nested virtualization' check-box: */ 167 m_pCheckBoxEnableNestedPaging = new QCheckBox(this); 168 if (m_pCheckBoxEnableNestedPaging) 169 { 170 connect(m_pCheckBoxEnableNestedPaging, &QCheckBox::stateChanged, 171 this, &UIAccelerationFeaturesEditor::sigChangedNestedPaging); 172 pLayoutWidget->addWidget(m_pCheckBoxEnableNestedPaging); 173 } 174 175 m_pLayout->addLayout(pLayoutWidget, 0, 1); 146 176 } 147 177 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAccelerationFeaturesEditor.h
r95221 r95222 1 1 /* $Id$ */ 2 2 /** @file 3 * VBox Qt GUI - UI ProcessorFeaturesEditor class declaration.3 * VBox Qt GUI - UIAccelerationFeaturesEditor class declaration. 4 4 */ 5 5 … … 16 16 */ 17 17 18 #ifndef FEQT_INCLUDED_SRC_settings_editors_UI ProcessorFeaturesEditor_h19 #define FEQT_INCLUDED_SRC_settings_editors_UI ProcessorFeaturesEditor_h18 #ifndef FEQT_INCLUDED_SRC_settings_editors_UIAccelerationFeaturesEditor_h 19 #define FEQT_INCLUDED_SRC_settings_editors_UIAccelerationFeaturesEditor_h 20 20 #ifndef RT_WITHOUT_PRAGMA_ONCE 21 21 # pragma once … … 30 30 class QLabel; 31 31 32 /** QWidget subclass used as processorfeatures editor. */33 class SHARED_LIBRARY_STUFF UI ProcessorFeaturesEditor : public QIWithRetranslateUI<QWidget>32 /** QWidget subclass used as acceleration features editor. */ 33 class SHARED_LIBRARY_STUFF UIAccelerationFeaturesEditor : public QIWithRetranslateUI<QWidget> 34 34 { 35 35 Q_OBJECT; … … 37 37 signals: 38 38 39 /** Notifies listeners about PAEchange. */40 void sigChanged Pae();41 /** Notifies listeners about nested virtualizationchange. */42 void sigChangedNested Virtualization();39 /** Notifies listeners about virtualization change. */ 40 void sigChangedVirtualization(); 41 /** Notifies listeners about nested paging change. */ 42 void sigChangedNestedPaging(); 43 43 44 44 public: 45 45 46 46 /** Constructs editor passing @a pParent to the base-class. */ 47 UI ProcessorFeaturesEditor(QWidget *pParent = 0);47 UIAccelerationFeaturesEditor(QWidget *pParent = 0); 48 48 49 /** Defines whether 'enable PAE' feature in @a fOn. */50 void setEnable Pae(bool fOn);51 /** Returns 'enable PAE' feature value. */52 bool isEnabled Pae() const;53 /** Defines whether 'enable PAE' option @a fAvailable. */54 void setEnable PaeAvailable(bool fAvailable);49 /** Defines whether 'enable virtualization' feature in @a fOn. */ 50 void setEnableVirtualization(bool fOn); 51 /** Returns 'enable virtualization' feature value. */ 52 bool isEnabledVirtualization() const; 53 /** Defines whether 'enable virtualization' option @a fAvailable. */ 54 void setEnableVirtualizationAvailable(bool fAvailable); 55 55 56 /** Defines whether 'enable nested virtualization' feature in @a fOn. */57 void setEnableNested Virtualization(bool fOn);58 /** Returns 'enable nested virtualization' feature value. */59 bool isEnabledNested Virtualization() const;60 /** Defines whether 'enable nested virtualization' option @a fAvailable. */61 void setEnableNested VirtualizationAvailable(bool fAvailable);56 /** Defines whether 'enable nested paging' feature in @a fOn. */ 57 void setEnableNestedPaging(bool fOn); 58 /** Returns 'enable nested paging' feature value. */ 59 bool isEnabledNestedPaging() const; 60 /** Defines whether 'enable nested paging' option @a fAvailable. */ 61 void setEnableNestedPagingAvailable(bool fAvailable); 62 62 63 63 /** Returns minimum layout hint. */ … … 78 78 /** @name Values 79 79 * @{ */ 80 /** Holds the 'enable PAE' feature value. */81 bool m_fEnable Pae;82 /** Holds the 'enable nested virtualization' feature value. */83 bool m_fEnableNested Virtualization;80 /** Holds the 'enable virtualization' feature value. */ 81 bool m_fEnableVirtualization; 82 /** Holds the 'enable nested paging' feature value. */ 83 bool m_fEnableNestedPaging; 84 84 /** @} */ 85 85 … … 90 90 /** Holds the label instance. */ 91 91 QLabel *m_pLabel; 92 /** Holds the 'enable PAE' check-box instance. */93 QCheckBox *m_pCheckBoxEnable Pae;94 /** Holds the 'enable nested virtualization' check-box instance. */95 QCheckBox *m_pCheckBoxEnableNested Virtualization;92 /** Holds the 'enable virtualization' check-box instance. */ 93 QCheckBox *m_pCheckBoxEnableVirtualization; 94 /** Holds the 'enable nested paging' check-box instance. */ 95 QCheckBox *m_pCheckBoxEnableNestedPaging; 96 96 /** @} */ 97 97 }; 98 98 99 #endif /* !FEQT_INCLUDED_SRC_settings_editors_UI ProcessorFeaturesEditor_h */99 #endif /* !FEQT_INCLUDED_SRC_settings_editors_UIAccelerationFeaturesEditor_h */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r95213 r95222 17 17 18 18 /* Qt includes: */ 19 #include <QCheckBox>20 #include <QComboBox>21 #include <QLabel>22 19 #include <QVBoxLayout> 23 20 24 21 /* GUI includes: */ 25 22 #include "QITabWidget.h" 23 #include "UIAccelerationFeaturesEditor.h" 26 24 #include "UIBaseMemoryEditor.h" 27 25 #include "UIBootOrderEditor.h" 28 26 #include "UIChipsetEditor.h" 29 27 #include "UICommon.h" 30 #include "UIConverter.h"28 //#include "UIConverter.h" 31 29 #include "UIErrorString.h" 32 30 #include "UIExecutionCapEditor.h" … … 164 162 , m_pTabAcceleration(0) 165 163 , m_pEditorParavirtProvider(0) 166 , m_pLabelVirtualization(0) 167 , m_pCheckBoxVirtualization(0) 168 , m_pCheckBoxNestedPaging(0) 169 { 170 /* Prepare: */ 164 , m_pEditorAccelerationFeatures(0) 165 { 171 166 prepare(); 172 167 } … … 174 169 UIMachineSettingsSystem::~UIMachineSettingsSystem() 175 170 { 176 /* Cleanup: */177 171 cleanup(); 178 172 } … … 186 180 bool UIMachineSettingsSystem::isHWVirtExEnabled() const 187 181 { 188 return m_p CheckBoxVirtualization->isChecked();182 return m_pEditorAccelerationFeatures->isEnabledVirtualization(); 189 183 } 190 184 … … 197 191 bool UIMachineSettingsSystem::isNestedPagingEnabled() const 198 192 { 199 return m_p CheckBoxNestedPaging->isChecked();193 return m_pEditorAccelerationFeatures->isEnabledNestedPaging(); 200 194 } 201 195 … … 326 320 if (m_pEditorParavirtProvider) 327 321 m_pEditorParavirtProvider->setValue(oldSystemData.m_paravirtProvider); 328 if (m_pCheckBoxVirtualization) 329 m_pCheckBoxVirtualization->setChecked(oldSystemData.m_fEnabledHwVirtEx); 330 if (m_pCheckBoxNestedPaging) 331 m_pCheckBoxNestedPaging->setChecked(oldSystemData.m_fEnabledNestedPaging); 322 if (m_pEditorAccelerationFeatures) 323 { 324 m_pEditorAccelerationFeatures->setEnableVirtualization(oldSystemData.m_fEnabledHwVirtEx); 325 m_pEditorAccelerationFeatures->setEnableNestedPaging(oldSystemData.m_fEnabledNestedPaging); 326 } 332 327 333 328 /* Polish page finally: */ … … 396 391 * Nested HW Virt Ex is requested. */ 397 392 newSystemData.m_fEnabledNestedPaging = isNestedPagingEnabled() 398 || ( isNestedPagingSupported()399 && isNestedHWVirtExEnabled());393 || ( isNestedPagingSupported() 394 && isNestedHWVirtExEnabled()); 400 395 401 396 /* Cache new data: */ … … 608 603 609 604 /* Configure navigation for 'acceleration' tab: */ 610 setTabOrder(m_pEditorParavirtProvider, m_pCheckBoxVirtualization); 611 setTabOrder(m_pCheckBoxVirtualization, m_pCheckBoxNestedPaging); 605 setTabOrder(m_pEditorParavirtProvider, m_pEditorAccelerationFeatures); 612 606 } 613 607 … … 621 615 m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabMotherboard), tr("&Motherboard")); 622 616 m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabProcessor), tr("&Processor")); 623 m_pLabelVirtualization->setText(tr("Hardware Virtualization:"));624 m_pCheckBoxVirtualization->setToolTip(tr("When checked, the virtual machine will try to make use of the host CPU's hardware "625 "virtualization extensions such as Intel VT-x and AMD-V."));626 m_pCheckBoxVirtualization->setText(tr("Enable &VT-x/AMD-V"));627 m_pCheckBoxNestedPaging->setToolTip(tr("When checked, the virtual machine will try to make use of the nested paging "628 "extension of Intel VT-x and AMD-V."));629 m_pCheckBoxNestedPaging->setText(tr("Enable Nested Pa&ging"));630 617 m_pTabWidget->setTabText(m_pTabWidget->indexOf(m_pTabAcceleration), tr("Acce&leration")); 631 618 … … 649 636 m_pEditorExecCap->setMinimumLayoutIndent(iMinimumLayoutHint); 650 637 m_pEditorProcessorFeatures->setMinimumLayoutIndent(iMinimumLayoutHint); 638 iMinimumLayoutHint = 0; 639 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorParavirtProvider->minimumLabelHorizontalHint()); 640 iMinimumLayoutHint = qMax(iMinimumLayoutHint, m_pEditorAccelerationFeatures->minimumLabelHorizontalHint()); 641 m_pEditorParavirtProvider->setMinimumLayoutIndent(iMinimumLayoutHint); 642 m_pEditorAccelerationFeatures->setMinimumLayoutIndent(iMinimumLayoutHint); 651 643 } 652 644 … … 673 665 /* Polish 'Acceleration' availability: */ 674 666 m_pEditorParavirtProvider->setEnabled(isMachineOffline()); 675 m_p LabelVirtualization->setEnabled(isMachineOffline());676 m_p CheckBoxVirtualization->setEnabled( (systemData.m_fSupportedHwVirtEx && isMachineOffline())677 || (systemData.m_fEnabledHwVirtEx && isMachineOffline()));678 m_p CheckBoxNestedPaging->setEnabled( m_pCheckBoxVirtualization->isChecked()679 && ( (systemData.m_fSupportedNestedPaging && isMachineOffline())680 || (systemData.m_fEnabledNestedPaging && isMachineOffline())));667 m_pEditorAccelerationFeatures->setEnabled(isMachineOffline()); 668 m_pEditorAccelerationFeatures->setEnableVirtualizationAvailable( (systemData.m_fSupportedHwVirtEx && isMachineOffline()) 669 || (systemData.m_fEnabledHwVirtEx && isMachineOffline())); 670 m_pEditorAccelerationFeatures->setEnableNestedPagingAvailable( m_pEditorAccelerationFeatures->isEnabledVirtualization() 671 && ( (systemData.m_fSupportedNestedPaging && isMachineOffline()) 672 || (systemData.m_fEnabledNestedPaging && isMachineOffline()))); 681 673 } 682 674 … … 685 677 /* Update Nested Paging checkbox: */ 686 678 AssertPtrReturnVoid(m_pCache); 687 m_p CheckBoxNestedPaging->setEnabled( m_pCheckBoxVirtualization->isChecked()688 && ( (m_pCache->base().m_fSupportedNestedPaging && isMachineOffline())689 || (m_pCache->base().m_fEnabledNestedPaging && isMachineOffline())));679 m_pEditorAccelerationFeatures->setEnableNestedPagingAvailable( m_pEditorAccelerationFeatures->isEnabledVirtualization() 680 && ( (m_pCache->base().m_fSupportedNestedPaging && isMachineOffline()) 681 || (m_pCache->base().m_fEnabledNestedPaging && isMachineOffline()))); 690 682 691 683 /* Revalidate: */ … … 819 811 m_pEditorParavirtProvider = new UIParavirtProviderEditor(m_pTabAcceleration); 820 812 if (m_pEditorParavirtProvider) 821 pLayoutAcceleration->addWidget(m_pEditorParavirtProvider, 0, 0, 1, 3); 822 823 /* Prepare virtualization label layout: */ 824 QVBoxLayout *pLayoutVirtualizationLabel = new QVBoxLayout; 825 if (pLayoutVirtualizationLabel) 826 { 827 /* Prepare virtualization label: */ 828 m_pLabelVirtualization = new QLabel(m_pTabAcceleration); 829 if (m_pLabelVirtualization) 830 { 831 m_pLabelVirtualization->setAlignment(Qt::AlignRight | Qt::AlignVCenter); 832 pLayoutVirtualizationLabel->addWidget(m_pLabelVirtualization); 833 } 834 /* Prepare placeholder: */ 835 QWidget *pWidgetPlaceholder = new QWidget(m_pTabAcceleration); 836 if (pWidgetPlaceholder) 837 { 838 #ifndef VBOX_WITH_RAW_MODE 839 /* Hide placeholder when raw-mode is not supported: */ 840 pWidgetPlaceholder->setVisible(false); 841 #endif 842 843 pLayoutVirtualizationLabel->addWidget(pWidgetPlaceholder); 844 } 845 846 pLayoutAcceleration->addLayout(pLayoutVirtualizationLabel, 1, 0); 847 } 848 /* Prepare virtualization stuff layout: */ 849 QVBoxLayout *pLayoutVirtualizationStuff = new QVBoxLayout; 850 if (pLayoutVirtualizationStuff) 851 { 852 /* Prepare virtualization check-box: */ 853 m_pCheckBoxVirtualization = new QCheckBox(m_pTabAcceleration); 854 if (m_pCheckBoxVirtualization) 855 { 856 #ifndef VBOX_WITH_RAW_MODE 857 /* Hide HW Virt Ex checkbox when raw-mode is not supported: */ 858 m_pCheckBoxVirtualization->setVisible(false); 859 #endif 860 861 pLayoutVirtualizationStuff->addWidget(m_pCheckBoxVirtualization); 862 } 863 /* Prepare nested paging check-box: */ 864 m_pCheckBoxNestedPaging = new QCheckBox(m_pTabAcceleration); 865 if (m_pCheckBoxNestedPaging) 866 pLayoutVirtualizationStuff->addWidget(m_pCheckBoxNestedPaging); 867 868 pLayoutAcceleration->addLayout(pLayoutVirtualizationStuff, 1, 1); 869 } 813 pLayoutAcceleration->addWidget(m_pEditorParavirtProvider, 0, 0, 1, 2); 814 815 /* Prepare acceleration features editor: */ 816 m_pEditorAccelerationFeatures = new UIAccelerationFeaturesEditor(m_pTabAcceleration); 817 if (m_pEditorAccelerationFeatures) 818 pLayoutAcceleration->addWidget(m_pEditorAccelerationFeatures, 1, 0); 870 819 871 820 m_pTabWidget->addTab(m_pTabAcceleration, QString()); … … 895 844 896 845 /* Configure 'Acceleration' connections: */ 897 connect(m_p CheckBoxVirtualization, &QCheckBox::stateChanged,846 connect(m_pEditorAccelerationFeatures, &UIAccelerationFeaturesEditor::sigChangedVirtualization, 898 847 this, &UIMachineSettingsSystem::sltHandleHwVirtExToggle); 899 connect(m_p CheckBoxNestedPaging, &QCheckBox::stateChanged,848 connect(m_pEditorAccelerationFeatures, &UIAccelerationFeaturesEditor::sigChangedNestedPaging, 900 849 this, &UIMachineSettingsSystem::revalidate); 901 850 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.h
r95213 r95222 28 28 struct UIDataSettingsMachineSystem; 29 29 typedef UISettingsCache<UIDataSettingsMachineSystem> UISettingsCacheMachineSystem; 30 class QCheckBox;31 class QComboBox;32 class QLabel;33 30 class QITabWidget; 31 class UIAccelerationFeaturesEditor; 34 32 class UIBaseMemoryEditor; 35 33 class UIBootOrderEditor; … … 174 172 175 173 /** Holds the 'Acceleration' tab instance. */ 176 QWidget *m_pTabAcceleration;174 QWidget *m_pTabAcceleration; 177 175 /** Holds the paravirtualization provider editor instance. */ 178 UIParavirtProviderEditor *m_pEditorParavirtProvider; 179 /** Holds the virtualization label instance. */ 180 QLabel *m_pLabelVirtualization; 181 /** Holds the virtualization check-box instance. */ 182 QCheckBox *m_pCheckBoxVirtualization; 183 /** Holds the nested paging check-box instance. */ 184 QCheckBox *m_pCheckBoxNestedPaging; 176 UIParavirtProviderEditor *m_pEditorParavirtProvider; 177 /** Holds the acceleration features editor instance. */ 178 UIAccelerationFeaturesEditor *m_pEditorAccelerationFeatures; 185 179 /** @} */ 186 180 };
Note:
See TracChangeset
for help on using the changeset viewer.