VirtualBox

Ignore:
Timestamp:
Mar 2, 2022 2:26:21 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: VM settings: Get rid of QIComboBox objects for Network page.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.cpp

    r93115 r94058  
    1717
    1818/* Qt includes: */
     19#include <QComboBox>
    1920#include <QGridLayout>
    2021#include <QHBoxLayout>
     
    2223
    2324/* GUI includes: */
    24 #include "QIComboBox.h"
    2525#include "UICommon.h"
    2626#include "UIConverter.h"
     
    5656}
    5757
    58 QWidget *UINetworkAttachmentEditor::focusProxy1() const
    59 {
    60     return m_pComboType->focusProxy();
    61 }
    62 
    63 QWidget *UINetworkAttachmentEditor::focusProxy2() const
    64 {
    65     return m_pComboName->focusProxy();
    66 }
    67 
    6858void UINetworkAttachmentEditor::setValueType(KNetworkAttachmentType enmType)
    6959{
     
    208198            m_pComboType->setItemText(i, strName);
    209199        }
    210     }
     200        m_pComboType->setToolTip(tr("Selects how this virtual adapter is attached to the real network of the Host OS."));
     201    }
     202
     203    /* Translate name combo: */
     204    if (m_pComboName)
     205        m_pComboName->setToolTip(tr("Selects the network or adapter name associated with this virtual adapter."));
    211206
    212207    /* Translate name combo: */
     
    294289        {
    295290            /* Create type combo: */
    296             m_pComboType = new QIComboBox(this);
     291            m_pComboType = new QComboBox(this);
    297292            if (m_pComboType)
    298293            {
    299                 setFocusProxy(m_pComboType->focusProxy());
    300294                if (m_pLabelType)
    301                     m_pLabelType->setBuddy(m_pComboType->focusProxy());
    302                 connect(m_pComboType, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
     295                    m_pLabelType->setBuddy(m_pComboType);
     296                connect(m_pComboType, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    303297                        this, &UINetworkAttachmentEditor::sltHandleCurrentTypeChanged);
    304298                pComboLayout->addWidget(m_pComboType);
     
    324318
    325319        /* Create name combo: */
    326         m_pComboName = new QIComboBox(this);
     320        m_pComboName = new QComboBox(this);
    327321        if (m_pComboName)
    328322        {
    329323            if (m_pLabelName)
    330                 m_pLabelName->setBuddy(m_pComboName->focusProxy());
     324                m_pLabelName->setBuddy(m_pComboName);
    331325            m_pComboName->setInsertPolicy(QComboBox::NoInsert);
    332             connect(m_pComboName, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
     326            connect(m_pComboName, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    333327                    this, &UINetworkAttachmentEditor::sltHandleCurrentNameChanged);
    334             connect(m_pComboName, &QIComboBox::editTextChanged,
     328            connect(m_pComboName, &QComboBox::editTextChanged,
    335329                    this, &UINetworkAttachmentEditor::sltHandleCurrentNameChanged);
    336330            pMainLayout->addWidget(m_pComboName, 1, iColumn++);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.h

    r93990 r94058  
    3434
    3535/* Forward declarations: */
     36class QComboBox;
    3637class QLabel;
    37 class QIComboBox;
    3838
    3939/** QWidget subclass used as a network attachment editor. */
     
    5757      * @param  fWithLabels  Brings whether we should add labels ourselves. */
    5858    UINetworkAttachmentEditor(QWidget *pParent = 0, bool fWithLabels = false);
    59 
    60     /** Returns focus proxy 1. */
    61     QWidget *focusProxy1() const;
    62     /** Returns focus proxy 2. */
    63     QWidget *focusProxy2() const;
    6459
    6560    /** Defines value @a enmType. */
     
    142137
    143138    /** Holds the type label instance. */
    144     QLabel     *m_pLabelType;
     139    QLabel    *m_pLabelType;
    145140    /** Holds the type combo instance. */
    146     QIComboBox *m_pComboType;
     141    QComboBox *m_pComboType;
    147142    /** Holds the name label instance. */
    148     QLabel     *m_pLabelName;
     143    QLabel    *m_pLabelName;
    149144    /** Holds the name combo instance. */
    150     QIComboBox *m_pComboName;
     145    QComboBox *m_pComboName;
    151146};
    152147
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r93996 r94058  
    661661    m_pLabelAttachmentType->setText(tr("&Attached to:"));
    662662    iFirstColumnWidth = qMax(iFirstColumnWidth, m_pLabelAttachmentType->minimumSizeHint().width());
    663     m_pEditorAttachmentType->setToolTip(tr("Selects how this virtual adapter is attached to the real network of the Host OS."));
    664663    m_pLabelNetworkName->setText(tr("&Name:"));
    665664    iFirstColumnWidth = qMax(iFirstColumnWidth, m_pLabelNetworkName->minimumSizeHint().width());
     
    840839                {
    841840                    if (m_pLabelAttachmentType)
    842                         m_pLabelAttachmentType->setBuddy(m_pEditorAttachmentType->focusProxy1());
     841                        m_pLabelAttachmentType->setBuddy(m_pEditorAttachmentType);
    843842                    if (m_pLabelNetworkName)
    844                         m_pLabelNetworkName->setBuddy(m_pEditorAttachmentType->focusProxy2());
     843                        m_pLabelNetworkName->setBuddy(m_pEditorAttachmentType);
    845844
    846845                    m_pLayoutAdapterSettings->addWidget(m_pEditorAttachmentType, 0, 1, 2, 3);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette