VirtualBox

Changeset 90155 in vbox


Ignore:
Timestamp:
Jul 12, 2021 8:18:16 AM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
145658
Message:

FE/Qt: bugref:9996: Refactoring

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
3 edited
2 moved

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk

    r90153 r90155  
    650650        src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.h \
    651651        src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.h \
    652         src/wizards/editors/UIHostnameDomainEditor.h \
     652        src/wizards/editors/UIHostnameDomainNameEditor.h \
    653653        src/wizards/editors/UIUserNamePasswordEditor.h \
    654654        src/wizards/newcloudvm/UIWizardNewCloudVM.h \
     
    11481148        src/wizards/addcloudvm/UIWizardAddCloudVMPageBasic1.cpp \
    11491149        src/wizards/addcloudvm/UIWizardAddCloudVMPageExpert.cpp \
    1150         src/wizards/editors/UIHostnameDomainEditor.cpp \
     1150        src/wizards/editors/UIHostnameDomainNameEditor.cpp \
    11511151        src/wizards/editors/UIUserNamePasswordEditor.cpp \
    11521152        src/wizards/newcloudvm/UIWizardNewCloudVM.cpp \
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp

    r90154 r90155  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIHostnameDomainEditor class implementation.
     3 * VBox Qt GUI - UIHostnameDomainNameEditor class implementation.
    44 */
    55
     
    3030#include "UICommon.h"
    3131#include "UIIconPool.h"
    32 #include "UIHostnameDomainEditor.h"
     32#include "UIHostnameDomainNameEditor.h"
    3333#include "UIWizardNewVM.h"
    3434
    3535
    3636
    37 UIHostnameDomainEditor::UIHostnameDomainEditor(QWidget *pParent /*  = 0 */)
     37UIHostnameDomainNameEditor::UIHostnameDomainNameEditor(QWidget *pParent /*  = 0 */)
    3838    : QIWithRetranslateUI<QWidget>(pParent)
    3939    , m_pHostnameLineEdit(0)
     
    4545}
    4646
    47 QString UIHostnameDomainEditor::hostname() const
     47QString UIHostnameDomainNameEditor::hostname() const
    4848{
    4949    if (m_pHostnameLineEdit)
     
    5252}
    5353
    54 bool UIHostnameDomainEditor::isComplete() const
     54bool UIHostnameDomainNameEditor::isComplete() const
    5555{
    5656    return m_pHostnameLineEdit && m_pHostnameLineEdit->hasAcceptableInput() &&
     
    5858}
    5959
    60 void UIHostnameDomainEditor::setHostname(const QString &strHostname)
     60void UIHostnameDomainNameEditor::setHostname(const QString &strHostname)
    6161{
    6262    if (m_pHostnameLineEdit)
     
    6464}
    6565
    66 QString UIHostnameDomainEditor::domain() const
     66QString UIHostnameDomainNameEditor::domain() const
    6767{
    6868    if (m_pDomainLineEdit)
     
    7171}
    7272
    73 void UIHostnameDomainEditor::setDomain(const QString &strDomain)
     73void UIHostnameDomainNameEditor::setDomain(const QString &strDomain)
    7474{
    7575    if (m_pDomainLineEdit)
     
    7777}
    7878
    79 QString UIHostnameDomainEditor::hostnameDomain() const
     79QString UIHostnameDomainNameEditor::hostnameDomain() const
    8080{
    8181    if (m_pHostnameLineEdit && m_pDomainLineEdit)
     
    8484}
    8585
    86 void UIHostnameDomainEditor::retranslateUi()
     86void UIHostnameDomainNameEditor::retranslateUi()
    8787{
    8888    QString strHostnameTooltip(tr("Type the hostname which will be used in attended install:"));
     
    103103}
    104104
    105 void UIHostnameDomainEditor::addLineEdit(int &iRow, QLabel *&pLabel, QILineEdit *&pLineEdit, QGridLayout *pLayout)
     105void UIHostnameDomainNameEditor::addLineEdit(int &iRow, QLabel *&pLabel, QILineEdit *&pLineEdit, QGridLayout *pLayout)
    106106{
    107107    AssertReturnVoid(pLayout);
     
    129129}
    130130
    131 void UIHostnameDomainEditor::prepare()
     131void UIHostnameDomainNameEditor::prepare()
    132132{
    133133    QGridLayout *pMainLayout = new QGridLayout;
     
    143143
    144144    connect(m_pHostnameLineEdit, &QILineEdit::textChanged,
    145             this, &UIHostnameDomainEditor::sltHostnameChanged);
     145            this, &UIHostnameDomainNameEditor::sltHostnameChanged);
    146146    connect(m_pDomainLineEdit, &QILineEdit::textChanged,
    147             this, &UIHostnameDomainEditor::sltDomainChanged);
     147            this, &UIHostnameDomainNameEditor::sltDomainChanged);
    148148
    149149
     
    151151}
    152152
    153 void UIHostnameDomainEditor::sltHostnameChanged()
     153void UIHostnameDomainNameEditor::sltHostnameChanged()
    154154{
    155155    m_pHostnameLineEdit->mark(!m_pHostnameLineEdit->hasAcceptableInput(),
     
    158158}
    159159
    160 void UIHostnameDomainEditor::sltDomainChanged()
     160void UIHostnameDomainNameEditor::sltDomainChanged()
    161161{
    162162    m_pDomainLineEdit->mark(!m_pDomainLineEdit->hasAcceptableInput(),
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.h

    r90154 r90155  
    11/* $Id$ */
    22/** @file
    3  * VBox Qt GUI - UIHostnameDomainEditor class declaration.
     3 * VBox Qt GUI - UIHostnameDomainNameEditor class declaration.
    44 */
    55
     
    1616 */
    1717
    18 #ifndef FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainEditor_h
    19 #define FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainEditor_h
     18#ifndef FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainNameEditor_h
     19#define FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainNameEditor_h
    2020#ifndef RT_WITHOUT_PRAGMA_ONCE
    2121# pragma once
     
    3535class UIPasswordLineEdit;
    3636
    37 class UIHostnameDomainEditor : public QIWithRetranslateUI<QWidget>
     37class UIHostnameDomainNameEditor : public QIWithRetranslateUI<QWidget>
    3838{
    3939
     
    4646public:
    4747
    48     UIHostnameDomainEditor(QWidget *pParent = 0);
     48    UIHostnameDomainNameEditor(QWidget *pParent = 0);
    4949
    5050    QString hostname() const;
     
    8080};
    8181
    82 #endif /* !FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainEditor_h */
     82#endif /* !FEQT_INCLUDED_SRC_wizards_editors_UIHostnameDomainNameEditor_h */
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.cpp

    r90154 r90155  
    3232#include "UIIconPool.h"
    3333#include "UIUserNamePasswordEditor.h"
    34 #include "UIHostnameDomainEditor.h"
     34#include "UIHostnameDomainNameEditor.h"
    3535#include "UIWizardNewVMUnattendedPageBasic.h"
    3636#include "UIWizardNewVM.h"
     
    6262    , m_pStartHeadlessCheckBox(0)
    6363    , m_pUserNamePasswordEditor(0)
    64     , m_pHostnameDomainEditor(0)
     64    , m_pHostnameDomainNameEditor(0)
    6565    , m_pGAISOPathLabel(0)
    6666    , m_pGAISOFilePathSelector(0)
     
    101101        connect(m_pGAInstallationISOContainer, &QGroupBox::toggled,
    102102                this, &UIWizardNewVMUnattendedPageBasic::sltInstallGACheckBoxToggle);
    103     if (m_pHostnameDomainEditor)
    104         connect(m_pHostnameDomainEditor, &UIHostnameDomainEditor::sigHostnameDomainChanged,
     103    if (m_pHostnameDomainNameEditor)
     104        connect(m_pHostnameDomainNameEditor, &UIHostnameDomainNameEditor::sigHostnameDomainChanged,
    105105                this, &UIWizardNewVMUnattendedPageBasic::sltHostnameDomainChanged);
    106106    if (m_pProductKeyLineEdit)
     
    163163        m_pUserNamePasswordEditor->blockSignals(false);
    164164    }
    165     if (m_pHostnameDomainEditor)
    166     {
    167         m_pHostnameDomainEditor->blockSignals(true);
     165    if (m_pHostnameDomainNameEditor)
     166    {
     167        m_pHostnameDomainNameEditor->blockSignals(true);
    168168
    169169        if (!m_userModifiedParameters.contains("HostnameDomain"))
    170170        {
    171             m_pHostnameDomainEditor->setHostname(pWizard->machineBaseName());
    172             m_pHostnameDomainEditor->setDomain("myguest.virtualbox.org");
     171            m_pHostnameDomainNameEditor->setHostname(pWizard->machineBaseName());
     172            m_pHostnameDomainNameEditor->setDomain("myguest.virtualbox.org");
    173173            /* Initialize unattended hostname here since we cannot get the efault value from CUnattended this early (unlike username etc): */
    174             newVMWizardPropertySet(HostnameDomain, m_pHostnameDomainEditor->hostnameDomain());
     174            newVMWizardPropertySet(HostnameDomain, m_pHostnameDomainNameEditor->hostnameDomain());
    175175        }
    176176
    177         m_pHostnameDomainEditor->blockSignals(false);
     177        m_pHostnameDomainNameEditor->blockSignals(false);
    178178    }
    179179    if (m_pGAInstallationISOContainer && !m_userModifiedParameters.contains("InstallGuestAdditions"))
     
    201201    if (m_pUserNamePasswordEditor && !m_pUserNamePasswordEditor->isComplete())
    202202        return false;
    203     if (m_pHostnameDomainEditor && !m_pHostnameDomainEditor->isComplete())
     203    if (m_pHostnameDomainNameEditor && !m_pHostnameDomainNameEditor->isComplete())
    204204        return false;
    205205    return true;
     
    312312    }
    313313
    314     m_pHostnameDomainEditor = new UIHostnameDomainEditor;
    315     if (m_pHostnameDomainEditor)
    316         pAdditionalOptionsContainerLayout->addWidget(m_pHostnameDomainEditor, 1, 0, 2, 3);
     314    m_pHostnameDomainNameEditor = new UIHostnameDomainNameEditor;
     315    if (m_pHostnameDomainNameEditor)
     316        pAdditionalOptionsContainerLayout->addWidget(m_pHostnameDomainNameEditor, 1, 0, 2, 3);
    317317
    318318    m_pStartHeadlessCheckBox = new QCheckBox;
  • TabularUnified trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMUnattendedPageBasic.h

    r90154 r90155  
    3535class UIFilePathSelector;
    3636class UIUserNamePasswordEditor;
    37 class UIHostnameDomainEditor;
     37class UIHostnameDomainNameEditor;
    3838struct UIUnattendedInstallData;
    3939
     
    9494        QCheckBox *m_pStartHeadlessCheckBox;
    9595        UIUserNamePasswordEditor *m_pUserNamePasswordEditor;
    96         UIHostnameDomainEditor *m_pHostnameDomainEditor;
     96        UIHostnameDomainNameEditor *m_pHostnameDomainNameEditor;
    9797        QLabel    *m_pGAISOPathLabel;
    9898        UIFilePathSelector *m_pGAISOFilePathSelector;
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