Changeset 88038 in vbox
- Timestamp:
- Mar 9, 2021 9:11:02 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.cpp
r87972 r88038 54 54 , m_pLocationEditor(0) 55 55 , m_pLocationOpenButton(0) 56 , m_p SizeEditor(0)57 , m_p SizeEditorLabel(0)56 , m_pMediumSizeEditor(0) 57 , m_pMediumSizeEditorLabel(0) 58 58 , m_pLocationLabel(0) 59 59 , m_pSizeLabel(0) … … 66 66 , m_pLocationEditor(0) 67 67 , m_pLocationOpenButton(0) 68 , m_p SizeEditor(0)69 , m_p SizeEditorLabel(0)68 , m_pMediumSizeEditor(0) 69 , m_pMediumSizeEditorLabel(0) 70 70 , m_pLocationLabel(0) 71 71 , m_pSizeLabel(0) … … 222 222 qulonglong UIWizardNewVDPage3::mediumSize() const 223 223 { 224 return m_p SizeEditor ? m_pSizeEditor->mediumSize() : 0;224 return m_pMediumSizeEditor ? m_pMediumSizeEditor->mediumSize() : 0; 225 225 } 226 226 227 227 void UIWizardNewVDPage3::setMediumSize(qulonglong uMediumSize) 228 228 { 229 if (m_p SizeEditor)230 m_p SizeEditor->setMediumSize(uMediumSize);229 if (m_pMediumSizeEditor) 230 m_pMediumSizeEditor->setMediumSize(uMediumSize); 231 231 } 232 232 … … 280 280 "This size is the limit on the amount of file data " 281 281 "that a virtual machine will be able to store on the hard disk.")); 282 if (m_p SizeEditorLabel)283 m_p SizeEditorLabel->setText(UIWizardNewVD::tr("D&isk size:"));282 if (m_pMediumSizeEditorLabel) 283 m_pMediumSizeEditorLabel->setText(UIWizardNewVD::tr("D&isk size:")); 284 284 } 285 285 … … 303 303 } 304 304 m_pSizeLabel = new QIRichTextLabel(this); 305 m_p SizeEditor = new UIMediumSizeEditor;305 m_pMediumSizeEditor = new UIMediumSizeEditor; 306 306 setMediumSize(uDefaultSize); 307 307 pMainLayout->addWidget(m_pLocationLabel); 308 308 pMainLayout->addLayout(pLocationLayout); 309 309 pMainLayout->addWidget(m_pSizeLabel); 310 pMainLayout->addWidget(m_p SizeEditor);310 pMainLayout->addWidget(m_pMediumSizeEditor); 311 311 pMainLayout->addStretch(); 312 312 } … … 315 315 connect(m_pLocationEditor, &QLineEdit::textChanged, this, &UIWizardNewVDPageBasic3::completeChanged); 316 316 connect(m_pLocationOpenButton, &QIToolButton::clicked, this, &UIWizardNewVDPageBasic3::sltSelectLocationButtonClicked); 317 connect(m_p SizeEditor, &UIMediumSizeEditor::sigSizeChanged, this, &UIWizardNewVDPageBasic3::completeChanged);317 connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged, this, &UIWizardNewVDPageBasic3::completeChanged); 318 318 319 319 /* Register fields: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageBasic3.h
r87972 r88038 80 80 QLineEdit *m_pLocationEditor; 81 81 QIToolButton *m_pLocationOpenButton; 82 UIMediumSizeEditor *m_p SizeEditor;83 QLabel *m_p SizeEditorLabel;82 UIMediumSizeEditor *m_pMediumSizeEditor; 83 QLabel *m_pMediumSizeEditorLabel; 84 84 QIRichTextLabel *m_pLocationLabel; 85 85 QIRichTextLabel *m_pSizeLabel; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDPageExpert.cpp
r87973 r88038 76 76 QVBoxLayout *pSizeGroupBoxLayout = new QVBoxLayout(m_pSizeGroupBox); 77 77 { 78 m_p SizeEditor = new UIMediumSizeEditor;78 m_pMediumSizeEditor = new UIMediumSizeEditor; 79 79 { 80 pSizeGroupBoxLayout->addWidget(m_p SizeEditor);80 pSizeGroupBoxLayout->addWidget(m_pMediumSizeEditor); 81 81 } 82 82 } … … 118 118 connect(m_pLocationOpenButton, &QIToolButton::clicked, 119 119 this, &UIWizardNewVDPageExpert::sltSelectLocationButtonClicked); 120 connect(m_p SizeEditor, &UIMediumSizeEditor::sigSizeChanged,120 connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged, 121 121 this, &UIWizardNewVDPageExpert::completeChanged); 122 122 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r88019 r88038 112 112 bool getBoolFieldValue(const QString &strFieldName) const; 113 113 114 /* Who will be able to create virtual-machine: */115 114 friend class UIWizardNewVMPageBasic4; 116 friend class UIWizardNewVMPageBasic8;117 115 friend class UIWizardNewVMPageExpert; 118 116 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic2.cpp
r87941 r88038 24 24 #include <QLineEdit> 25 25 #include <QSpacerItem> 26 #include <QToolBox>27 26 #include <QVBoxLayout> 28 27 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
r87941 r88038 18 18 /* Qt includes: */ 19 19 #include <QCheckBox> 20 #include <QFileInfo>21 20 #include <QGridLayout> 22 21 #include <QMetaType> -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic4.cpp
r88019 r88038 209 209 pSizeLayout->setContentsMargins(0, 0, 0, 0); 210 210 /* Hard disk size relate widgets: */ 211 m_p SizeEditor = new UIMediumSizeEditor;212 m_p SizeEditorLabel = new QLabel;213 if (m_p SizeEditorLabel)214 { 215 pSizeLayout->addWidget(m_p SizeEditorLabel);216 m_p SizeEditorLabel->setBuddy(m_pSizeEditor);217 } 218 pSizeLayout->addWidget(m_p SizeEditor);211 m_pMediumSizeEditor = new UIMediumSizeEditor; 212 m_pMediumSizeEditorLabel = new QLabel; 213 if (m_pMediumSizeEditorLabel) 214 { 215 pSizeLayout->addWidget(m_pMediumSizeEditorLabel); 216 m_pMediumSizeEditorLabel->setBuddy(m_pMediumSizeEditor); 217 } 218 pSizeLayout->addWidget(m_pMediumSizeEditor); 219 219 pLayout->addLayout(pSizeLayout); 220 220 /* Hard disk variant (dynamic vs. fixed) widgets: */ … … 235 235 connect(m_pDiskSelectionButton, &QIToolButton::clicked, 236 236 this, &UIWizardNewVMPageBasic4::sltGetWithFileOpenDialog); 237 if (m_p SizeEditor)238 { 239 connect(m_p SizeEditor, &UIMediumSizeEditor::sigSizeChanged,237 if (m_pMediumSizeEditor) 238 { 239 connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged, 240 240 this, &UIWizardNewVMPageBasic4::completeChanged); 241 connect(m_p SizeEditor, &UIMediumSizeEditor::sigSizeChanged,241 connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged, 242 242 this, &UIWizardNewVMPageBasic4::sltHandleSizeEditorChange); 243 243 } … … 329 329 m_strDefaultPath = fieldImp("machineFolder").toString(); 330 330 /* Set the recommended disk size if user has already not done so: */ 331 if (m_p SizeEditor && !m_fUserSetSize)332 { 333 m_p SizeEditor->blockSignals(true);331 if (m_pMediumSizeEditor && !m_fUserSetSize) 332 { 333 m_pMediumSizeEditor->blockSignals(true); 334 334 setMediumSize(fieldImp("type").value<CGuestOSType>().GetRecommendedHDD()); 335 m_p SizeEditor->blockSignals(false);335 m_pMediumSizeEditor->blockSignals(false); 336 336 } 337 337 } … … 419 419 void UIWizardNewVMPageBasic4::setEnableNewDiskWidgets(bool fEnable) 420 420 { 421 if (m_p SizeEditor)422 m_p SizeEditor->setEnabled(fEnable);423 if (m_p SizeEditorLabel)424 m_p SizeEditorLabel->setEnabled(fEnable);421 if (m_pMediumSizeEditor) 422 m_pMediumSizeEditor->setEnabled(fEnable); 423 if (m_pMediumSizeEditorLabel) 424 m_pMediumSizeEditorLabel->setEnabled(fEnable); 425 425 if (m_pFixedCheckBox) 426 426 m_pFixedCheckBox->setEnabled(fEnable); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.cpp
r88020 r88038 25 25 #include <QLineEdit> 26 26 #include <QRadioButton> 27 #include <QSpinBox>28 27 #include <QVBoxLayout> 29 28 … … 64 63 m_pToolBox->insertPage(ExpertToolboxItems_Hardware, createHardwareWidgets(), ""); 65 64 m_pToolBox->insertPage(ExpertToolboxItems_Disk, createDiskWidgets(), ""); 66 67 65 m_pToolBox->setCurrentPage(ExpertToolboxItems_NameAndOSType); 68 66 pMainLayout->addWidget(m_pToolBox); 69 70 67 pMainLayout->addStretch(); 71 68 } … … 97 94 registerField("VCPUCount", this, "VCPUCount"); 98 95 registerField("EFIEnabled", this, "EFIEnabled"); 99 100 96 registerField("mediumPath", this, "mediumPath"); 101 97 registerField("mediumFormat", this, "mediumFormat"); … … 127 123 } 128 124 129 130 125 void UIWizardNewVMPageExpert::sltGetWithFileOpenDialog() 131 126 { … … 143 138 if (fileInfo.exists() && fileInfo.isReadable()) 144 139 uiCommon().updateRecentlyUsedMediumListAndFolder(UIMediumDeviceType_DVD, strPath); 145 146 140 emit completeChanged(); 147 141 } … … 244 238 this, &UIWizardNewVMPageExpert::sltMediumFormatChanged); 245 239 246 if (m_pSizeEditor) 247 connect(m_pSizeEditor, &UIMediumSizeEditor::sigSizeChanged, 240 /* Virtual disk related connections: */ 241 if (m_pMediumSizeEditor) 242 connect(m_pMediumSizeEditor, &UIMediumSizeEditor::sigSizeChanged, 248 243 this, &UIWizardNewVMPageExpert::sltMediumSizeChanged); 249 244 … … 310 305 } 311 306 312 if (m_p SizeEditor && !m_userSetWidgets.contains(m_pSizeEditor))313 { 314 m_p SizeEditor->blockSignals(true);307 if (m_pMediumSizeEditor && !m_userSetWidgets.contains(m_pMediumSizeEditor)) 308 { 309 m_pMediumSizeEditor->blockSignals(true); 315 310 setMediumSize(recommendedDiskSize); 316 m_p SizeEditor->blockSignals(false);311 m_pMediumSizeEditor->blockSignals(false); 317 312 } 318 313 … … 401 396 402 397 /* Disk file size widgets: */ 403 m_p SizeEditorLabel = new QLabel;404 m_p SizeEditorLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed);405 m_p SizeEditor = new UIMediumSizeEditor;406 m_p SizeEditorLabel->setBuddy(m_pSizeEditor);398 m_pMediumSizeEditorLabel = new QLabel; 399 m_pMediumSizeEditorLabel->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Fixed); 400 m_pMediumSizeEditor = new UIMediumSizeEditor; 401 m_pMediumSizeEditorLabel->setBuddy(m_pMediumSizeEditor); 407 402 408 403 /* Disk file format widgets: */ 409 404 m_pDiskFormatGroupBox = new QGroupBox; 410 405 QHBoxLayout *pDiskFormatLayout = new QHBoxLayout(m_pDiskFormatGroupBox); 411 m_p SizeEditor = new UIMediumSizeEditor;406 m_pMediumSizeEditor = new UIMediumSizeEditor; 412 407 pDiskFormatLayout->addWidget(createFormatButtonGroup(true)); 413 408 … … 421 416 pDiskContainerLayout->addWidget(m_pLocationOpenButton, 0, 3, 1, 1); 422 417 423 pDiskContainerLayout->addWidget(m_p SizeEditorLabel, 1, 0, 1, 1);424 pDiskContainerLayout->addWidget(m_p SizeEditor, 1, 1, 1, 3);418 pDiskContainerLayout->addWidget(m_pMediumSizeEditorLabel, 1, 0, 1, 1); 419 pDiskContainerLayout->addWidget(m_pMediumSizeEditor, 1, 1, 1, 3); 425 420 426 421 pDiskContainerLayout->addWidget(m_pDiskFormatGroupBox, 2, 0, 1, 2); … … 577 572 void UIWizardNewVMPageExpert::sltMediumSizeChanged() 578 573 { 579 if (!m_p SizeEditor)574 if (!m_pMediumSizeEditor) 580 575 return; 581 m_userSetWidgets << m_p SizeEditor;576 m_userSetWidgets << m_pMediumSizeEditor; 582 577 completeChanged(); 583 578 } … … 641 636 void UIWizardNewVMPageExpert::setEnableNewDiskWidgets(bool fEnable) 642 637 { 643 if (m_p SizeEditor)644 m_p SizeEditor->setEnabled(fEnable);645 if (m_p SizeEditorLabel)646 m_p SizeEditorLabel->setEnabled(fEnable);638 if (m_pMediumSizeEditor) 639 m_pMediumSizeEditor->setEnabled(fEnable); 640 if (m_pMediumSizeEditorLabel) 641 m_pMediumSizeEditorLabel->setEnabled(fEnable); 647 642 if (m_pDiskFormatGroupBox) 648 643 m_pDiskFormatGroupBox->setEnabled(fEnable); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageExpert.h
r88014 r88038 139 139 void setVirtualDiskFromDiskCombo(); 140 140 141 UIToolBox *m_pToolBox; 142 QGroupBox *m_pInstallationISOGroupBox; 143 QGroupBox *m_pDiskFormatGroupBox; 144 QGroupBox *m_pDiskVariantGroupBox; 145 QLabel *m_pLocationLabel; 146 /** Set of widgets which user explicitly modified their values. They are exempt from 147 * adjusting when OS type changes. */ 148 QSet<QWidget*> m_userSetWidgets; 141 /** @name Variables 142 * @{ */ 143 UIToolBox *m_pToolBox; 144 QGroupBox *m_pInstallationISOGroupBox; 145 QGroupBox *m_pDiskFormatGroupBox; 146 QGroupBox *m_pDiskVariantGroupBox; 147 QLabel *m_pLocationLabel; 148 /** Set of widgets which user explicitly modified their values. They are exempt from 149 * adjusting when OS type changes. */ 150 QSet<QWidget*> m_userSetWidgets; 151 /** @} */ 149 152 }; 150 153
Note:
See TracChangeset
for help on using the changeset viewer.