VirtualBox

Ignore:
Timestamp:
Aug 11, 2020 6:47:35 AM (4 years ago)
Author:
vboxsync
Message:

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

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

Legend:

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

    r85645 r85679  
    4040    src/settings/machine/UIMachineSettingsSerial.ui \
    4141    src/settings/machine/UIMachineSettingsUSB.ui \
    42     src/settings/machine/UIMachineSettingsUSBFilterDetails.ui \
    43     src/settings/machine/UIMachineSettingsInterface.ui
     42    src/settings/machine/UIMachineSettingsUSBFilterDetails.ui
     43
    4444
    4545TRANSLATIONS = \
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp

    r84904 r85679  
    1616 */
    1717
     18/* Qt includes: */
     19#include <QCheckBox>
     20#include <QGridLayout>
     21#include <QLabel>
     22
    1823/* GUI includes: */
    1924#include "UIActionPool.h"
    2025#include "UIExtraDataManager.h"
    2126#include "UIMachineSettingsInterface.h"
    22 
     27#include "UIStatusBarEditorWindow.h"
     28#include "UIMenuBarEditorWindow.h"
     29#include "UIVisualStateEditor.h"
    2330
    2431/** Machine settings: User Interface page data structure. */
     
    285292void UIMachineSettingsInterface::retranslateUi()
    286293{
    287     /* Translate uic generated strings: */
    288     Ui::UIMachineSettingsInterface::retranslateUi(this);
     294    m_pMenuBarEditor->setWhatsThis(tr("Allows to modify VM menu-bar contents."));
     295    m_pLabelVisualState->setText(tr("Visual State:"));
     296    m_pVisualStateEditor->setWhatsThis(tr("Selects the visual state. If machine is running it will be applied as soon as possible, otherwise desired one will be defined."));
     297    m_pLabelMiniToolBar->setText(tr("Mini ToolBar:"));
     298    m_pCheckBoxShowMiniToolBar->setWhatsThis(tr("When checked, show the Mini ToolBar in full-screen and seamless modes."));
     299    m_pCheckBoxShowMiniToolBar->setText(tr("Show in &Full-screen/Seamless"));
     300    m_pComboToolBarAlignment->setWhatsThis(tr("When checked, show the Mini ToolBar at the top of the screen, rather than in its default position at the bottom of the screen."));
     301    m_pComboToolBarAlignment->setText(tr("Show at &Top of Screen"));
     302    m_pStatusBarEditor->setWhatsThis(tr("Allows to modify VM status-bar contents."));
    289303}
    290304
     
    305319}
    306320
     321void UIMachineSettingsInterface::prepareWidgets()
     322{
     323    if (objectName().isEmpty())
     324        setObjectName(QStringLiteral("UIMachineSettingsInterface"));
     325    resize(350, 300);
     326    QGridLayout *pLayoutMain = new QGridLayout(this);
     327    pLayoutMain->setObjectName(QStringLiteral("pLayoutMain"));
     328    m_pMenuBarEditor = new UIMenuBarEditorWidget(this);
     329    m_pMenuBarEditor->setObjectName(QStringLiteral("m_pMenuBarEditor"));
     330    QSizePolicy sizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
     331    sizePolicy.setHorizontalStretch(0);
     332    sizePolicy.setVerticalStretch(0);
     333    sizePolicy.setHeightForWidth(m_pMenuBarEditor->sizePolicy().hasHeightForWidth());
     334    m_pMenuBarEditor->setSizePolicy(sizePolicy);
     335    pLayoutMain->addWidget(m_pMenuBarEditor, 0, 0, 1, 3);
     336
     337    m_pLabelVisualState = new QLabel;
     338    m_pLabelVisualState->setObjectName(QStringLiteral("m_pLabelVisualState"));
     339    m_pLabelVisualState->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     340    pLayoutMain->addWidget(m_pLabelVisualState, 1, 0, 1, 1);
     341
     342    m_pVisualStateEditor = new UIVisualStateEditor;
     343    m_pVisualStateEditor->setObjectName(QStringLiteral("m_pVisualStateEditor"));
     344    pLayoutMain->addWidget(m_pVisualStateEditor, 1, 1, 1, 2);
     345
     346    m_pLabelMiniToolBar = new QLabel;
     347    m_pLabelMiniToolBar->setObjectName(QStringLiteral("m_pLabelMiniToolBar"));
     348    m_pLabelMiniToolBar->setAlignment(Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter);
     349    pLayoutMain->addWidget(m_pLabelMiniToolBar, 2, 0, 1, 1);
     350
     351    m_pCheckBoxShowMiniToolBar = new QCheckBox;
     352    m_pCheckBoxShowMiniToolBar->setObjectName(QStringLiteral("m_pCheckBoxShowMiniToolBar"));
     353    sizePolicy.setHeightForWidth(m_pCheckBoxShowMiniToolBar->sizePolicy().hasHeightForWidth());
     354    m_pCheckBoxShowMiniToolBar->setSizePolicy(sizePolicy);
     355    m_pCheckBoxShowMiniToolBar->setChecked(true);
     356    pLayoutMain->addWidget(m_pCheckBoxShowMiniToolBar, 2, 1, 1, 2);
     357
     358    m_pComboToolBarAlignment = new QCheckBox;
     359    m_pComboToolBarAlignment->setObjectName(QStringLiteral("m_pComboToolBarAlignment"));
     360    sizePolicy.setHeightForWidth(m_pComboToolBarAlignment->sizePolicy().hasHeightForWidth());
     361    m_pComboToolBarAlignment->setSizePolicy(sizePolicy);
     362    m_pComboToolBarAlignment->setChecked(false);
     363    pLayoutMain->addWidget(m_pComboToolBarAlignment, 3, 1, 1, 2);
     364
     365    QSpacerItem *pSpacer = new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding);
     366    pLayoutMain->addItem(pSpacer, 4, 0, 1, 3);
     367
     368    m_pStatusBarEditor = new UIStatusBarEditorWidget(this);
     369    m_pStatusBarEditor->setObjectName(QStringLiteral("m_pStatusBarEditor"));
     370    sizePolicy.setHeightForWidth(m_pStatusBarEditor->sizePolicy().hasHeightForWidth());
     371    m_pStatusBarEditor->setSizePolicy(sizePolicy);
     372    pLayoutMain->addWidget(m_pStatusBarEditor, 5, 0, 1, 3);
     373
     374    QObject::connect(m_pCheckBoxShowMiniToolBar, &QCheckBox::toggled,
     375                     m_pComboToolBarAlignment, &UIMachineSettingsInterface::setEnabled);
     376}
     377
    307378void UIMachineSettingsInterface::prepare()
    308379{
    309     /* Apply UI decorations: */
    310     Ui::UIMachineSettingsInterface::setupUi(this);
     380    prepareWidgets();
    311381
    312382    /* Prepare cache: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.h

    r84904 r85679  
    2424/* GUI includes: */
    2525#include "UISettingsPage.h"
    26 #include "UIMachineSettingsInterface.gen.h"
    2726
    2827/* Forward declarations: */
     28class QCheckBox;
     29class QLabel;
    2930class UIActionPool;
     31class UIMenuBarEditorWidget;
     32class UIStatusBarEditorWidget;
     33class UIVisualStateEditor;
    3034struct UIDataSettingsMachineInterface;
    3135typedef UISettingsCache<UIDataSettingsMachineInterface> UISettingsCacheMachineInterface;
    3236
    3337/** Machine settings: User Interface page. */
    34 class SHARED_LIBRARY_STUFF UIMachineSettingsInterface : public UISettingsPageMachine,
    35                                                         public Ui::UIMachineSettingsInterface
     38class SHARED_LIBRARY_STUFF UIMachineSettingsInterface : public UISettingsPageMachine
    3639{
    3740    Q_OBJECT;
     
    7376    /** Prepares all. */
    7477    void prepare();
     78    /** Prepares widgets. */
     79    void prepareWidgets();
    7580    /** Cleanups all. */
    7681    void cleanup();
     
    9499    /** Holds the page data cache instance. */
    95100    UISettingsCacheMachineInterface *m_pCache;
     101
     102    /** @name Widgets
     103     * @{ */
     104        UIStatusBarEditorWidget *m_pStatusBarEditor;
     105        UIMenuBarEditorWidget *m_pMenuBarEditor;
     106        QCheckBox *m_pCheckBoxShowMiniToolBar;
     107        QCheckBox *m_pComboToolBarAlignment;
     108        QLabel *m_pLabelVisualState;
     109        UIVisualStateEditor *m_pVisualStateEditor;
     110        QLabel *m_pLabelMiniToolBar;
     111    /** @} */
    96112};
    97113
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSFDetails.cpp

    r85645 r85679  
    203203void UIMachineSettingsSFDetails::retranslateUi()
    204204{
    205     m_pPathLabel->setText(QApplication::translate("UIMachineSettingsSFDetails", "Folder Path:"));
    206     m_pNameLabel->setText(QApplication::translate("UIMachineSettingsSFDetails", "Folder Name:"));
    207     m_pNameLineEdit->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "Holds the name of the shared folder (as it will be seen by the guest OS)."));
    208     m_pReadonlyCheckBox->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "When checked, the guest OS will not be able to write to the specified shared folder."));
    209     m_pReadonlyCheckBox->setText(QApplication::translate("UIMachineSettingsSFDetails", "&Read-only"));
    210     m_pAutoMountCheckBox->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "When checked, the guest OS will try to automatically mount the shared folder on startup."));
    211     m_pAutoMountCheckBox->setText(QApplication::translate("UIMachineSettingsSFDetails", "&Auto-mount"));
    212     m_pAutoMountPointLabel->setText(QApplication::translate("UIMachineSettingsSFDetails", "Mount point:"));
    213     m_pAutoMountPointLineEdit->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "Where to automatically mount the folder in the guest.  A drive letter (e.g. 'G:') for Windows and OS/2 guests, path for the others.  If left empty the guest will pick something fitting."));
    214     m_pPermanentCheckBox->setToolTip(QApplication::translate("UIMachineSettingsSFDetails", "When checked, this shared folder will be permanent."));
    215     m_pPermanentCheckBox->setText(QApplication::translate("UIMachineSettingsSFDetails", "&Make Permanent"));
     205    m_pPathLabel->setText(tr("Folder Path:"));
     206    m_pNameLabel->setText(tr("Folder Name:"));
     207    m_pNameLineEdit->setToolTip(tr("Holds the name of the shared folder (as it will be seen by the guest OS)."));
     208    m_pReadonlyCheckBox->setToolTip(tr("When checked, the guest OS will not be able to write to the specified shared folder."));
     209    m_pReadonlyCheckBox->setText(tr("&Read-only"));
     210    m_pAutoMountCheckBox->setToolTip(tr("When checked, the guest OS will try to automatically mount the shared folder on startup."));
     211    m_pAutoMountCheckBox->setText(tr("&Auto-mount"));
     212    m_pAutoMountPointLabel->setText(tr("Mount point:"));
     213    m_pAutoMountPointLineEdit->setToolTip(tr("Where to automatically mount the folder in the guest.  A drive letter (e.g. 'G:') for Windows and OS/2 guests, path for the others.  If left empty the guest will pick something fitting."));
     214    m_pPermanentCheckBox->setToolTip(tr("When checked, this shared folder will be permanent."));
     215    m_pPermanentCheckBox->setText(tr("&Make Permanent"));
    216216
    217217    switch (m_type)
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