Changeset 88152 in vbox
- Timestamp:
- Mar 17, 2021 12:47:59 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIUserNamePasswordEditor.cpp
r87736 r88152 351 351 return; 352 352 pLabel->setAlignment(Qt::AlignRight); 353 pLabel->setSizePolicy(QSizePolicy::M aximum, QSizePolicy::Fixed);353 pLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 354 354 355 355 pLayout->addWidget(pLabel, iRow, 0, 1, 1); … … 371 371 QGridLayout *pMainLayout = new QGridLayout; 372 372 pMainLayout->setContentsMargins(0, 0, 0, 0); 373 pMainLayout->setColumnStretch(0, 0); 374 pMainLayout->setColumnStretch(1, 1); 373 375 if (!pMainLayout) 374 376 return; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
r88147 r88152 133 133 return m_pGAInstallationISOContainer; 134 134 135 /* Prepare GA Installation ISO container: */ 135 136 m_pGAInstallationISOContainer = new QGroupBox; 136 m_pGAInstallationISOContainer->setCheckable(true); 137 QGridLayout *pGAInstallationISOContainer = new QGridLayout(m_pGAInstallationISOContainer); 138 m_pGAISOPathLabel = new QLabel; 139 if (m_pGAISOPathLabel) 140 pGAInstallationISOContainer->addWidget(m_pGAISOPathLabel, 0, 1, 1, 1); 141 142 m_pGAISOFilePathSelector = new UIFilePathSelector; 143 { 144 m_pGAISOFilePathSelector->setResetEnabled(false); 145 m_pGAISOFilePathSelector->setMode(UIFilePathSelector::Mode_File_Open); 146 m_pGAISOFilePathSelector->setFileDialogFilters("*.iso *.ISO"); 147 m_pGAISOFilePathSelector->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum); 148 m_pGAISOFilePathSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD)); 149 pGAInstallationISOContainer->addWidget(m_pGAISOFilePathSelector, 0, 2, 1, 6); 150 if (m_pGAISOPathLabel) 151 m_pGAISOPathLabel->setBuddy(m_pGAISOFilePathSelector); 137 if (m_pGAInstallationISOContainer) 138 { 139 m_pGAInstallationISOContainer->setCheckable(true); 140 141 /* Prepare GA Installation ISO layout: */ 142 QHBoxLayout *pGAInstallationISOLayout = new QHBoxLayout(m_pGAInstallationISOContainer); 143 if (pGAInstallationISOLayout) 144 { 145 /* Prepare GA ISO path label: */ 146 m_pGAISOPathLabel = new QLabel; 147 if (m_pGAISOPathLabel) 148 { 149 m_pGAISOPathLabel->setAlignment(Qt::AlignRight); 150 m_pGAISOPathLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 151 152 pGAInstallationISOLayout->addWidget(m_pGAISOPathLabel); 153 } 154 /* Prepare GA ISO path editor: */ 155 m_pGAISOFilePathSelector = new UIFilePathSelector; 156 { 157 m_pGAISOFilePathSelector->setResetEnabled(false); 158 m_pGAISOFilePathSelector->setMode(UIFilePathSelector::Mode_File_Open); 159 m_pGAISOFilePathSelector->setFileDialogFilters("*.iso *.ISO"); 160 m_pGAISOFilePathSelector->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 161 m_pGAISOFilePathSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD)); 162 if (m_pGAISOPathLabel) 163 m_pGAISOPathLabel->setBuddy(m_pGAISOFilePathSelector); 164 165 pGAInstallationISOLayout->addWidget(m_pGAISOFilePathSelector); 166 } 167 } 152 168 } 153 169 … … 186 202 if (m_pGAInstallationISOContainer) 187 203 { 188 m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("&Guest Additions"));204 m_pGAInstallationISOContainer->setTitle(UIWizardNewVM::tr("&Guest additions")); 189 205 m_pGAInstallationISOContainer->setToolTip(UIWizardNewVM::tr("<p>When checked the guest additions will be installed " 190 206 "after the OS install.</p>")); … … 250 266 m_pAdditionalOptionsContainer = new QGroupBox; 251 267 QGridLayout *pAdditionalOptionsContainerLayout = new QGridLayout(m_pAdditionalOptionsContainer); 268 pAdditionalOptionsContainerLayout->setColumnStretch(0, 0); 269 pAdditionalOptionsContainerLayout->setColumnStretch(1, 1); 270 271 m_pProductKeyLabel = new QLabel; 272 if (m_pProductKeyLabel) 273 { 274 m_pProductKeyLabel->setAlignment(Qt::AlignRight); 275 m_pProductKeyLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 276 pAdditionalOptionsContainerLayout->addWidget(m_pProductKeyLabel, 0, 0); 277 } 278 m_pProductKeyLineEdit = new QLineEdit; 279 if (m_pProductKeyLineEdit) 280 { 281 m_pProductKeyLineEdit->setInputMask(">NNNNN-NNNNN-NNNNN-NNNNN-NNNNN;#"); 282 if (m_pProductKeyLabel) 283 m_pProductKeyLabel->setBuddy(m_pProductKeyLineEdit); 284 pAdditionalOptionsContainerLayout->addWidget(m_pProductKeyLineEdit, 0, 1, 1, 2); 285 } 286 287 m_pHostnameLabel = new QLabel; 288 if (m_pHostnameLabel) 289 { 290 m_pHostnameLabel->setAlignment(Qt::AlignRight); 291 m_pHostnameLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 292 pAdditionalOptionsContainerLayout->addWidget(m_pHostnameLabel, 1, 0); 293 } 294 m_pHostnameLineEdit = new QLineEdit; 295 if (m_pHostnameLineEdit) 296 { 297 if (m_pHostnameLabel) 298 m_pHostnameLabel->setBuddy(m_pHostnameLineEdit); 299 pAdditionalOptionsContainerLayout->addWidget(m_pHostnameLineEdit, 1, 1, 1, 2); 300 } 301 252 302 m_pStartHeadlessCheckBox = new QCheckBox; 253 303 if (m_pStartHeadlessCheckBox) 254 pAdditionalOptionsContainerLayout->addWidget(m_pStartHeadlessCheckBox, 0, 0, 1, 4); 255 256 m_pProductKeyLabel = new QLabel; 257 if (m_pProductKeyLabel) 258 { 259 m_pProductKeyLabel->setAlignment(Qt::AlignRight); 260 m_pProductKeyLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 261 pAdditionalOptionsContainerLayout->addWidget(m_pProductKeyLabel, 1, 0, 1, 1); 262 } 263 m_pProductKeyLineEdit = new QLineEdit; 264 if (m_pProductKeyLineEdit) 265 { 266 m_pProductKeyLineEdit->setInputMask(">NNNNN-NNNNN-NNNNN-NNNNN-NNNNN;#"); 267 pAdditionalOptionsContainerLayout->addWidget(m_pProductKeyLineEdit, 1, 1, 1, 3); 268 if (m_pProductKeyLabel) 269 m_pProductKeyLabel->setBuddy(m_pProductKeyLineEdit); 270 } 271 272 m_pHostnameLabel = new QLabel; 273 if (m_pHostnameLabel) 274 { 275 m_pHostnameLabel->setAlignment(Qt::AlignRight); 276 m_pHostnameLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 277 pAdditionalOptionsContainerLayout->addWidget(m_pHostnameLabel, 2, 0, 1, 1); 278 } 279 280 m_pHostnameLineEdit = new QLineEdit; 281 if (m_pHostnameLineEdit) 282 { 283 pAdditionalOptionsContainerLayout->addWidget(m_pHostnameLineEdit, 2, 1, 1, 3); 284 if (m_pHostnameLabel) 285 m_pHostnameLabel->setBuddy(m_pHostnameLineEdit); 286 } 304 pAdditionalOptionsContainerLayout->addWidget(m_pStartHeadlessCheckBox, 2, 1); 287 305 288 306 return m_pAdditionalOptionsContainer;
Note:
See TracChangeset
for help on using the changeset viewer.