VirtualBox

Changeset 93936 in vbox


Ignore:
Timestamp:
Feb 24, 2022 4:50:21 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Global preferences: Reworking Input page to utilize labels of editors it uses; This also increases page accessibility.

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

Legend:

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

    r93115 r93936  
    2525
    2626
    27 UIAutoCaptureKeyboardEditor::UIAutoCaptureKeyboardEditor(QWidget *pParent /* = 0 */, bool fWithLabel /* = false */)
     27UIAutoCaptureKeyboardEditor::UIAutoCaptureKeyboardEditor(QWidget *pParent /* = 0 */)
    2828    : QIWithRetranslateUI<QWidget>(pParent)
    29     , m_fWithLabel(fWithLabel)
    3029    , m_fValue(false)
    3130    , m_pLabel(0)
     
    6059    if (m_pCheckBox)
    6160    {
    62         m_pCheckBox->setWhatsThis(tr("When checked, the keyboard is automatically captured every time the VM window is "
    63                                      "activated. When the keyboard is captured, all keystrokes (including system ones like "
    64                                      "Alt-Tab) are directed to the VM."));
     61        m_pCheckBox->setToolTip(tr("When checked, the keyboard is automatically captured every time the VM window is "
     62                                   "activated. When the keyboard is captured, all keystrokes (including system ones like "
     63                                   "Alt-Tab) are directed to the VM."));
    6564        m_pCheckBox->setText(tr("&Auto Capture Keyboard"));
    6665    }
     
    7574        pLayoutMain->setContentsMargins(0, 0, 0, 0);
    7675        pLayoutMain->setColumnStretch(1, 1);
    77         int iColumn = 0;
    7876
    7977        /* Prepare label: */
    80         if (m_fWithLabel)
    81         {
    82             m_pLabel = new QLabel(this);
    83             if (m_pLabel)
    84                 pLayoutMain->addWidget(m_pLabel, 0, iColumn++);
    85         }
     78        m_pLabel = new QLabel(this);
     79        if (m_pLabel)
     80            pLayoutMain->addWidget(m_pLabel, 0, 0);
    8681        /* Prepare check-box: */
    8782        m_pCheckBox = new QCheckBox(this);
    8883        if (m_pCheckBox)
    89             pLayoutMain->addWidget(m_pCheckBox, 0, iColumn++);
     84            pLayoutMain->addWidget(m_pCheckBox, 0, 1);
    9085    }
    9186
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAutoCaptureKeyboardEditor.h

    r93115 r93936  
    3636public:
    3737
    38     /** Constructs auto capture keyboard editor passing @a pParent to the base-class.
    39       * @param  fWithLabel  Brings whether we should add label ourselves. */
    40     UIAutoCaptureKeyboardEditor(QWidget *pParent = 0, bool fWithLabel = false);
     38    /** Constructs auto capture keyboard editor passing @a pParent to the base-class. */
     39    UIAutoCaptureKeyboardEditor(QWidget *pParent = 0);
    4140
    4241    /** Defines editor @a fValue. */
     
    5554    void prepare();
    5655
    57     /** Holds whether descriptive label should be created. */
    58     bool  m_fWithLabel;
    59 
    6056    /** Holds the value to be set. */
    6157    bool  m_fValue;
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIShortcutConfigurationEditor.cpp

    r93115 r93936  
    855855    m_pTableManager->setWhatsThis(tr("Lists all available shortcuts which can be configured."));
    856856    m_pTableRuntime->setWhatsThis(tr("Lists all available shortcuts which can be configured."));
    857     m_pEditorFilterManager->setWhatsThis(tr("Holds a sequence to filter the shortcut list."));
    858     m_pEditorFilterRuntime->setWhatsThis(tr("Holds a sequence to filter the shortcut list."));
     857    m_pEditorFilterManager->setToolTip(tr("Holds a sequence to filter the shortcut list."));
     858    m_pEditorFilterRuntime->setToolTip(tr("Holds a sequence to filter the shortcut list."));
    859859}
    860860
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp

    r93115 r93936  
    1818/* Qt includes: */
    1919#include <QCheckBox>
    20 #include <QGridLayout>
    21 #include <QLabel>
     20#include <QVBoxLayout>
    2221
    2322/* GUI includes: */
     
    6867    : m_pCache(0)
    6968    , m_pEditorShortcutConfiguration(0)
    70     , m_pLabelInputExtended(0)
    7169    , m_pEditorAutoCaptureKeyboard(0)
    7270{
     
    179177void UIGlobalSettingsInput::retranslateUi()
    180178{
    181     m_pLabelInputExtended->setText(tr("Extended Features:"));
    182179}
    183180
     
    199196{
    200197    /* Prepare main layout: */
    201     QGridLayout *pLayoutMain = new QGridLayout(this);
     198    QVBoxLayout *pLayoutMain = new QVBoxLayout(this);
    202199    if (pLayoutMain)
    203200    {
     
    205202        m_pEditorShortcutConfiguration = new UIShortcutConfigurationEditor(this);
    206203        if (m_pEditorShortcutConfiguration)
    207             pLayoutMain->addWidget(m_pEditorShortcutConfiguration, 0, 0, 1, 2);
    208 
    209         /* Prepare input extended label: */
    210         m_pLabelInputExtended = new QLabel(this);
    211         if (m_pLabelInputExtended)
    212         {
    213             m_pLabelInputExtended->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
    214             pLayoutMain->addWidget(m_pLabelInputExtended, 1, 0);
    215         }
     204            pLayoutMain->addWidget(m_pEditorShortcutConfiguration);
     205
    216206        /* Prepare 'auto capture keyboard' editor: */
    217207        m_pEditorAutoCaptureKeyboard = new UIAutoCaptureKeyboardEditor(this);
    218208        if (m_pEditorAutoCaptureKeyboard)
    219             pLayoutMain->addWidget(m_pEditorAutoCaptureKeyboard, 1, 1);
     209            pLayoutMain->addWidget(m_pEditorAutoCaptureKeyboard);
    220210    }
    221211}
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h

    r93115 r93936  
    2626
    2727/* Forward declarations: */
    28 class QLabel;
    2928class UIAutoCaptureKeyboardEditor;
    3029class UIShortcutConfigurationEditor;
     
    8786        /** Holds the 'shortcut configuration' editor instance. */
    8887        UIShortcutConfigurationEditor *m_pEditorShortcutConfiguration;
    89         /** Holds the input extended label instance. */
    90         QLabel                        *m_pLabelInputExtended;
    9188        /** Holds the 'auto capture keyboard' editor instance. */
    9289        UIAutoCaptureKeyboardEditor   *m_pEditorAutoCaptureKeyboard;
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