VirtualBox

Changeset 85818 in vbox


Ignore:
Timestamp:
Aug 18, 2020 12:02:48 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9812. Removing UIGlobalSettingsProxy.ui

Location:
trunk/src/VBox/Frontends/VirtualBox
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/VBoxUI.pro

    r85813 r85818  
    2424    src/settings/UISettingsDialog.ui \
    2525    src/settings/global/UIGlobalSettingsLanguage.ui \
    26     src/settings/global/UIGlobalSettingsExtension.ui \
    27     src/settings/global/UIGlobalSettingsProxy.ui
     26    src/settings/global/UIGlobalSettingsExtension.ui
    2827
    2928TRANSLATIONS = \
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp

    r82968 r85818  
    1818/* Qt includes: */
    1919#include <QButtonGroup>
     20#include <QGridLayout>
     21#include <QLabel>
     22#include <QRadioButton>
    2023#include <QRegExpValidator>
    2124
    2225/* GUI includes: */
     26#include "QILineEdit.h"
    2327#include "QIWidgetValidator.h"
    2428#include "UIGlobalSettingsProxy.h"
     
    6468UIGlobalSettingsProxy::UIGlobalSettingsProxy()
    6569    : m_pCache(0)
     70    , m_pRadioProxyAuto(0)
     71    , m_pRadioProxyDisabled(0)
     72    , m_pRadioProxyEnabled(0)
     73    , m_pHostEditor(0)
     74    , m_pHostLabel(0)
     75    , m_pContainerProxy(0)
    6676{
    6777    /* Prepare: */
     
    193203void UIGlobalSettingsProxy::retranslateUi()
    194204{
    195     /* Translate uic generated strings: */
    196     Ui::UIGlobalSettingsProxy::retranslateUi(this);
     205    m_pRadioProxyAuto->setWhatsThis(tr("When chosen, VirtualBox will try to auto-detect host proxy settings for tasks like "
     206                                       "downloading Guest Additions from the network or checking for updates."));
     207    m_pRadioProxyAuto->setText(tr("&Auto-detect Host Proxy Settings"));
     208    m_pRadioProxyDisabled->setWhatsThis(tr("When chosen, VirtualBox will use direct Internet connection for tasks like downloading "
     209                                           "Guest Additions from the network or checking for updates."));
     210    m_pRadioProxyDisabled->setText(tr("&Direct Connection to the Internet"));
     211    m_pRadioProxyEnabled->setWhatsThis(tr("When chosen, VirtualBox will use the proxy settings supplied for tasks like downloading "
     212                                          "Guest Additions from the network or checking for updates."));
     213    m_pRadioProxyEnabled->setText(tr("&Manual Proxy Configuration"));
     214    m_pHostLabel->setText(tr("&URL:"));
    197215
    198216    /* Translate proxy URL editor: */
     
    216234void UIGlobalSettingsProxy::prepare()
    217235{
    218     /* Apply UI decorations: */
    219     Ui::UIGlobalSettingsProxy::setupUi(this);
     236    prepareWidgets();
    220237
    221238    /* Prepare cache: */
     
    250267}
    251268
     269void UIGlobalSettingsProxy::prepareWidgets()
     270{
     271    if (objectName().isEmpty())
     272        setObjectName(QStringLiteral("UIGlobalSettingsProxy"));
     273    QGridLayout *pMainLayout = new QGridLayout(this);
     274    pMainLayout->setContentsMargins(0, 0, 0, 0);
     275    pMainLayout->setObjectName(QStringLiteral("pMainLayout"));
     276    m_pRadioProxyAuto = new QRadioButton();
     277    m_pRadioProxyAuto->setObjectName(QStringLiteral("m_pRadioProxyAuto"));
     278    pMainLayout->addWidget(m_pRadioProxyAuto, 0, 0, 1, 2);
     279
     280    m_pRadioProxyDisabled = new QRadioButton();
     281    m_pRadioProxyDisabled->setObjectName(QStringLiteral("m_pRadioProxyDisabled"));
     282    pMainLayout->addWidget(m_pRadioProxyDisabled, 1, 0, 1, 2);
     283
     284    m_pRadioProxyEnabled = new QRadioButton();
     285    m_pRadioProxyEnabled->setObjectName(QStringLiteral("m_pRadioProxyEnabled"));
     286    pMainLayout->addWidget(m_pRadioProxyEnabled, 2, 0, 1, 2);
     287
     288    QSpacerItem *pSpacerItem = new QSpacerItem(20, 0, QSizePolicy::Fixed, QSizePolicy::Minimum);
     289    pMainLayout->addItem(pSpacerItem, 3, 0, 1, 1);
     290
     291    m_pContainerProxy = new QWidget();
     292    m_pContainerProxy->setObjectName(QStringLiteral("m_pContainerProxy"));
     293    QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum);
     294    sizePolicy.setHorizontalStretch(1);
     295    sizePolicy.setVerticalStretch(0);
     296    sizePolicy.setHeightForWidth(m_pContainerProxy->sizePolicy().hasHeightForWidth());
     297    m_pContainerProxy->setSizePolicy(sizePolicy);
     298    QHBoxLayout *pHBoxLayout = new QHBoxLayout(m_pContainerProxy);
     299    pHBoxLayout->setContentsMargins(0, 0, 0, 0);
     300    pHBoxLayout->setObjectName(QStringLiteral("pHBoxLayout"));
     301    pHBoxLayout->setContentsMargins(0, 0, 0, 0);
     302    m_pHostLabel = new QLabel(m_pContainerProxy);
     303    m_pHostLabel->setObjectName(QStringLiteral("m_pHostLabel"));
     304    m_pHostLabel->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     305    pHBoxLayout->addWidget(m_pHostLabel);
     306
     307    m_pHostEditor = new QILineEdit(m_pContainerProxy);
     308    m_pHostEditor->setObjectName(QStringLiteral("m_pHostEditor"));
     309    pHBoxLayout->addWidget(m_pHostEditor);
     310    pMainLayout->addWidget(m_pContainerProxy, 3, 1, 1, 1);
     311
     312    QSpacerItem *pSpacerItem1 = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
     313    pMainLayout->addItem(pSpacerItem1, 4, 0, 1, 2);
     314
     315    m_pHostLabel->setBuddy(m_pHostEditor);
     316}
     317
    252318void UIGlobalSettingsProxy::cleanup()
    253319{
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h

    r82968 r85818  
    2424/* GUI includes: */
    2525#include "UISettingsPage.h"
    26 #include "UIGlobalSettingsProxy.gen.h"
    2726#include "VBoxUtils.h"
    2827
    2928/* Forward declarations: */
     29class QLabel;
     30class QRadioButton;
     31class QILineEdit;
    3032struct UIDataSettingsGlobalProxy;
    3133typedef UISettingsCache<UIDataSettingsGlobalProxy> UISettingsCacheGlobalProxy;
    3234
    3335/** Global settings: Proxy page. */
    34 class SHARED_LIBRARY_STUFF UIGlobalSettingsProxy : public UISettingsPageGlobal,
    35                                                    public Ui::UIGlobalSettingsProxy
     36class SHARED_LIBRARY_STUFF UIGlobalSettingsProxy : public UISettingsPageGlobal
    3637{
    3738    Q_OBJECT;
     
    7576    /** Prepares all. */
    7677    void prepare();
     78    /** Prepares wıdgets. */
     79    void prepareWidgets();
    7780    /** Cleanups all. */
    7881    void cleanup();
     
    8386    /** Holds the page data cache instance. */
    8487    UISettingsCacheGlobalProxy *m_pCache;
     88
     89    /** @name Widgets
     90     * @{ */
     91       QRadioButton *m_pRadioProxyAuto;
     92       QRadioButton *m_pRadioProxyDisabled;
     93       QRadioButton *m_pRadioProxyEnabled;
     94       QILineEdit *m_pHostEditor;
     95       QLabel *m_pHostLabel;
     96       QWidget *m_pContainerProxy;
     97    /** @} */
    8598};
    8699
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