Changeset 88101 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
- Timestamp:
- Mar 12, 2021 1:26:56 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r87736 r88101 42 42 bool fChooseName /* = true */, 43 43 bool fChoosePath /* = false */, 44 bool fChooseType /* = true */) 44 bool fChooseType /* = true */, 45 bool fChooseISOFile /* = false */) 45 46 : QIWithRetranslateUI<QWidget>(pParent) 46 47 , m_fChooseName(fChooseName) 47 48 , m_fChoosePath(fChoosePath) 49 , m_fChooseISOFile(fChooseISOFile) 48 50 , m_fChooseType(fChooseType) 49 51 , m_fSupportsHWVirtEx(false) … … 52 54 , m_pNameLabel(0) 53 55 , m_pPathLabel(0) 56 , m_pISOFileSelectorLabel(0) 54 57 , m_pLabelFamily(0) 55 58 , m_pLabelType(0) … … 57 60 , m_pNameLineEdit(0) 58 61 , m_pPathSelector(0) 62 , m_pISOFileSelector(0) 59 63 , m_pComboFamily(0) 60 64 , m_pComboType(0) … … 99 103 } 100 104 105 void UINameAndSystemEditor::setFileSelectorDialogFilters(const QString &strFilters) 106 { 107 if (m_pISOFileSelector) 108 m_pISOFileSelector->setFileDialogFilters(strFilters); 109 } 110 101 111 void UINameAndSystemEditor::setName(const QString &strName) 102 112 { … … 266 276 if (m_pPathLabel) 267 277 m_pPathLabel->setText(tr("Folder:")); 278 if (m_pISOFileSelectorLabel) 279 m_pISOFileSelectorLabel->setText(tr("Installation ISO:")); 268 280 if (m_pLabelFamily) 269 281 m_pLabelFamily->setText(tr("&Type:")); … … 452 464 } 453 465 466 if (m_fChooseISOFile) 467 { 468 m_pISOFileSelectorLabel = new QLabel(this); 469 m_pMainLayout->addWidget(m_pISOFileSelectorLabel, iRow, 0); 470 471 m_pISOFileSelector = new UIFilePathSelector(this); 472 if (m_pISOFileSelector) 473 { 474 m_pISOFileSelector->setResetEnabled(false); 475 m_pISOFileSelector->setMode(UIFilePathSelector::Mode_File_Open); 476 m_pISOFileSelector->setFileDialogFilters("*.iso *.ISO"); 477 m_pISOFileSelector->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); 478 m_pISOFileSelector->setInitialPath(uiCommon().defaultFolderPathForType(UIMediumDeviceType_DVD)); 479 m_pISOFileSelectorLabel->setBuddy(m_pISOFileSelector); 480 m_pMainLayout->addWidget(m_pISOFileSelector, iRow, 1, 1, 2); 481 } 482 ++iRow; 483 } 484 454 485 if (m_fChooseType) 455 486 { … … 460 491 m_pLabelFamily->setAlignment(Qt::AlignRight); 461 492 m_pLabelFamily->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); 462 463 493 /* Add into layout: */ 464 494 m_pMainLayout->addWidget(m_pLabelFamily, iRow, 0);
Note:
See TracChangeset
for help on using the changeset viewer.