Changeset 96877 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMotherboardFeaturesEditor.cpp
- Timestamp:
- Sep 26, 2022 4:31:17 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 153784
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMotherboardFeaturesEditor.cpp
r96794 r96877 38 38 : QIWithRetranslateUI<QWidget>(pParent) 39 39 , m_fEnableIoApic(false) 40 , m_fEnableUtcTime(false) 40 41 , m_fEnableEfi(false) 41 42 , m_fEnableSecureBoot(false) 42 , m_fEnableUtcTime(false)43 43 , m_pLabel(0) 44 44 , m_pCheckBoxEnableIoApic(0) 45 , m_pCheckBoxEnableUtcTime(0) 45 46 , m_pCheckBoxEnableEfi(0) 46 47 , m_pCheckBoxEnableSecureBoot(0) 47 , m_pCheckBoxEnableUtcTime(0)48 48 { 49 49 prepare(); … … 69 69 } 70 70 71 void UIMotherboardFeaturesEditor::setEnableUtcTime(bool fOn) 72 { 73 /* Update cached value and 74 * check-box if value has changed: */ 75 if (m_fEnableUtcTime != fOn) 76 { 77 m_fEnableUtcTime = fOn; 78 if (m_pCheckBoxEnableUtcTime) 79 m_pCheckBoxEnableUtcTime->setCheckState(m_fEnableUtcTime ? Qt::Checked : Qt::Unchecked); 80 } 81 } 82 83 bool UIMotherboardFeaturesEditor::isEnabledUtcTime() const 84 { 85 return m_pCheckBoxEnableUtcTime 86 ? m_pCheckBoxEnableUtcTime->checkState() == Qt::Checked 87 : m_fEnableUtcTime; 88 } 89 71 90 void UIMotherboardFeaturesEditor::setEnableEfi(bool fOn) 72 91 { … … 105 124 ? m_pCheckBoxEnableSecureBoot->checkState() == Qt::Checked 106 125 : m_fEnableSecureBoot; 107 }108 109 void UIMotherboardFeaturesEditor::setEnableUtcTime(bool fOn)110 {111 /* Update cached value and112 * check-box if value has changed: */113 if (m_fEnableUtcTime != fOn)114 {115 m_fEnableUtcTime = fOn;116 if (m_pCheckBoxEnableUtcTime)117 m_pCheckBoxEnableUtcTime->setCheckState(m_fEnableUtcTime ? Qt::Checked : Qt::Unchecked);118 }119 }120 121 bool UIMotherboardFeaturesEditor::isEnabledUtcTime() const122 {123 return m_pCheckBoxEnableUtcTime124 ? m_pCheckBoxEnableUtcTime->checkState() == Qt::Checked125 : m_fEnableUtcTime;126 126 } 127 127 … … 148 148 "after having installed a Windows guest operating system!")); 149 149 } 150 if (m_pCheckBoxEnableUtcTime) 151 { 152 m_pCheckBoxEnableUtcTime->setText(tr("Enable Hardware Clock in &UTC Time")); 153 m_pCheckBoxEnableUtcTime->setToolTip(tr("When checked, the RTC device will report the time in UTC, otherwise in local " 154 "(host) time. Unix usually expects the hardware clock to be set to UTC.")); 155 } 150 156 if (m_pCheckBoxEnableEfi) 151 157 { … … 160 166 m_pCheckBoxEnableSecureBoot->setToolTip(tr("When checked, the secure boot emulation will be enabled.")); 161 167 } 162 if (m_pCheckBoxEnableUtcTime)163 {164 m_pCheckBoxEnableUtcTime->setText(tr("Hardware Clock in &UTC Time"));165 m_pCheckBoxEnableUtcTime->setToolTip(tr("When checked, the RTC device will report the time in UTC, otherwise in local "166 "(host) time. Unix usually expects the hardware clock to be set to UTC."));167 }168 168 } 169 169 … … 205 205 m_pLayout->addWidget(m_pCheckBoxEnableIoApic, 0, 1); 206 206 } 207 /* Prepare 'enable UTC time' check-box: */ 208 m_pCheckBoxEnableUtcTime = new QCheckBox(this); 209 if (m_pCheckBoxEnableUtcTime) 210 { 211 connect(m_pCheckBoxEnableUtcTime, &QCheckBox::stateChanged, 212 this, &UIMotherboardFeaturesEditor::sigChangedUtcTime); 213 m_pLayout->addWidget(m_pCheckBoxEnableUtcTime, 1, 1); 214 } 207 215 /* Prepare 'enable EFI' check-box: */ 208 216 m_pCheckBoxEnableEfi = new QCheckBox(this); … … 211 219 connect(m_pCheckBoxEnableEfi, &QCheckBox::stateChanged, 212 220 this, &UIMotherboardFeaturesEditor::sltHandleEnableEfiToggling); 213 m_pLayout->addWidget(m_pCheckBoxEnableEfi, 1, 1);221 m_pLayout->addWidget(m_pCheckBoxEnableEfi, 2, 1); 214 222 } 215 223 /* Prepare 'enable secure boot' check-box: */ … … 219 227 connect(m_pCheckBoxEnableSecureBoot, &QCheckBox::stateChanged, 220 228 this, &UIMotherboardFeaturesEditor::sigChangedSecureBoot); 221 m_pLayout->addWidget(m_pCheckBoxEnableSecureBoot, 2, 1); 222 } 223 /* Prepare 'enable UTC time' check-box: */ 224 m_pCheckBoxEnableUtcTime = new QCheckBox(this); 225 if (m_pCheckBoxEnableUtcTime) 226 { 227 connect(m_pCheckBoxEnableUtcTime, &QCheckBox::stateChanged, 228 this, &UIMotherboardFeaturesEditor::sigChangedUtcTime); 229 m_pLayout->addWidget(m_pCheckBoxEnableUtcTime, 3, 1); 229 m_pLayout->addWidget(m_pCheckBoxEnableSecureBoot, 3, 1); 230 230 } 231 231 }
Note:
See TracChangeset
for help on using the changeset viewer.