Changeset 93936 in vbox
- Timestamp:
- Feb 24, 2022 4:50:21 PM (3 years ago)
- 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 25 25 26 26 27 UIAutoCaptureKeyboardEditor::UIAutoCaptureKeyboardEditor(QWidget *pParent /* = 0 */ , bool fWithLabel /* = false */)27 UIAutoCaptureKeyboardEditor::UIAutoCaptureKeyboardEditor(QWidget *pParent /* = 0 */) 28 28 : QIWithRetranslateUI<QWidget>(pParent) 29 , m_fWithLabel(fWithLabel)30 29 , m_fValue(false) 31 30 , m_pLabel(0) … … 60 59 if (m_pCheckBox) 61 60 { 62 m_pCheckBox->set WhatsThis(tr("When checked, the keyboard is automatically captured every time the VM window is "63 64 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.")); 65 64 m_pCheckBox->setText(tr("&Auto Capture Keyboard")); 66 65 } … … 75 74 pLayoutMain->setContentsMargins(0, 0, 0, 0); 76 75 pLayoutMain->setColumnStretch(1, 1); 77 int iColumn = 0;78 76 79 77 /* 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); 86 81 /* Prepare check-box: */ 87 82 m_pCheckBox = new QCheckBox(this); 88 83 if (m_pCheckBox) 89 pLayoutMain->addWidget(m_pCheckBox, 0, iColumn++);84 pLayoutMain->addWidget(m_pCheckBox, 0, 1); 90 85 } 91 86 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAutoCaptureKeyboardEditor.h
r93115 r93936 36 36 public: 37 37 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); 41 40 42 41 /** Defines editor @a fValue. */ … … 55 54 void prepare(); 56 55 57 /** Holds whether descriptive label should be created. */58 bool m_fWithLabel;59 60 56 /** Holds the value to be set. */ 61 57 bool m_fValue; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIShortcutConfigurationEditor.cpp
r93115 r93936 855 855 m_pTableManager->setWhatsThis(tr("Lists all available shortcuts which can be configured.")); 856 856 m_pTableRuntime->setWhatsThis(tr("Lists all available shortcuts which can be configured.")); 857 m_pEditorFilterManager->set WhatsThis(tr("Holds a sequence to filter the shortcut list."));858 m_pEditorFilterRuntime->set WhatsThis(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.")); 859 859 } 860 860 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r93115 r93936 18 18 /* Qt includes: */ 19 19 #include <QCheckBox> 20 #include <QGridLayout> 21 #include <QLabel> 20 #include <QVBoxLayout> 22 21 23 22 /* GUI includes: */ … … 68 67 : m_pCache(0) 69 68 , m_pEditorShortcutConfiguration(0) 70 , m_pLabelInputExtended(0)71 69 , m_pEditorAutoCaptureKeyboard(0) 72 70 { … … 179 177 void UIGlobalSettingsInput::retranslateUi() 180 178 { 181 m_pLabelInputExtended->setText(tr("Extended Features:"));182 179 } 183 180 … … 199 196 { 200 197 /* Prepare main layout: */ 201 Q GridLayout *pLayoutMain = new QGridLayout(this);198 QVBoxLayout *pLayoutMain = new QVBoxLayout(this); 202 199 if (pLayoutMain) 203 200 { … … 205 202 m_pEditorShortcutConfiguration = new UIShortcutConfigurationEditor(this); 206 203 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 216 206 /* Prepare 'auto capture keyboard' editor: */ 217 207 m_pEditorAutoCaptureKeyboard = new UIAutoCaptureKeyboardEditor(this); 218 208 if (m_pEditorAutoCaptureKeyboard) 219 pLayoutMain->addWidget(m_pEditorAutoCaptureKeyboard , 1, 1);209 pLayoutMain->addWidget(m_pEditorAutoCaptureKeyboard); 220 210 } 221 211 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.h
r93115 r93936 26 26 27 27 /* Forward declarations: */ 28 class QLabel;29 28 class UIAutoCaptureKeyboardEditor; 30 29 class UIShortcutConfigurationEditor; … … 87 86 /** Holds the 'shortcut configuration' editor instance. */ 88 87 UIShortcutConfigurationEditor *m_pEditorShortcutConfiguration; 89 /** Holds the input extended label instance. */90 QLabel *m_pLabelInputExtended;91 88 /** Holds the 'auto capture keyboard' editor instance. */ 92 89 UIAutoCaptureKeyboardEditor *m_pEditorAutoCaptureKeyboard;
Note:
See TracChangeset
for help on using the changeset viewer.