Changeset 79032 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 7, 2019 7:28:32 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
r76606 r79032 24 24 25 25 /* GUI includes: */ 26 #include "QIRichTextLabel.h"27 26 #include "QITreeView.h" 28 27 #include "UIApplianceImportEditorWidget.h" … … 68 67 void UIApplianceImportEditorWidget::prepareWidgets() 69 68 { 70 /* Create path selector label: */71 m_pPathSelectorLabel = new QIRichTextLabel(this);72 if (m_pPathSelectorLabel)73 {74 /* Add into layout: */75 m_pLayout->addWidget(m_pPathSelectorLabel);76 }77 78 /* Create path selector editor: */79 m_pPathSelector = new UIFilePathSelector(this);80 if (m_pPathSelector)81 {82 m_pPathSelector->setResetEnabled(true);83 m_pPathSelector->setDefaultPath(vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder());84 m_pPathSelector->setPath(vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder());85 connect(m_pPathSelector, &UIFilePathSelector::pathChanged, this, &UIApplianceImportEditorWidget::sltHandlePathChanged);86 87 /* Add into layout: */88 m_pLayout->addWidget(m_pPathSelector);89 }90 91 69 /* Create options layout: */ 92 70 m_pOptionsLayout = new QGridLayout; … … 96 74 m_pOptionsLayout->setColumnStretch(1, 1); 97 75 76 /* Create path selector label: */ 77 m_pPathSelectorLabel = new QLabel; 78 if (m_pPathSelectorLabel) 79 { 80 m_pPathSelectorLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter); 81 82 /* Add into layout: */ 83 m_pOptionsLayout->addWidget(m_pPathSelectorLabel, 0, 0); 84 } 85 86 /* Create path selector editor: */ 87 m_pPathSelector = new UIFilePathSelector; 88 if (m_pPathSelector) 89 { 90 m_pPathSelector->setResetEnabled(true); 91 m_pPathSelector->setDefaultPath(vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder()); 92 m_pPathSelector->setPath(vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder()); 93 m_pPathSelectorLabel->setBuddy(m_pPathSelector); 94 95 /* Add into layout: */ 96 m_pOptionsLayout->addWidget(m_pPathSelector, 0, 1, 1, 2); 97 } 98 98 99 /* Create MAC address policy label: */ 99 100 m_pMACComboBoxLabel = new QLabel; … … 103 104 104 105 /* Add into layout: */ 105 m_pOptionsLayout->addWidget(m_pMACComboBoxLabel, 0, 0);106 m_pOptionsLayout->addWidget(m_pMACComboBoxLabel, 1, 0); 106 107 } 107 108 … … 114 115 115 116 /* Add into layout: */ 116 m_pOptionsLayout->addWidget(m_pMACComboBox, 0, 1, 1, 2);117 m_pOptionsLayout->addWidget(m_pMACComboBox, 1, 1, 1, 2); 117 118 } 118 119 … … 124 125 125 126 /* Add into layout: */ 126 m_pOptionsLayout->addWidget(m_pAdditionalOptionsLabel, 1, 0);127 m_pOptionsLayout->addWidget(m_pAdditionalOptionsLabel, 2, 0); 127 128 } 128 129 … … 133 134 134 135 /* Add into layout: */ 135 m_pOptionsLayout->addWidget(m_pImportHDsAsVDI, 1, 1);136 m_pOptionsLayout->addWidget(m_pImportHDsAsVDI, 2, 1); 136 137 } 137 138 … … 142 143 /* Populate MAC address import combo: */ 143 144 populateMACAddressImportPolicies(); 144 /* And connect this combo' signals afterwards: */ 145 /* And connect signals afterwards: */ 146 connect(m_pPathSelector, &UIFilePathSelector::pathChanged, 147 this, &UIApplianceImportEditorWidget::sltHandlePathChanged); 145 148 connect(m_pMACComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 146 149 this, &UIApplianceImportEditorWidget::sltHandleMACAddressImportPolicyComboChange); … … 314 317 UIApplianceEditorWidget::retranslateUi(); 315 318 if (m_pPathSelectorLabel) 316 m_pPathSelectorLabel->setText(UIWizardImportApp::tr("You can modify the base folder which will host all the virtual machines. " 317 "Home folders can also be individually (per virtual machine) modified.")); 319 m_pPathSelectorLabel->setText(tr("&Machine Base Folder:")); 318 320 if (m_pImportHDsAsVDI) 319 321 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.h
r76581 r79032 27 27 /* Forward declarations: */ 28 28 class UIFilePathSelector; 29 class QIRichTextLabel;30 29 class QComboBox; 31 30 class QGridLayout; … … 70 69 void updateMACAddressImportPolicyComboToolTip(); 71 70 72 Q IRichTextLabel*m_pPathSelectorLabel;71 QLabel *m_pPathSelectorLabel; 73 72 UIFilePathSelector *m_pPathSelector; 74 73 /** Holds the checkbox that controls 'import HDs as VDI' behaviour. */
Note:
See TracChangeset
for help on using the changeset viewer.