- Timestamp:
- Oct 5, 2018 1:06:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
r74626 r74628 74 74 void UIApplianceImportEditorWidget::prepareWidgets() 75 75 { 76 /* Create path selector label: */ 76 77 m_pPathSelectorLabel = new QIRichTextLabel(this); 77 78 if (m_pPathSelectorLabel) 78 79 { 80 /* Add into layout: */ 79 81 m_pLayout->addWidget(m_pPathSelectorLabel); 80 82 } 83 84 /* Create path selector editor: */ 81 85 m_pPathSelector = new UIFilePathSelector(this); 82 86 if (m_pPathSelector) … … 86 90 m_pPathSelector->setPath(vboxGlobal().virtualBox().GetSystemProperties().GetDefaultMachineFolder()); 87 91 connect(m_pPathSelector, &UIFilePathSelector::pathChanged, this, &UIApplianceImportEditorWidget::sltHandlePathChanged); 92 93 /* Add into layout: */ 88 94 m_pLayout->addWidget(m_pPathSelector); 89 95 } 90 96 97 /* Create options layout: */ 91 98 m_pOptionsLayout = new QGridLayout; 92 93 m_pMACComboBox = new QComboBox; 94 if (m_pMACComboBox) 95 { 96 m_pMACComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); 99 if (m_pOptionsLayout) 100 { 101 m_pOptionsLayout->setColumnStretch(0, 0); 102 m_pOptionsLayout->setColumnStretch(1, 1); 103 104 /* Create MAC address policy label: */ 105 m_pMACComboBoxLabel = new QLabel; 106 if (m_pMACComboBoxLabel) 107 { 108 m_pMACComboBoxLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter); 109 110 /* Add into layout: */ 111 m_pOptionsLayout->addWidget(m_pMACComboBoxLabel, 0, 0); 112 } 113 114 /* Create MAC address policy combo: */ 115 m_pMACComboBox = new QComboBox; 116 if (m_pMACComboBox) 117 { 118 m_pMACComboBox->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); 119 m_pMACComboBoxLabel->setBuddy(m_pMACComboBox); 120 121 /* Add into layout: */ 122 m_pOptionsLayout->addWidget(m_pMACComboBox, 0, 1, 1, 2); 123 } 124 125 /* Create additional options label: */ 126 m_pAdditionalOptionsLabel = new QLabel; 127 if (m_pAdditionalOptionsLabel) 128 { 129 m_pAdditionalOptionsLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter); 130 131 /* Add into layout: */ 132 m_pOptionsLayout->addWidget(m_pAdditionalOptionsLabel, 1, 0); 133 } 134 135 /* Create import HDs as VDIs checkbox: */ 136 m_pImportHDsAsVDI = new QCheckBox; 137 { 138 m_pImportHDsAsVDI->setCheckState(Qt::Checked); 139 140 /* Add into layout: */ 141 m_pOptionsLayout->addWidget(m_pImportHDsAsVDI, 1, 1); 142 } 143 97 144 /* Add into layout: */ 98 m_pOptionsLayout->addWidget(m_pMACComboBox, 0, 1); 99 } 100 101 /* Create format combo-box label: */ 102 m_pMACComboBoxLabel = new QLabel; 103 if (m_pMACComboBoxLabel) 104 { 105 m_pMACComboBoxLabel->setAlignment(Qt::AlignLeft | Qt::AlignTrailing | Qt::AlignVCenter); 106 /* Add into layout: */ 107 m_pOptionsLayout->addWidget(m_pMACComboBoxLabel, 0, 0); 108 } 109 110 if (m_pMACComboBoxLabel) 111 m_pMACComboBoxLabel->setBuddy(m_pMACComboBox); 112 113 m_pAdditionalOptionsLabel = new QLabel; 114 if (m_pAdditionalOptionsLabel) 115 { 116 m_pAdditionalOptionsLabel->setAlignment(Qt::AlignRight | Qt::AlignTrailing | Qt::AlignVCenter); 117 m_pOptionsLayout->addWidget(m_pAdditionalOptionsLabel, 2, 0, 1, 1); 118 } 119 120 m_pImportHDsAsVDI = new QCheckBox; 121 { 122 m_pOptionsLayout->addWidget(m_pImportHDsAsVDI, 2, 1); 123 m_pImportHDsAsVDI->setCheckState(Qt::Checked); 124 } 125 126 127 m_pLayout->addLayout(m_pOptionsLayout); 145 m_pLayout->addLayout(m_pOptionsLayout); 146 } 147 148 /* Populate MAC address import combo: */ 128 149 populateMACAddressImportPolicies(); 150 /* And connect this combo' signals afterwards: */ 129 151 connect(m_pMACComboBox, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 130 152 this, &UIApplianceImportEditorWidget::sltHandleMACAddressImportPolicyComboChange); 153 154 /* Apply language settings: */ 131 155 retranslateUi(); 132 156 }
Note:
See TracChangeset
for help on using the changeset viewer.