VirtualBox

Changeset 96877 in vbox for trunk


Ignore:
Timestamp:
Sep 26, 2022 4:31:17 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153784
Message:

FE/Qt: bugref:10293: A bit of reordering on Machine settings / System page to make sure EFI and secure boot stuff goes the last one.

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  
    3838    : QIWithRetranslateUI<QWidget>(pParent)
    3939    , m_fEnableIoApic(false)
     40    , m_fEnableUtcTime(false)
    4041    , m_fEnableEfi(false)
    4142    , m_fEnableSecureBoot(false)
    42     , m_fEnableUtcTime(false)
    4343    , m_pLabel(0)
    4444    , m_pCheckBoxEnableIoApic(0)
     45    , m_pCheckBoxEnableUtcTime(0)
    4546    , m_pCheckBoxEnableEfi(0)
    4647    , m_pCheckBoxEnableSecureBoot(0)
    47     , m_pCheckBoxEnableUtcTime(0)
    4848{
    4949    prepare();
     
    6969}
    7070
     71void 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
     83bool UIMotherboardFeaturesEditor::isEnabledUtcTime() const
     84{
     85    return   m_pCheckBoxEnableUtcTime
     86           ? m_pCheckBoxEnableUtcTime->checkState() == Qt::Checked
     87           : m_fEnableUtcTime;
     88}
     89
    7190void UIMotherboardFeaturesEditor::setEnableEfi(bool fOn)
    7291{
     
    105124           ? m_pCheckBoxEnableSecureBoot->checkState() == Qt::Checked
    106125           : m_fEnableSecureBoot;
    107 }
    108 
    109 void UIMotherboardFeaturesEditor::setEnableUtcTime(bool fOn)
    110 {
    111     /* Update cached value and
    112      * 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() const
    122 {
    123     return   m_pCheckBoxEnableUtcTime
    124            ? m_pCheckBoxEnableUtcTime->checkState() == Qt::Checked
    125            : m_fEnableUtcTime;
    126126}
    127127
     
    148148                                               "after having installed a Windows guest operating system!"));
    149149    }
     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    }
    150156    if (m_pCheckBoxEnableEfi)
    151157    {
     
    160166        m_pCheckBoxEnableSecureBoot->setToolTip(tr("When checked, the secure boot emulation will be enabled."));
    161167    }
    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     }
    168168}
    169169
     
    205205            m_pLayout->addWidget(m_pCheckBoxEnableIoApic, 0, 1);
    206206        }
     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        }
    207215        /* Prepare 'enable EFI' check-box: */
    208216        m_pCheckBoxEnableEfi = new QCheckBox(this);
     
    211219            connect(m_pCheckBoxEnableEfi, &QCheckBox::stateChanged,
    212220                    this, &UIMotherboardFeaturesEditor::sltHandleEnableEfiToggling);
    213             m_pLayout->addWidget(m_pCheckBoxEnableEfi, 1, 1);
     221            m_pLayout->addWidget(m_pCheckBoxEnableEfi, 2, 1);
    214222        }
    215223        /* Prepare 'enable secure boot' check-box: */
     
    219227            connect(m_pCheckBoxEnableSecureBoot, &QCheckBox::stateChanged,
    220228                    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);
    230230        }
    231231    }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMotherboardFeaturesEditor.h

    r96794 r96877  
    4949    /** Notifies listeners about IO APIC change. */
    5050    void sigChangedIoApic();
     51    /** Notifies listeners about UTC time change. */
     52    void sigChangedUtcTime();
    5153    /** Notifies listeners about EFI change. */
    5254    void sigChangedEfi();
    5355    /** Notifies listeners about secure boot change. */
    5456    void sigChangedSecureBoot();
    55     /** Notifies listeners about UTC time change. */
    56     void sigChangedUtcTime();
    5757
    5858public:
     
    6666    bool isEnabledIoApic() const;
    6767
     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
    6873    /** Defines whether 'enable EFI' feature in @a fOn. */
    6974    void setEnableEfi(bool fOn);
     
    7580    /** Returns 'enable secure boot' feature value. */
    7681    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;
    8282
    8383    /** Returns minimum layout hint. */
     
    105105        /** Holds the 'enable IO APIC' feature value. */
    106106        bool  m_fEnableIoApic;
     107        /** Holds the 'enable UTC time' feature value. */
     108        bool  m_fEnableUtcTime;
    107109        /** Holds the 'enable EFI' feature value. */
    108110        bool  m_fEnableEfi;
    109111        /** Holds the 'enable secure boot' feature value. */
    110112        bool  m_fEnableSecureBoot;
    111         /** Holds the 'enable UTC time' feature value. */
    112         bool  m_fEnableUtcTime;
    113113    /** @} */
    114114
     
    121121        /** Holds the 'enable IO APIC' check-box instance. */
    122122        QCheckBox   *m_pCheckBoxEnableIoApic;
     123        /** Holds the 'enable UTC time' check-box instance. */
     124        QCheckBox   *m_pCheckBoxEnableUtcTime;
    123125        /** Holds the 'enable EFI' check-box instance. */
    124126        QCheckBox   *m_pCheckBoxEnableEfi;
    125         /** Holds the 'secure boot' check-box instance. */
     127        /** Holds the 'enable secure boot' check-box instance. */
    126128        QCheckBox   *m_pCheckBoxEnableSecureBoot;
    127         /** Holds the 'enable UTC time' check-box instance. */
    128         QCheckBox   *m_pCheckBoxEnableUtcTime;
    129129    /** @} */
    130130};
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