VirtualBox

Changeset 85813 in vbox


Ignore:
Timestamp:
Aug 18, 2020 10:45:09 AM (4 years ago)
Author:
vboxsync
Message:

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

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

Legend:

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

    r85808 r85813  
    2323FORMS = \
    2424    src/settings/UISettingsDialog.ui \
    25     src/settings/global/UIGlobalSettingsGeneral.ui \
    2625    src/settings/global/UIGlobalSettingsLanguage.ui \
    2726    src/settings/global/UIGlobalSettingsExtension.ui \
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp

    r82968 r85813  
    1717
    1818/* Qt includes: */
     19#include <QCheckBox>
    1920#include <QDir>
     21#include <QGridLayout>
     22#include <QLabel>
    2023
    2124/* GUI includes: */
     25#include "UICommon.h"
     26#include "UIErrorString.h"
     27#include "UIExtraDataManager.h"
     28#include "UIFilePathSelector.h"
    2229#include "UIGlobalSettingsGeneral.h"
    23 #include "UIExtraDataManager.h"
    24 #include "UIErrorString.h"
    25 #include "UICommon.h"
    2630
    2731
     
    6266UIGlobalSettingsGeneral::UIGlobalSettingsGeneral()
    6367    : m_pCache(0)
     68    , m_pSelectorMachineFolder(0)
     69    , m_pSelectorVRDPLibName(0)
     70    , m_pCheckBoxHostScreenSaver(0)
     71    , m_pLabelMachineFolder(0)
     72    , m_pLabelHostScreenSaver(0)
     73    , m_pLabelVRDPLibName(0)
    6474{
    6575    /* Prepare: */
     
    135145void UIGlobalSettingsGeneral::retranslateUi()
    136146{
    137     /* Translate uic generated strings: */
    138     Ui::UIGlobalSettingsGeneral::retranslateUi(this);
     147    m_pLabelMachineFolder->setText(tr("Default &Machine Folder:"));
     148    m_pSelectorMachineFolder->setWhatsThis(tr("Holds the path to the default virtual machine folder. This folder is used, "
     149                                              "if not explicitly specified otherwise, when creating new virtual machines."));
     150    m_pLabelVRDPLibName->setText(tr("V&RDP Authentication Library:"));
     151    m_pSelectorVRDPLibName->setWhatsThis(tr("Holds the path to the library that provides authentication for Remote Display (VRDP) clients."));
     152    m_pLabelHostScreenSaver->setText(tr("Host Screensaver:"));
     153    m_pCheckBoxHostScreenSaver->setWhatsThis(tr("When checked, the host screensaver will be disabled whenever a virtual machine is running."));
     154    m_pCheckBoxHostScreenSaver->setText(tr("&Disable When Running Virtual Machines"));
    139155}
    140156
    141157void UIGlobalSettingsGeneral::prepare()
    142158{
    143     /* Apply UI decorations: */
    144     Ui::UIGlobalSettingsGeneral::setupUi(this);
     159    prepareWidgets();
    145160
    146161    /* Prepare cache: */
     
    167182    /* Apply language settings: */
    168183    retranslateUi();
     184}
     185
     186void UIGlobalSettingsGeneral::prepareWidgets()
     187{
     188    if (objectName().isEmpty())
     189        setObjectName(QStringLiteral("UIGlobalSettingsGeneral"));
     190    QGridLayout *pMainLayout = new QGridLayout(this);
     191    pMainLayout->setContentsMargins(0, 0, 0, 0);
     192    pMainLayout->setObjectName(QStringLiteral("pMainLayout"));
     193    m_pLabelMachineFolder = new QLabel();
     194    m_pLabelMachineFolder->setObjectName(QStringLiteral("m_pLabelMachineFolder"));
     195    m_pLabelMachineFolder->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     196    pMainLayout->addWidget(m_pLabelMachineFolder, 0, 0, 1, 1);
     197
     198    m_pSelectorMachineFolder = new UIFilePathSelector();
     199    m_pSelectorMachineFolder->setObjectName(QStringLiteral("m_pSelectorMachineFolder"));
     200    QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
     201    sizePolicy.setHorizontalStretch(0);
     202    sizePolicy.setVerticalStretch(0);
     203    sizePolicy.setHeightForWidth(m_pSelectorMachineFolder->sizePolicy().hasHeightForWidth());
     204    m_pSelectorMachineFolder->setSizePolicy(sizePolicy);
     205    pMainLayout->addWidget(m_pSelectorMachineFolder, 0, 1, 1, 2);
     206
     207    m_pLabelVRDPLibName = new QLabel();
     208    m_pLabelVRDPLibName->setObjectName(QStringLiteral("m_pLabelVRDPLibName"));
     209    m_pLabelVRDPLibName->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     210    pMainLayout->addWidget(m_pLabelVRDPLibName, 1, 0, 1, 1);
     211
     212    m_pSelectorVRDPLibName = new UIFilePathSelector();
     213    m_pSelectorVRDPLibName->setObjectName(QStringLiteral("m_pSelectorVRDPLibName"));
     214    sizePolicy.setHeightForWidth(m_pSelectorVRDPLibName->sizePolicy().hasHeightForWidth());
     215    m_pSelectorVRDPLibName->setSizePolicy(sizePolicy);
     216    pMainLayout->addWidget(m_pSelectorVRDPLibName, 1, 1, 1, 2);
     217
     218    m_pLabelHostScreenSaver = new QLabel();
     219    m_pLabelHostScreenSaver->setObjectName(QStringLiteral("m_pLabelHostScreenSaver"));
     220    m_pLabelHostScreenSaver->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     221    pMainLayout->addWidget(m_pLabelHostScreenSaver, 2, 0, 1, 1);
     222
     223    m_pCheckBoxHostScreenSaver = new QCheckBox();
     224    m_pCheckBoxHostScreenSaver->setObjectName(QStringLiteral("m_pCheckBoxHostScreenSaver"));
     225    pMainLayout->addWidget(m_pCheckBoxHostScreenSaver, 2, 1, 1, 1);
     226
     227    QSpacerItem *pSpacerItem = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
     228    pMainLayout->addItem(pSpacerItem, 3, 0, 1, 3);
     229
     230    m_pLabelMachineFolder->setBuddy(m_pSelectorMachineFolder);
     231    m_pLabelVRDPLibName->setBuddy(m_pSelectorVRDPLibName);
     232    m_pLabelHostScreenSaver->setBuddy(m_pCheckBoxHostScreenSaver);
    169233}
    170234
     
    214278    return fSuccess;
    215279}
    216 
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h

    r82968 r85813  
    2424/* GUI includes: */
    2525#include "UISettingsPage.h"
    26 #include "UIGlobalSettingsGeneral.gen.h"
    2726
    2827/* Forward declarations: */
     28class QCheckBox;
     29class QLabel;
     30class UIFilePathSelector;
    2931struct UIDataSettingsGlobalGeneral;
    3032typedef UISettingsCache<UIDataSettingsGlobalGeneral> UISettingsCacheGlobalGeneral;
    3133
    3234/** Global settings: General page. */
    33 class SHARED_LIBRARY_STUFF UIGlobalSettingsGeneral : public UISettingsPageGlobal,
    34                                                      public Ui::UIGlobalSettingsGeneral
     35class SHARED_LIBRARY_STUFF UIGlobalSettingsGeneral : public UISettingsPageGlobal
    3536{
    3637    Q_OBJECT;
     
    6667    /** Prepares all. */
    6768    void prepare();
     69    /** Prepares widgets. */
     70    void prepareWidgets();
    6871    /** Cleanups all. */
    6972    void cleanup();
     
    7477    /** Holds the page data cache instance. */
    7578    UISettingsCacheGlobalGeneral *m_pCache;
     79
     80    /** @name Widgets
     81     * @{ */
     82       UIFilePathSelector *m_pSelectorMachineFolder;
     83       UIFilePathSelector *m_pSelectorVRDPLibName;
     84       QCheckBox *m_pCheckBoxHostScreenSaver;
     85       QLabel *m_pLabelMachineFolder;
     86       QLabel *m_pLabelHostScreenSaver;
     87       QLabel *m_pLabelVRDPLibName;
     88    /** @} */
    7689};
    7790
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