Changeset 38572 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Aug 30, 2011 1:35:09 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWizard.cpp
r38571 r38572 197 197 /* Create & add pages: */ 198 198 if (wizardType() == UINewHDWizardType_Copying) 199 addPage(new UINewHDWizardPageWelcome(sourceHardDisk));200 addPage(new UINewHDWizardPageFormat);201 addPage(new UINewHDWizardPageVariant);202 addPage(new UINewHDWizardPageOptions(strDefaultName, strDefaultPath, uDefaultSize));203 addPage(new UINewHDWizardPageSummary);199 setPage(PageWelcome, new UINewHDWizardPageWelcome(sourceHardDisk)); 200 setPage(PageFormat, new UINewHDWizardPageFormat); 201 setPage(PageVariant, new UINewHDWizardPageVariant); 202 setPage(PageOptions, new UINewHDWizardPageOptions(strDefaultName, strDefaultPath, uDefaultSize)); 203 setPage(PageSummary, new UINewHDWizardPageSummary); 204 204 205 205 /* Translate wizard: */ … … 454 454 } 455 455 456 int UINewHDWizardPageFormat::nextId() const 457 { 458 CMediumFormat mediumFormat = field("mediumFormat").value<CMediumFormat>(); 459 ULONG uCapabilities = mediumFormat.GetCapabilities(); 460 int cTest = 0; 461 if (uCapabilities & KMediumFormatCapabilities_CreateDynamic) 462 ++cTest; 463 if (uCapabilities & KMediumFormatCapabilities_CreateFixed) 464 ++cTest; 465 if (uCapabilities & KMediumFormatCapabilities_CreateSplit2G) 466 ++cTest; 467 if (cTest > 1) 468 return UINewHDWizard::PageVariant; 469 470 return UINewHDWizard::PageOptions; 471 } 472 456 473 void UINewHDWizardPageFormat::processFormat(CMediumFormat mediumFormat) 457 474 { … … 488 505 registerField("mediumVariant", this, "mediumVariant"); 489 506 490 /* Unfortuanelly, KMediumVariant is very messy, 507 /* Default */ 508 setMediumVariant(KMediumVariant_Standard); 509 510 /* Unfortunately, KMediumVariant is very messy, 491 511 * so we can't enumerate it to make sure GUI will not hard-code its values, 492 512 * we can only use hard-coded values that we need: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newhd/UINewHDWizard.h
r37655 r38572 50 50 public: 51 51 52 enum 53 { 54 PageWelcome, 55 PageFormat, 56 PageVariant, 57 PageOptions, 58 PageSummary 59 }; 60 52 61 /* Constructor: */ 53 62 UINewHDWizard(QWidget *pParent, … … 155 164 /* Completeness validator: */ 156 165 bool isComplete() const; 166 167 int nextId() const; 157 168 158 169 /* Helping stuff: */
Note:
See TracChangeset
for help on using the changeset viewer.