Changeset 87244 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jan 13, 2021 7:38:24 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.cpp
r87240 r87244 286 286 } 287 287 288 int UIWizardNewVMPage1::createNameOSTypeWidgets(QGridLayout *pLayout, bool fCreateLabels /* = true */) 289 { 290 AssertReturn(pLayout, 0); 288 QWidget *UIWizardNewVMPage1::createNameOSTypeWidgets(WizardMode mode, bool fCreateLabels /* = true */) 289 { 290 Q_UNUSED(mode); 291 QWidget *pContainer = new QWidget; 292 QGridLayout *pLayout = new QGridLayout(pContainer); 291 293 int iRow = 0; 292 294 if (fCreateLabels) … … 344 346 if (m_pSystemTypeEditor) 345 347 pLayout->addWidget(m_pSystemTypeEditor, iRow++, 0, 1, 4); 346 return iRow;348 return pContainer; 347 349 } 348 350 … … 517 519 void UIWizardNewVMPageBasic1::prepare() 518 520 { 519 Q GridLayout *pPageLayout = new QGridLayout(this);520 int iRow = createNameOSTypeWidgets(pPageLayout, false);521 pPageLayout->add Item(new QSpacerItem(20, 40, QSizePolicy::Expanding, QSizePolicy::Expanding),522 iRow, 0, 1, 4); 521 QVBoxLayout *pPageLayout = new QVBoxLayout(this); 522 pPageLayout->addWidget(createNameOSTypeWidgets(WizardMode_Basic, false)); 523 pPageLayout->addStretch(); 524 523 525 createConnections(); 524 526 /* Register fields: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic1.h
r87240 r87244 24 24 /* Local includes: */ 25 25 #include "UIWizardPage.h" 26 #include "UIExtraDataDefs.h" 26 27 27 28 /* Forward declarations: */ … … 76 77 /** calls CVirtualBox::ComposeMachineFilename(...) and sets related member variables */ 77 78 void composeMachineFilePath(); 78 /** Creates the page widgets and adds them into the @p pGridLayout. */ 79 80 QWidget *createNameOSTypeWidgets(WizardMode mode, bool fCreateLabels = true); 79 81 int createNameOSTypeWidgets(QGridLayout *pLayout, bool fCreateLabels = true); 80 82 void setTypeByISODetectedOSType(const QString &strDetectedOSType); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r87243 r87244 44 44 UIWizardNewVMPageExpert::UIWizardNewVMPageExpert(const QString &strGroup) 45 45 : UIWizardNewVMPage1(strGroup) 46 , m_pNameAndSystemContainer(0)47 46 , m_pToolBox(0) 48 47 { … … 51 50 { 52 51 m_pToolBox = new QToolBox; 53 m_pNameAndSystemContainer = new QWidget(this); 54 QGridLayout *pNameContainerLayout = new QGridLayout(m_pNameAndSystemContainer); 55 createNameOSTypeWidgets(pNameContainerLayout, false); 56 m_pGAInstallContainer = createGAInstallWidgets(); 57 m_pUsernameHostnameContainer = createUserNameHostNameWidgets(); 58 59 m_pToolBox->insertItem(ExpertToolboxItems_NameAndOSType, m_pNameAndSystemContainer, ""); 52 53 m_pToolBox->insertItem(ExpertToolboxItems_NameAndOSType, createNameOSTypeWidgets(WizardMode_Expert, false), ""); 60 54 m_pToolBox->insertItem(ExpertToolboxItems_Disk, createDiskWidgets(), ""); 61 55 m_pToolBox->insertItem(ExpertToolboxItems_Hardware, createHardwareWidgets(), ""); 62 m_pToolBox->insertItem(ExpertToolboxItems_UsernameHostname, m_pUsernameHostnameContainer, "");63 m_pToolBox->insertItem(ExpertToolboxItems_GAInstall, m_pGAInstallContainer, "");56 m_pToolBox->insertItem(ExpertToolboxItems_UsernameHostname, createUserNameHostNameWidgets(), ""); 57 m_pToolBox->insertItem(ExpertToolboxItems_GAInstall, createGAInstallWidgets(), ""); 64 58 m_pToolBox->insertItem(ExpertToolboxItems_ProductKey, createProductKeyWidgets(), ""); 65 59 pMainLayout->addWidget(m_pToolBox); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r87060 r87244 110 110 void disableEnableUnattendedRelatedWidgets(bool fEnabled); 111 111 void markWidgets() const; 112 /** Widgets. */ 113 QWidget *m_pNameAndSystemContainer; 114 QWidget *m_pGAInstallContainer; 115 QWidget *m_pUsernameHostnameContainer; 112 116 113 QToolBox *m_pToolBox; 117 114 };
Note:
See TracChangeset
for help on using the changeset viewer.