Changeset 87845 in vbox
- Timestamp:
- Feb 23, 2021 11:17:12 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
r87775 r87845 67 67 } 68 68 } 69 m_pSize Cnt= new QGroupBox(this);70 { 71 m_pSize Cnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);72 QVBoxLayout *pSize CntLayout = new QVBoxLayout(m_pSizeCnt);69 m_pSizeGroupBox = new QGroupBox(this); 70 { 71 m_pSizeGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 72 QVBoxLayout *pSizeGroupBoxLayout = new QVBoxLayout(m_pSizeGroupBox); 73 73 { 74 74 m_pEditorSize = new UIMediumSizeEditor; 75 75 { 76 pSize CntLayout->addWidget(m_pEditorSize);76 pSizeGroupBoxLayout->addWidget(m_pEditorSize); 77 77 } 78 78 } 79 79 } 80 m_pFormat Cnt= new QGroupBox(this);81 { 82 m_pFormat Cnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);83 QVBoxLayout *pFormat CntLayout = new QVBoxLayout(m_pFormatCnt);80 m_pFormatGroupBox = new QGroupBox(this); 81 { 82 m_pFormatGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 83 QVBoxLayout *pFormatGroupBoxLayout = new QVBoxLayout(m_pFormatGroupBox); 84 84 { 85 m_pFormatButtonGroup = new QButtonGroup(m_pFormat Cnt);85 m_pFormatButtonGroup = new QButtonGroup(m_pFormatGroupBox); 86 86 { 87 87 /* Enumerate medium formats in special order: */ … … 108 108 /* Create buttons for VDI, preferred and others: */ 109 109 foreach (const QString &strId, vdi.keys()) 110 addFormatButton(this, pFormat CntLayout, vdi.value(strId), true);110 addFormatButton(this, pFormatGroupBoxLayout, vdi.value(strId), true); 111 111 foreach (const QString &strId, preferred.keys()) 112 addFormatButton(this, pFormat CntLayout, preferred.value(strId), true);112 addFormatButton(this, pFormatGroupBoxLayout, preferred.value(strId), true); 113 113 foreach (const QString &strId, others.keys()) 114 addFormatButton(this, pFormat CntLayout, others.value(strId));114 addFormatButton(this, pFormatGroupBoxLayout, others.value(strId)); 115 115 116 116 if (!m_pFormatButtonGroup->buttons().isEmpty()) … … 122 122 } 123 123 } 124 m_pVariant Cnt= new QGroupBox(this);125 { 126 m_pVariant Cnt->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);127 QVBoxLayout *pVariant CntLayout = new QVBoxLayout(m_pVariantCnt);124 m_pVariantGroupBox = new QGroupBox(this); 125 { 126 m_pVariantGroupBox->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 127 QVBoxLayout *pVariantGroupBoxLayout = new QVBoxLayout(m_pVariantGroupBox); 128 128 { 129 m_pVariantButtonGroup = new QButtonGroup(m_pVariant Cnt);129 m_pVariantButtonGroup = new QButtonGroup(m_pVariantGroupBox); 130 130 { 131 m_pDynamicalButton = new QRadioButton(m_pVariant Cnt);131 m_pDynamicalButton = new QRadioButton(m_pVariantGroupBox); 132 132 { 133 133 m_pDynamicalButton->click(); 134 134 m_pDynamicalButton->setFocus(); 135 135 } 136 m_pFixedButton = new QRadioButton(m_pVariant Cnt);136 m_pFixedButton = new QRadioButton(m_pVariantGroupBox); 137 137 m_pVariantButtonGroup->addButton(m_pDynamicalButton, 0); 138 138 m_pVariantButtonGroup->addButton(m_pFixedButton, 1); 139 139 } 140 m_pSplitBox = new QCheckBox(m_pVariant Cnt);141 pVariant CntLayout->addWidget(m_pDynamicalButton);142 pVariant CntLayout->addWidget(m_pFixedButton);143 pVariant CntLayout->addWidget(m_pSplitBox);140 m_pSplitBox = new QCheckBox(m_pVariantGroupBox); 141 pVariantGroupBoxLayout->addWidget(m_pDynamicalButton); 142 pVariantGroupBoxLayout->addWidget(m_pFixedButton); 143 pVariantGroupBoxLayout->addWidget(m_pSplitBox); 144 144 } 145 145 } 146 146 pMainLayout->addWidget(m_pLocationCnt, 0, 0, 1, 2); 147 pMainLayout->addWidget(m_pSize Cnt, 1, 0, 1, 2);148 pMainLayout->addWidget(m_pFormat Cnt, 2, 0, Qt::AlignTop);149 pMainLayout->addWidget(m_pVariant Cnt, 2, 1, Qt::AlignTop);147 pMainLayout->addWidget(m_pSizeGroupBox, 1, 0, 1, 2); 148 pMainLayout->addWidget(m_pFormatGroupBox, 2, 0, Qt::AlignTop); 149 pMainLayout->addWidget(m_pVariantGroupBox, 2, 1, Qt::AlignTop); 150 150 setMediumSize(uDefaultSize); 151 151 sltMediumFormatChanged(); … … 234 234 m_pLocationCnt->setTitle(UIWizardNewVD::tr("File &location")); 235 235 m_pLocationOpenButton->setToolTip(UIWizardNewVD::tr("Choose a location for new virtual hard disk file...")); 236 m_pSize Cnt->setTitle(UIWizardNewVD::tr("File &size"));237 m_pFormat Cnt->setTitle(UIWizardNewVD::tr("Hard disk file &type"));236 m_pSizeGroupBox->setTitle(UIWizardNewVD::tr("File &size")); 237 m_pFormatGroupBox->setTitle(UIWizardNewVD::tr("Hard disk file &type")); 238 238 QList<QAbstractButton*> buttons = m_pFormatButtonGroup->buttons(); 239 239 for (int i = 0; i < buttons.size(); ++i) … … 243 243 pButton->setText(gpConverter->toString(enmFormat)); 244 244 } 245 m_pVariant Cnt->setTitle(UIWizardNewVD::tr("Storage on physical hard disk"));245 m_pVariantGroupBox->setTitle(UIWizardNewVD::tr("Storage on physical hard disk")); 246 246 m_pDynamicalButton->setText(UIWizardNewVD::tr("&Dynamically allocated")); 247 247 m_pFixedButton->setText(UIWizardNewVD::tr("&Fixed size")); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.h
r87775 r87845 78 78 79 79 /* Widgets: */ 80 QGroupBox *m_pFormat Cnt;81 QGroupBox *m_pVariant Cnt;80 QGroupBox *m_pFormatGroupBox; 81 QGroupBox *m_pVariantGroupBox; 82 82 QGroupBox *m_pLocationCnt; 83 QGroupBox *m_pSize Cnt;83 QGroupBox *m_pSizeGroupBox; 84 84 }; 85 85
Note:
See TracChangeset
for help on using the changeset viewer.