Changeset 88148 in vbox
- Timestamp:
- Mar 17, 2021 9:51:23 AM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 143297
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r88107 r88148 286 286 { 287 287 if (m_pNameLabel) 288 m_pNameLabel->setText(tr(" Name:"));288 m_pNameLabel->setText(tr("&Name:")); 289 289 if (m_pPathLabel) 290 m_pPathLabel->setText(tr(" Folder:"));290 m_pPathLabel->setText(tr("&Folder:")); 291 291 if (m_pISOFileSelectorLabel) 292 m_pISOFileSelectorLabel->setText(tr(" Installation ISO:"));292 m_pISOFileSelectorLabel->setText(tr("&Image:")); 293 293 if (m_pLabelFamily) 294 294 m_pLabelFamily->setText(tr("&Type:")); … … 417 417 void UINameAndSystemEditor::prepareWidgets() 418 418 { 419 /* Create main-layout: */419 /* Prepare main-layout: */ 420 420 m_pMainLayout = new QGridLayout(this); 421 421 if (m_pMainLayout) … … 429 429 if (m_fChooseName) 430 430 { 431 /* Create name label: */432 m_pNameLabel = new QLabel ;431 /* Prepare name label: */ 432 m_pNameLabel = new QLabel(this); 433 433 if (m_pNameLabel) 434 434 { … … 436 436 m_pNameLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 437 437 438 /* Add into layout: */ 439 m_pMainLayout->addWidget(m_pNameLabel, iRow, 0, 1, 1); 440 } 441 /* Create name editor: */ 442 m_pNameLineEdit = new QILineEdit; 438 m_pMainLayout->addWidget(m_pNameLabel, iRow, 0); 439 } 440 /* Prepare name editor: */ 441 m_pNameLineEdit = new QILineEdit(this); 443 442 if (m_pNameLineEdit) 444 443 { 445 /* Add into layout: */444 m_pNameLabel->setBuddy(m_pNameLineEdit); 446 445 m_pMainLayout->addWidget(m_pNameLineEdit, iRow, 1, 1, 2); 447 446 } … … 452 451 if (m_fChoosePath) 453 452 { 454 /* Create path label: */455 m_pPathLabel = new QLabel ;453 /* Prepare path label: */ 454 m_pPathLabel = new QLabel(this); 456 455 if (m_pPathLabel) 457 456 { … … 459 458 m_pPathLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 460 459 461 /* Add into layout: */ 462 m_pMainLayout->addWidget(m_pPathLabel, iRow, 0, 1, 1); 463 } 464 /* Create path selector: */ 465 m_pPathSelector = new UIFilePathSelector; 460 m_pMainLayout->addWidget(m_pPathLabel, iRow, 0); 461 } 462 /* Prepare path selector: */ 463 m_pPathSelector = new UIFilePathSelector(this); 466 464 if (m_pPathSelector) 467 465 { 466 m_pPathLabel->setBuddy(m_pPathSelector); 468 467 QString strDefaultMachineFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 469 468 m_pPathSelector->setPath(strDefaultMachineFolder); 470 469 m_pPathSelector->setDefaultPath(strDefaultMachineFolder); 471 470 472 /* Add into layout: */473 471 m_pMainLayout->addWidget(m_pPathSelector, iRow, 1, 1, 2); 474 472 } … … 479 477 if (m_fChooseISOFile) 480 478 { 479 /* Prepare ISO label: */ 481 480 m_pISOFileSelectorLabel = new QLabel(this); 482 m_pMainLayout->addWidget(m_pISOFileSelectorLabel, iRow, 0); 483 481 if (m_pISOFileSelectorLabel) 482 { 483 m_pISOFileSelectorLabel->setAlignment(Qt::AlignRight); 484 m_pISOFileSelectorLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 485 486 m_pMainLayout->addWidget(m_pISOFileSelectorLabel, iRow, 0); 487 } 488 /* Prepare ISO selector: */ 484 489 m_pISOFileSelector = new UIFilePathSelector(this); 485 490 if (m_pISOFileSelector) … … 488 493 m_pISOFileSelector->setMode(UIFilePathSelector::Mode_File_Open); 489 494 m_pISOFileSelector->setFileDialogFilters("*.iso *.ISO"); 490 m_pISOFileSelector->setSizePolicy(QSizePolicy:: Expanding, QSizePolicy::Fixed);495 m_pISOFileSelector->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 491 496 m_pISOFileSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD)); 492 497 m_pISOFileSelectorLabel->setBuddy(m_pISOFileSelector); 498 493 499 m_pMainLayout->addWidget(m_pISOFileSelector, iRow, 1, 1, 2); 494 500 } 501 495 502 ++iRow; 496 503 } … … 498 505 if (m_fChooseType) 499 506 { 500 /* Create VM OS family label: */501 m_pLabelFamily = new QLabel ;507 /* Prepare VM OS family label: */ 508 m_pLabelFamily = new QLabel(this); 502 509 if (m_pLabelFamily) 503 510 { 504 511 m_pLabelFamily->setAlignment(Qt::AlignRight); 505 512 m_pLabelFamily->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 506 /* Add into layout: */ 513 507 514 m_pMainLayout->addWidget(m_pLabelFamily, iRow, 0); 508 515 } 509 510 int iIconRow = iRow; 511 512 /* Create VM OS family combo: */ 513 m_pComboFamily = new QComboBox; 516 /* Prepare VM OS family combo: */ 517 m_pComboFamily = new QComboBox(this); 514 518 if (m_pComboFamily) 515 519 { … … 517 521 m_pLabelFamily->setBuddy(m_pComboFamily); 518 522 519 /* Add into layout: */520 523 m_pMainLayout->addWidget(m_pComboFamily, iRow, 1); 521 524 } 522 525 526 const int iIconRow = iRow; 523 527 ++iRow; 524 528 525 /* Create VM OS type label: */526 m_pLabelType = new QLabel ;529 /* Prepare VM OS type label: */ 530 m_pLabelType = new QLabel(this); 527 531 if (m_pLabelType) 528 532 { … … 530 534 m_pLabelType->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 531 535 532 /* Add into layout: */533 536 m_pMainLayout->addWidget(m_pLabelType, iRow, 0); 534 537 } 535 /* Create VM OS type combo: */536 m_pComboType = new QComboBox ;538 /* Prepare VM OS type combo: */ 539 m_pComboType = new QComboBox(this); 537 540 if (m_pComboType) 538 541 { … … 540 543 m_pLabelType->setBuddy(m_pComboType); 541 544 542 /* Add into layout: */543 545 m_pMainLayout->addWidget(m_pComboType, iRow, 1); 544 546 } … … 546 548 ++iRow; 547 549 548 /* Create sub-layout: */550 /* Prepare sub-layout: */ 549 551 QVBoxLayout *pLayoutIcon = new QVBoxLayout; 550 552 if (pLayoutIcon) 551 553 { 552 /* Create VM OS type icon: */553 m_pIconType = new QLabel ;554 /* Prepare VM OS type icon: */ 555 m_pIconType = new QLabel(this); 554 556 if (m_pIconType) 555 557 { 556 558 m_pIconType->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 557 558 /* Add into layout: */559 559 pLayoutIcon->addWidget(m_pIconType); 560 560 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r88116 r88148 235 235 QWidget *UIWizardNewVMPage1::createNameOSTypeWidgets() 236 236 { 237 /* Prepare container widget: */ 237 238 QWidget *pContainerWidget = new QWidget; 238 QVBoxLayout *pLayout = new QVBoxLayout(pContainerWidget); 239 pLayout->setContentsMargins(0, 0, 0, 0); 240 241 /* Prepare Name and OS Type editor: */ 242 m_pNameAndSystemEditor = new UINameAndSystemEditor(0, 243 true /* fChooseName? */, 244 true /* fChoosePath? */, 245 true /* fChooseType? */, 246 true /* fChooseISOFile? */); 247 pLayout->addWidget(m_pNameAndSystemEditor); 248 m_pSkipUnattendedCheckBox = new QCheckBox; 249 pLayout->addWidget(m_pSkipUnattendedCheckBox); 239 if (pContainerWidget) 240 { 241 /* Prepare layout: */ 242 QVBoxLayout *pLayout = new QVBoxLayout(pContainerWidget); 243 if (pLayout) 244 { 245 pLayout->setContentsMargins(0, 0, 0, 0); 246 247 /* Prepare Name and OS Type editor: */ 248 m_pNameAndSystemEditor = new UINameAndSystemEditor(0, 249 true /* fChooseName? */, 250 true /* fChoosePath? */, 251 true /* fChooseType? */, 252 true /* fChooseISOFile? */); 253 if (m_pNameAndSystemEditor) 254 pLayout->addWidget(m_pNameAndSystemEditor); 255 256 /* Prepare Skip Unattended checkbox: */ 257 m_pSkipUnattendedCheckBox = new QCheckBox; 258 if (m_pSkipUnattendedCheckBox) 259 pLayout->addWidget(m_pSkipUnattendedCheckBox); 260 } 261 } 262 263 /* Return container widget: */ 250 264 return pContainerWidget; 251 265 }
Note:
See TracChangeset
for help on using the changeset viewer.