VirtualBox

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

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

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

Legend:

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

    r93115 r94062  
    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"
     
    7979            m_pCombo->setItemText(i, gpConverter->toString(enmType));
    8080        }
     81        m_pCombo->setToolTip(tr("Selects the visual state. If machine is running it will be applied "
     82                                "as soon as possible, otherwise desired one will be defined."));
    8183    }
    8284}
     
    108110        {
    109111            /* Create combo: */
    110             m_pCombo = new QIComboBox(this);
     112            m_pCombo = new QComboBox(this);
    111113            if (m_pCombo)
    112114            {
    113                 setFocusProxy(m_pCombo->focusProxy());
    114115                /* This is necessary since contents is dynamical now: */
    115116                m_pCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents);
    116117                if (m_pLabel)
    117                     m_pLabel->setBuddy(m_pCombo->focusProxy());
    118                 connect(m_pCombo, static_cast<void(QIComboBox::*)(int)>(&QIComboBox::currentIndexChanged),
     118                    m_pLabel->setBuddy(m_pCombo);
     119                connect(m_pCombo, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    119120                        this, &UIVisualStateEditor::sltHandleCurrentIndexChanged);
    120121                pComboLayout->addWidget(m_pCombo);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVisualStateEditor.h

    r93990 r94062  
    3232
    3333/* Forward declarations: */
     34class QComboBox;
    3435class QLabel;
    35 class QIComboBox;
    3636
    3737/** QWidget subclass used as a visual state editor. */
     
    9292
    9393    /** Holds the label instance. */
    94     QLabel     *m_pLabel;
     94    QLabel    *m_pLabel;
    9595    /** Holds the combo instance. */
    96     QIComboBox *m_pCombo;
     96    QComboBox *m_pCombo;
    9797};
    9898
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp

    r93829 r94062  
    300300{
    301301    m_pEditorMenuBar->setToolTip(tr("Allows to modify VM menu-bar contents."));
    302     m_pLabelVisualState->setText(tr("Visual State:"));
    303     m_pEditorVisualState->setToolTip(tr("Selects the visual state. If machine is running it will be applied as soon as possible, "
    304                                         "otherwise desired one will be defined."));
     302    m_pLabelVisualState->setText(tr("&Visual State:"));
    305303    m_pLabelMiniToolBar->setText(tr("Mini ToolBar:"));
    306304    m_pCheckBoxShowMiniToolBar->setToolTip(tr("When checked, show the Mini ToolBar in full-screen and seamless modes."));
     
    374372        m_pEditorVisualState = new UIVisualStateEditor(this);
    375373        if (m_pEditorVisualState)
     374        {
     375            if (m_pLabelVisualState)
     376                m_pLabelVisualState->setBuddy(m_pEditorVisualState);
    376377            pLayoutMain->addWidget(m_pEditorVisualState, 1, 1);
     378        }
    377379
    378380        /* Prepare mini-toolbar label: */
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