Changeset 90009 in vbox
- Timestamp:
- Jul 3, 2021 6:58:17 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r90003 r90009 957 957 void UIVirtualBoxManager::sltOpenNewMachineWizard() 958 958 { 959 #if 0960 959 /* Lock the actions preventing cascade calls: */ 961 960 UIQObjectPropertySetter guardBlock(QList<QObject*>() << actionPool()->action(UIActionIndexMN_M_Welcome_S_New) … … 1014 1013 delete pWizard; 1015 1014 } 1016 #endif1017 1015 } 1018 1016 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r90003 r90009 51 51 } 52 52 53 UIWizardNewVM::UIWizardNewVM(QWidget *pParent, const QString &str Group /* = QString() */,53 UIWizardNewVM::UIWizardNewVM(QWidget *pParent, const QString &strMachineGroup /* = QString() */, 54 54 WizardMode enmMode /* = WizardMode_Auto */) 55 55 : UINativeWizard(pParent, WizardType_NewCloudVM, enmMode) 56 , m_str Group(strGroup)56 , m_strMachineGroup(strMachineGroup) 57 57 , m_iIDECount(0) 58 58 , m_iSATACount(0) … … 83 83 // case WizardMode_Basic: 84 84 // { 85 // // setPage(Page1, new UIWizardNewVMPageNameOSType(m_str Group));85 // // setPage(Page1, new UIWizardNewVMPageNameOSType(m_strMachineGroup)); 86 86 // // setPage(Page2, new UIWizardNewVMPageUnattended); 87 87 // // setPage(Page3, new UIWizardNewVMPageHardware); … … 93 93 // case WizardMode_Expert: 94 94 // { 95 // setPage(PageExpert, new UIWizardNewVMPageExpert(m_str Group));95 // setPage(PageExpert, new UIWizardNewVMPageExpert(m_strMachineGroup)); 96 96 // break; 97 97 // } … … 112 112 case WizardMode_Basic: 113 113 { 114 addPage(new UIWizardNewVMNameOSTypePageBasic (m_strGroup));114 addPage(new UIWizardNewVMNameOSTypePageBasic); 115 115 addPage(new UIWizardNewVMUnattendedPageBasic); 116 116 addPage(new UIWizardNewVMHardwarePageBasic); … … 144 144 // { 145 145 // QVector<QString> groups; 146 // if (!m_str Group.isEmpty())147 // groups << m_str Group;146 // if (!m_strMachineGroup.isEmpty()) 147 // groups << m_strMachineGroup; 148 148 // m_machine = vbox.CreateMachine(field("machineFilePath").toString(), 149 149 // field("name").toString(), … … 697 697 } 698 698 699 const QString &UIWizardNewVM::machineGroup() const 700 { 701 return m_strMachineGroup; 702 } 703 704 const QString &UIWizardNewVM::machineFilePath() const 705 { 706 return m_strMachineFilePath; 707 } 708 709 void UIWizardNewVM::setMachineFilePath(const QString &strMachineFilePath) 710 { 711 m_strMachineFilePath = strMachineFilePath; 712 } 713 714 const QString &UIWizardNewVM::machineFolder() const 715 { 716 return m_strMachineFolder; 717 } 718 719 void UIWizardNewVM::setMachineFolder(const QString &strMachineFolder) 720 { 721 m_strMachineFolder = strMachineFolder; 722 } 723 724 const QString &UIWizardNewVM::machineBaseName() const 725 { 726 return m_strMachineBaseName; 727 } 728 729 void UIWizardNewVM::setMachineBaseName(const QString &strMachineBaseName) 730 { 731 m_strMachineBaseName = strMachineBaseName; 732 } 733 734 const QString &UIWizardNewVM::detectedOSTypeId() const 735 { 736 return m_strDetectedOSTypeId; 737 } 738 739 void UIWizardNewVM::setDetectedOSTypeId(const QString &strDetectedOSTypeId) 740 { 741 m_strDetectedOSTypeId = strDetectedOSTypeId; 742 } 743 699 744 const UIUnattendedInstallData &UIWizardNewVM::unattendedInstallData() const 700 745 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.h
r90003 r90009 51 51 }; 52 52 53 54 55 53 56 enum SelectedDiskSource 54 57 { … … 68 71 public: 69 72 70 /* Page IDs: */71 enum72 {73 Page1,74 Page2,75 Page3,76 Page4,77 PageMax78 };79 80 /* Page IDs: */81 enum82 {83 PageExpert84 };85 73 86 74 /** Constructor: */ 87 UIWizardNewVM(QWidget *pParent, const QString &str Group = QString(), WizardMode enmMode = WizardMode_Auto);75 UIWizardNewVM(QWidget *pParent, const QString &strMachineGroup = QString(), WizardMode enmMode = WizardMode_Auto); 88 76 89 77 /** Prepare routine. */ … … 99 87 void setVirtualDisk(const CMedium &medium); 100 88 void setVirtualDisk(const QUuid &mediumId); 89 90 const QString &machineGroup() const; 91 92 const QString &machineFilePath() const; 93 void setMachineFilePath(const QString &strMachineFilePath); 94 95 const QString &machineFolder() const; 96 void setMachineFolder(const QString &strMachineFolder); 97 98 const QString &machineBaseName() const; 99 void setMachineBaseName(const QString &strMachineBaseName); 100 101 const QString &detectedOSTypeId() const; 102 void setDetectedOSTypeId(const QString &strDetectedOSTypeId); 101 103 102 104 protected: … … 140 142 CMedium m_virtualDisk; 141 143 CMachine m_machine; 142 QString m_str Group;144 QString m_strMachineGroup; 143 145 int m_iIDECount; 144 146 int m_iSATACount; … … 149 151 mutable UIUnattendedInstallData m_unattendedInstallData; 150 152 /** @} */ 153 154 /** Path of the folder created by this wizard page. Used to remove previously created 155 * folder. see cleanupMachineFolder();*/ 156 QString m_strCreatedFolder; 157 158 /** Full path (including the file name) of the machine's configuration file. */ 159 QString m_strMachineFilePath; 160 /** Path of the folder hosting the machine's configuration file. Generated from m_strMachineFilePath. */ 161 QString m_strMachineFolder; 162 /** Base name of the machine is generated from the m_strMachineFilePath. */ 163 QString m_strMachineBaseName; 164 165 /** Type Id od the OS detected from the ISO file by IUnattended. */ 166 QString m_strDetectedOSTypeId; 151 167 }; 152 168 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.cpp
r90003 r90009 178 178 }; 179 179 180 // UIWizardNewVMNameOSTypePage::UIWizardNewVMNameOSTypePage(const QString &strGroup) 181 // : m_pNameAndSystemEditor(0) 182 // , m_pSkipUnattendedCheckBox(0) 183 // , m_strGroup(strGroup) 184 // { 185 // CHost host = uiCommon().host(); 186 // m_fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx); 187 // m_fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode); 188 // } 189 190 // void UIWizardNewVMNameOSTypePage::onNameChanged(QString strNewName) 191 // { 192 // /* Do not forget about achitecture bits, if not yet specified: */ 193 // if (!strNewName.contains("32") && !strNewName.contains("64")) 194 // strNewName += ARCH_BITS == 64 && m_fSupportsHWVirtEx && m_fSupportsLongMode ? "64" : "32"; 195 196 // /* Search for a matching OS type based on the string the user typed already. */ 197 // for (size_t i = 0; i < RT_ELEMENTS(gs_OSTypePattern); ++i) 198 // if (strNewName.contains(gs_OSTypePattern[i].pattern)) 199 // { 200 // if (m_pNameAndSystemEditor) 201 // m_pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId)); 202 // break; 203 // } 204 // } 205 206 // void UIWizardNewVMNameOSTypePage::onOsTypeChanged() 207 // { 208 // /* If the user manually edited the OS type, we didn't want our automatic OS type guessing anymore. 209 // * So simply disconnect the text-edit signal. */ 210 // if (m_pNameAndSystemEditor) 211 // m_pNameAndSystemEditor->disconnect(SIGNAL(sigNameChanged(const QString &)), thisImp(), SLOT(sltNameChanged(const QString &))); 212 // } 213 214 // void UIWizardNewVMNameOSTypePage::composeMachineFilePath() 215 // { 216 // if (!m_pNameAndSystemEditor) 217 // return; 218 // if (m_pNameAndSystemEditor->name().isEmpty() || m_pNameAndSystemEditor->path().isEmpty()) 219 // return; 220 // /* Get VBox: */ 221 // CVirtualBox vbox = uiCommon().virtualBox(); 222 223 // /* Compose machine filename: */ 224 // m_strMachineFilePath = vbox.ComposeMachineFilename(m_pNameAndSystemEditor->name(), 225 // m_strGroup, 226 // QString(), 227 // m_pNameAndSystemEditor->path()); 228 // /* Compose machine folder/basename: */ 229 // const QFileInfo fileInfo(m_strMachineFilePath); 230 // m_strMachineFolder = fileInfo.absolutePath(); 231 // m_strMachineBaseName = fileInfo.completeBaseName(); 232 // } 233 234 235 // bool UIWizardNewVMNameOSTypePage::createMachineFolder() 236 // { 237 // if (!m_pNameAndSystemEditor) 238 // return false; 239 // /* Cleanup previosly created folder if any: */ 240 // if (!cleanupMachineFolder()) 241 // { 242 // msgCenter().cannotRemoveMachineFolder(m_strMachineFolder, thisImp()); 243 // return false; 244 // } 245 246 // composeMachineFilePath(); 247 248 // /* Check if the folder already exists and check if it has been created by this wizard */ 249 // if (QDir(m_strMachineFolder).exists()) 250 // { 251 // /* Looks like we have already created this folder for this run of the wizard. Just return */ 252 // if (m_strCreatedFolder == m_strMachineFolder) 253 // return true; 254 // /* The folder is there but not because of this wizard. Avoid overwriting a existing machine's folder */ 255 // else 256 // { 257 // msgCenter().cannotRewriteMachineFolder(m_strMachineFolder, thisImp()); 258 // return false; 259 // } 260 // } 261 262 // /* Try to create new folder (and it's predecessors): */ 263 // bool fMachineFolderCreated = QDir().mkpath(m_strMachineFolder); 264 // if (!fMachineFolderCreated) 265 // { 266 // msgCenter().cannotCreateMachineFolder(m_strMachineFolder, thisImp()); 267 // return false; 268 // } 269 // m_strCreatedFolder = m_strMachineFolder; 270 // return true; 271 // } 272 273 // bool UIWizardNewVMNameOSTypePage::cleanupMachineFolder(bool fWizardCancel /* = false */) 274 // { 275 // /* Make sure folder was previosly created: */ 276 // if (m_strCreatedFolder.isEmpty()) 277 // return true; 278 // /* Clean this folder if the machine folder has been changed by the user or we are cancelling the wizard: */ 279 // if (m_strCreatedFolder != m_strMachineFolder || fWizardCancel) 280 // { 281 // /* Try to cleanup folder (and it's predecessors): */ 282 // bool fMachineFolderRemoved = QDir().rmpath(m_strCreatedFolder); 283 // /* Reset machine folder value: */ 284 // if (fMachineFolderRemoved) 285 // m_strCreatedFolder = QString(); 286 // /* Return cleanup result: */ 287 // return fMachineFolderRemoved; 288 // } 289 // return true; 290 // } 180 void UIWizardNewVMNameOSTypePage::onNameChanged(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName) 181 { 182 CHost host = uiCommon().host(); 183 bool fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx); 184 bool fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode); 185 186 /* Do not forget about achitecture bits, if not yet specified: */ 187 if (!strNewName.contains("32") && !strNewName.contains("64")) 188 strNewName += ARCH_BITS == 64 && fSupportsHWVirtEx && fSupportsLongMode ? "64" : "32"; 189 190 /* Search for a matching OS type based on the string the user typed already. */ 191 for (size_t i = 0; i < RT_ELEMENTS(gs_OSTypePattern); ++i) 192 if (strNewName.contains(gs_OSTypePattern[i].pattern)) 193 { 194 if (pNameAndSystemEditor) 195 pNameAndSystemEditor->setType(uiCommon().vmGuestOSType(gs_OSTypePattern[i].pcstId)); 196 break; 197 } 198 } 199 200 void UIWizardNewVMNameOSTypePage::composeMachineFilePath(UINameAndSystemEditor *pNameAndSystemEditor, 201 UINativeWizard *pWizard) 202 { 203 UIWizardNewVM *pNewVMWizard = qobject_cast<UIWizardNewVM*>(pWizard); 204 if (!pNameAndSystemEditor || !pNewVMWizard) 205 return; 206 if (pNameAndSystemEditor->name().isEmpty() || pNameAndSystemEditor->path().isEmpty()) 207 return; 208 /* Get VBox: */ 209 CVirtualBox vbox = uiCommon().virtualBox(); 210 211 /* Compose machine filename: */ 212 pNewVMWizard->setMachineFilePath(vbox.ComposeMachineFilename(pNameAndSystemEditor->name(), 213 pNewVMWizard->machineGroup(), 214 QString(), 215 pNameAndSystemEditor->path())); 216 /* Compose machine folder/basename: */ 217 const QFileInfo fileInfo(pNewVMWizard->machineFilePath()); 218 pNewVMWizard->setMachineFolder(fileInfo.absolutePath()); 219 pNewVMWizard->setMachineBaseName(fileInfo.completeBaseName()); 220 } 221 222 bool UIWizardNewVMNameOSTypePage::createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor, 223 UINativeWizardPage *pCaller, 224 const QString &strMachineFolder, 225 QString &strCreatedFolder) 226 { 227 if (!pNameAndSystemEditor) 228 return false; 229 /* Cleanup previosly created folder if any: */ 230 if (!cleanupMachineFolder(strMachineFolder, strCreatedFolder)) 231 { 232 msgCenter().cannotRemoveMachineFolder(strMachineFolder, pCaller); 233 return false; 234 } 235 236 /* Check if the folder already exists and check if it has been created by this wizard */ 237 if (QDir(strMachineFolder).exists()) 238 { 239 /* Looks like we have already created this folder for this run of the wizard. Just return */ 240 if (strCreatedFolder == strMachineFolder) 241 return true; 242 /* The folder is there but not because of this wizard. Avoid overwriting a existing machine's folder */ 243 else 244 { 245 msgCenter().cannotRewriteMachineFolder(strMachineFolder, pCaller); 246 return false; 247 } 248 } 249 250 /* Try to create new folder (and it's predecessors): */ 251 bool fMachineFolderCreated = QDir().mkpath(strMachineFolder); 252 if (!fMachineFolderCreated) 253 { 254 msgCenter().cannotCreateMachineFolder(strMachineFolder, pCaller); 255 return false; 256 } 257 strCreatedFolder = strMachineFolder; 258 return true; 259 } 260 261 bool UIWizardNewVMNameOSTypePage::cleanupMachineFolder(const QString &strMachineFolder, 262 QString &strCreatedFolder, bool fWizardCancel /* = false */) 263 { 264 /* Make sure folder was previosly created: */ 265 if (strCreatedFolder.isEmpty()) 266 return true; 267 /* Clean this folder if the machine folder has been changed by the user or we are cancelling the wizard: */ 268 if (strCreatedFolder != strMachineFolder || fWizardCancel) 269 { 270 /* Try to cleanup folder (and it's predecessors): */ 271 bool fMachineFolderRemoved = QDir().rmpath(strCreatedFolder); 272 /* Reset machine folder value: */ 273 if (fMachineFolderRemoved) 274 strCreatedFolder = QString(); 275 /* Return cleanup result: */ 276 return fMachineFolderRemoved; 277 } 278 return true; 279 } 291 280 292 281 // QString UIWizardNewVMNameOSTypePage::machineFilePath() const … … 361 350 // } 362 351 363 // bool UIWizardNewVMNameOSTypePage::determineOSType(const QString &strISOPath) 364 // { 365 // QFileInfo isoFileInfo(strISOPath); 366 // if (!isoFileInfo.exists()) 367 // { 368 // m_strDetectedOSTypeId.clear(); 369 // return false; 370 // } 371 372 // CUnattended comUnatteded = uiCommon().virtualBox().CreateUnattendedInstaller(); 373 // comUnatteded.SetIsoPath(strISOPath); 374 // comUnatteded.DetectIsoOS(); 375 376 // m_strDetectedOSTypeId = comUnatteded.GetDetectedOSTypeId(); 377 // return true; 378 // } 352 void UIWizardNewVMNameOSTypePage::determineOSType(const QString &strISOPath, UINativeWizard *pWizard) 353 { 354 UIWizardNewVM *pNewVMWizard = qobject_cast<UIWizardNewVM*>(pWizard); 355 if (!pNewVMWizard) 356 return; 357 358 QFileInfo isoFileInfo(strISOPath); 359 if (!isoFileInfo.exists()) 360 { 361 pNewVMWizard->setDetectedOSTypeId(QString()); 362 return; 363 } 364 365 CUnattended comUnatteded = uiCommon().virtualBox().CreateUnattendedInstaller(); 366 comUnatteded.SetIsoPath(strISOPath); 367 comUnatteded.DetectIsoOS(); 368 pNewVMWizard->setDetectedOSTypeId(comUnatteded.GetDetectedOSTypeId()); 369 } 379 370 380 371 // bool UIWizardNewVMNameOSTypePage::skipUnattendedInstall() const … … 415 406 416 407 417 UIWizardNewVMNameOSTypePageBasic::UIWizardNewVMNameOSTypePageBasic( const QString &strGroup)408 UIWizardNewVMNameOSTypePageBasic::UIWizardNewVMNameOSTypePageBasic() 418 409 : m_pNameAndSystemLayout(0) 419 410 , m_pNameAndSystemEditor(0) … … 421 412 , m_pNameOSTypeLabel(0) 422 413 { 423 Q_UNUSED(strGroup);424 414 prepare(); 425 415 } … … 440 430 } 441 431 442 //createConnections();432 createConnections(); 443 433 // /* Register fields: */ 444 434 // registerField("name*", m_pNameAndSystemEditor, "name", SIGNAL(sigNameChanged(const QString &))); … … 456 446 void UIWizardNewVMNameOSTypePageBasic::createConnections() 457 447 { 458 //if (m_pNameAndSystemEditor)459 //{460 //connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltNameChanged);461 //connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigPathChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltPathChanged);462 //connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged);463 //connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged);464 //}448 if (m_pNameAndSystemEditor) 449 { 450 connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigNameChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltNameChanged); 451 connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigPathChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltPathChanged); 452 connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigOsTypeChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged); 453 connect(m_pNameAndSystemEditor, &UINameAndSystemEditor::sigImageChanged, this, &UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged); 454 } 465 455 } 466 456 … … 474 464 } 475 465 476 int UIWizardNewVMNameOSTypePageBasic::nextId() const477 {478 // if (isUnattendedEnabled())479 // return UIWizardNewVM::Page2;480 // return UIWizardNewVM::Page3;481 return 0;482 }483 484 466 void UIWizardNewVMNameOSTypePageBasic::sltNameChanged(const QString &strNewName) 485 467 { 486 468 Q_UNUSED(strNewName); 487 // onNameChanged(strNewName);488 // composeMachineFilePath();469 UIWizardNewVMNameOSTypePage::onNameChanged(m_pNameAndSystemEditor, strNewName); 470 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, wizard()); 489 471 } 490 472 … … 492 474 { 493 475 Q_UNUSED(strNewPath); 494 //composeMachineFilePath();476 UIWizardNewVMNameOSTypePage::composeMachineFilePath(m_pNameAndSystemEditor, wizard()); 495 477 } 496 478 497 479 void UIWizardNewVMNameOSTypePageBasic::sltOsTypeChanged() 498 480 { 499 /* Call to base-class: */ 500 //onOsTypeChanged(); 481 /* If the user manually edited the OS type, we didn't want our automatic OS type guessing anymore. 482 * So simply disconnect the text-edit signal. */ 483 if (m_pNameAndSystemEditor) 484 m_pNameAndSystemEditor->disconnect(SIGNAL(sigNameChanged(const QString &)), this, SLOT(sltNameChanged(const QString &))); 501 485 } 502 486 503 487 void UIWizardNewVMNameOSTypePageBasic::retranslateUi() 504 488 { 505 // retranslateWidgets();506 489 setTitle(UIWizardNewVM::tr("Virtual machine Name and Operating System")); 507 490 … … 526 509 { 527 510 /* Translate page: */ 528 //retranslateUi();529 //if (m_pNameAndSystemEditor)530 //m_pNameAndSystemEditor->setFocus();531 // 511 retranslateUi(); 512 if (m_pNameAndSystemEditor) 513 m_pNameAndSystemEditor->setFocus(); 514 //setSkipCheckBoxEnable(); 532 515 } 533 516 … … 543 526 { 544 527 /* Try to create machine folder: */ 528 //composeMachineFilePath 545 529 //return createMachineFolder(); 546 530 return true; … … 549 533 void UIWizardNewVMNameOSTypePageBasic::sltISOPathChanged(const QString &strPath) 550 534 { 551 Q_UNUSED(strPath); 552 // determineOSType(strPath); 535 UIWizardNewVMNameOSTypePage::determineOSType(strPath, wizard()); 553 536 // setTypeByISODetectedOSType(m_strDetectedOSTypeId); 554 537 // /* Update the global recent ISO path: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePageBasic.h
r90003 r90009 36 36 class UIFilePathSelector; 37 37 class UINameAndSystemEditor; 38 class UINativeWizard; 38 39 39 // /** 1st page of the New Virtual Machine wizard (base part): */ 40 // class UIWizardNewVMNameOSTypePage : public UIWizardPageBase 41 // { 42 // protected: 40 namespace UIWizardNewVMNameOSTypePage 41 { 42 void onNameChanged(UINameAndSystemEditor *pNameAndSystemEditor, QString strNewName); 43 bool createMachineFolder(UINameAndSystemEditor *pNameAndSystemEditor, 44 UINativeWizardPage *pCaller, 45 const QString &strMachineFolder, 46 QString &strCreatedFolder); 43 47 44 // /** Constructor. */ 45 // UIWizardNewVMNameOSTypePage(const QString &strGroup); 46 47 // /** Handlers. */ 48 // void onNameChanged(QString strNewName); 49 // void onOsTypeChanged(); 50 51 // bool createMachineFolder(); 52 // /** Removes a previously created folder (if exists) before creating a new one. 53 // * used during page cleanup and new folder creation. Called upon page Next/Back and 54 // * wizard cancel */ 55 // bool cleanupMachineFolder(bool fWizardCancel = false); 48 /** Removes a previously created folder (if exists) before creating a new one. 49 * used during page cleanup and new folder creation. Called upon page Next/Back and 50 * wizard cancel */ 51 bool cleanupMachineFolder(const QString &strMachineFolder, 52 QString &strCreatedFolder,bool fWizardCancel = false); 53 void composeMachineFilePath(UINameAndSystemEditor *pNameAndSystemEditor, UINativeWizard *pWizard); 54 void determineOSType(const QString &strISOPath, UINativeWizard *pWizard); 56 55 57 56 // /** @name Property getters/setters … … 74 73 // /** @} */ 75 74 76 // /** calls CVirtualBox::ComposeMachineFilename(...) and sets related member variables */77 // void composeMachineFilePath();78 75 79 76 // /** Colors the widgets red if they cause isComplete to fail. */ … … 81 78 // void retranslateWidgets(); 82 79 // QString ISOFilePath() const; 83 // bool determineOSType(const QString &strISOPath); 80 84 81 // void setTypeByISODetectedOSType(const QString &strDetectedOSType); 85 82 // /** Return false if ISO path is not empty but points to an missing or unreadable file. */ … … 87 84 // void setSkipCheckBoxEnable(); 88 85 89 // QString m_strDetectedOSTypeId;86 // 90 87 91 88 // private: 92 89 93 // /** Full path (including the file name) of the machine's configuration file. */94 // QString m_strMachineFilePath;95 // /** Path of the folder hosting the machine's configuration file. Generated from m_strMachineFilePath. */96 // QString m_strMachineFolder;97 // /** Path of the folder created by this wizard page. Used to remove previously created98 // * folder. see cleanupMachineFolder();*/99 // QString m_strCreatedFolder;100 // /** Base name of the machine is generated from the m_strMachineFilePath. */101 // QString m_strMachineBaseName;102 90 103 // QString m_strGroup;104 // bool m_fSupportsHWVirtEx;105 // bool m_fSupportsLongMode;106 107 // friend class UIWizardNewVM;108 91 // }; 92 } 109 93 110 94 /** 1st page of the New Virtual Machine wizard (basic extension). */ … … 117 101 118 102 /** Constructor. */ 119 UIWizardNewVMNameOSTypePageBasic(const QString &strGroup); 120 virtual bool isComplete() const; /* override */ 121 virtual int nextId() const /* override */; 103 UIWizardNewVMNameOSTypePageBasic(); 104 122 105 123 106 protected: 107 108 virtual bool isComplete() const; /* override final */ 109 /** Validation stuff. */ 110 virtual bool validatePage() /* override */; 124 111 125 112 private slots: … … 141 128 void initializePage(); 142 129 void cleanupPage(); 143 144 130 QWidget *createNameOSTypeWidgets(); 145 146 /** Validation stuff. */147 virtual bool validatePage() /* override */;148 131 149 132
Note:
See TracChangeset
for help on using the changeset viewer.