- Timestamp:
- Sep 26, 2022 4:31:17 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 153784
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings/editors
- Files:
-
- 2 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 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMotherboardFeaturesEditor.h
r96794 r96877 49 49 /** Notifies listeners about IO APIC change. */ 50 50 void sigChangedIoApic(); 51 /** Notifies listeners about UTC time change. */ 52 void sigChangedUtcTime(); 51 53 /** Notifies listeners about EFI change. */ 52 54 void sigChangedEfi(); 53 55 /** Notifies listeners about secure boot change. */ 54 56 void sigChangedSecureBoot(); 55 /** Notifies listeners about UTC time change. */56 void sigChangedUtcTime();57 57 58 58 public: … … 66 66 bool isEnabledIoApic() const; 67 67 68 /** Defines whether 'enable UTC time' feature in @a fOn. */ 69 void setEnableUtcTime(bool fOn); 70 /** Returns 'enable UTC time' feature value. */ 71 bool isEnabledUtcTime() const; 72 68 73 /** Defines whether 'enable EFI' feature in @a fOn. */ 69 74 void setEnableEfi(bool fOn); … … 75 80 /** Returns 'enable secure boot' feature value. */ 76 81 bool isEnabledSecureBoot() const; 77 78 /** Defines whether 'enable UTC time' feature in @a fOn. */79 void setEnableUtcTime(bool fOn);80 /** Returns 'enable UTC time' feature value. */81 bool isEnabledUtcTime() const;82 82 83 83 /** Returns minimum layout hint. */ … … 105 105 /** Holds the 'enable IO APIC' feature value. */ 106 106 bool m_fEnableIoApic; 107 /** Holds the 'enable UTC time' feature value. */ 108 bool m_fEnableUtcTime; 107 109 /** Holds the 'enable EFI' feature value. */ 108 110 bool m_fEnableEfi; 109 111 /** Holds the 'enable secure boot' feature value. */ 110 112 bool m_fEnableSecureBoot; 111 /** Holds the 'enable UTC time' feature value. */112 bool m_fEnableUtcTime;113 113 /** @} */ 114 114 … … 121 121 /** Holds the 'enable IO APIC' check-box instance. */ 122 122 QCheckBox *m_pCheckBoxEnableIoApic; 123 /** Holds the 'enable UTC time' check-box instance. */ 124 QCheckBox *m_pCheckBoxEnableUtcTime; 123 125 /** Holds the 'enable EFI' check-box instance. */ 124 126 QCheckBox *m_pCheckBoxEnableEfi; 125 /** Holds the ' secure boot' check-box instance. */127 /** Holds the 'enable secure boot' check-box instance. */ 126 128 QCheckBox *m_pCheckBoxEnableSecureBoot; 127 /** Holds the 'enable UTC time' check-box instance. */128 QCheckBox *m_pCheckBoxEnableUtcTime;129 129 /** @} */ 130 130 };
Note:
See TracChangeset
for help on using the changeset viewer.