Changeset 94058 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 2, 2022 2:26:21 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/settings
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.cpp
r93115 r94058 17 17 18 18 /* Qt includes: */ 19 #include <QComboBox> 19 20 #include <QGridLayout> 20 21 #include <QHBoxLayout> … … 22 23 23 24 /* GUI includes: */ 24 #include "QIComboBox.h"25 25 #include "UICommon.h" 26 26 #include "UIConverter.h" … … 56 56 } 57 57 58 QWidget *UINetworkAttachmentEditor::focusProxy1() const59 {60 return m_pComboType->focusProxy();61 }62 63 QWidget *UINetworkAttachmentEditor::focusProxy2() const64 {65 return m_pComboName->focusProxy();66 }67 68 58 void UINetworkAttachmentEditor::setValueType(KNetworkAttachmentType enmType) 69 59 { … … 208 198 m_pComboType->setItemText(i, strName); 209 199 } 210 } 200 m_pComboType->setToolTip(tr("Selects how this virtual adapter is attached to the real network of the Host OS.")); 201 } 202 203 /* Translate name combo: */ 204 if (m_pComboName) 205 m_pComboName->setToolTip(tr("Selects the network or adapter name associated with this virtual adapter.")); 211 206 212 207 /* Translate name combo: */ … … 294 289 { 295 290 /* Create type combo: */ 296 m_pComboType = new Q IComboBox(this);291 m_pComboType = new QComboBox(this); 297 292 if (m_pComboType) 298 293 { 299 setFocusProxy(m_pComboType->focusProxy());300 294 if (m_pLabelType) 301 m_pLabelType->setBuddy(m_pComboType ->focusProxy());302 connect(m_pComboType, static_cast<void(Q IComboBox::*)(int)>(&QIComboBox::currentIndexChanged),295 m_pLabelType->setBuddy(m_pComboType); 296 connect(m_pComboType, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 303 297 this, &UINetworkAttachmentEditor::sltHandleCurrentTypeChanged); 304 298 pComboLayout->addWidget(m_pComboType); … … 324 318 325 319 /* Create name combo: */ 326 m_pComboName = new Q IComboBox(this);320 m_pComboName = new QComboBox(this); 327 321 if (m_pComboName) 328 322 { 329 323 if (m_pLabelName) 330 m_pLabelName->setBuddy(m_pComboName ->focusProxy());324 m_pLabelName->setBuddy(m_pComboName); 331 325 m_pComboName->setInsertPolicy(QComboBox::NoInsert); 332 connect(m_pComboName, static_cast<void(Q IComboBox::*)(int)>(&QIComboBox::currentIndexChanged),326 connect(m_pComboName, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 333 327 this, &UINetworkAttachmentEditor::sltHandleCurrentNameChanged); 334 connect(m_pComboName, &Q IComboBox::editTextChanged,328 connect(m_pComboName, &QComboBox::editTextChanged, 335 329 this, &UINetworkAttachmentEditor::sltHandleCurrentNameChanged); 336 330 pMainLayout->addWidget(m_pComboName, 1, iColumn++); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.h
r93990 r94058 34 34 35 35 /* Forward declarations: */ 36 class QComboBox; 36 37 class QLabel; 37 class QIComboBox;38 38 39 39 /** QWidget subclass used as a network attachment editor. */ … … 57 57 * @param fWithLabels Brings whether we should add labels ourselves. */ 58 58 UINetworkAttachmentEditor(QWidget *pParent = 0, bool fWithLabels = false); 59 60 /** Returns focus proxy 1. */61 QWidget *focusProxy1() const;62 /** Returns focus proxy 2. */63 QWidget *focusProxy2() const;64 59 65 60 /** Defines value @a enmType. */ … … 142 137 143 138 /** Holds the type label instance. */ 144 QLabel 139 QLabel *m_pLabelType; 145 140 /** Holds the type combo instance. */ 146 Q IComboBox *m_pComboType;141 QComboBox *m_pComboType; 147 142 /** Holds the name label instance. */ 148 QLabel 143 QLabel *m_pLabelName; 149 144 /** Holds the name combo instance. */ 150 Q IComboBox *m_pComboName;145 QComboBox *m_pComboName; 151 146 }; 152 147 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r93996 r94058 661 661 m_pLabelAttachmentType->setText(tr("&Attached to:")); 662 662 iFirstColumnWidth = qMax(iFirstColumnWidth, m_pLabelAttachmentType->minimumSizeHint().width()); 663 m_pEditorAttachmentType->setToolTip(tr("Selects how this virtual adapter is attached to the real network of the Host OS."));664 663 m_pLabelNetworkName->setText(tr("&Name:")); 665 664 iFirstColumnWidth = qMax(iFirstColumnWidth, m_pLabelNetworkName->minimumSizeHint().width()); … … 840 839 { 841 840 if (m_pLabelAttachmentType) 842 m_pLabelAttachmentType->setBuddy(m_pEditorAttachmentType ->focusProxy1());841 m_pLabelAttachmentType->setBuddy(m_pEditorAttachmentType); 843 842 if (m_pLabelNetworkName) 844 m_pLabelNetworkName->setBuddy(m_pEditorAttachmentType ->focusProxy2());843 m_pLabelNetworkName->setBuddy(m_pEditorAttachmentType); 845 844 846 845 m_pLayoutAdapterSettings->addWidget(m_pEditorAttachmentType, 0, 1, 2, 3);
Note:
See TracChangeset
for help on using the changeset viewer.