Changeset 79580 in vbox for trunk/src/VBox
- Timestamp:
- Jul 7, 2019 4:12:08 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131870
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVM.cpp
r79575 r79580 27 27 28 28 29 UIWizardNewCloudVM::UIWizardNewCloudVM(QWidget *pParent) 29 UIWizardNewCloudVM::UIWizardNewCloudVM(QWidget *pParent, 30 const CCloudClient &comClient /* = CCloudClient() */, 31 const CVirtualSystemDescription &comDescription /* = CVirtualSystemDescription() */) 30 32 : UIWizard(pParent, WizardType_NewCloudVM) 33 , m_comClient(comClient) 34 , m_comVSD(comDescription) 35 , m_fFullWizard(m_comClient.isNull() || m_comVSD.isNull()) 31 36 { 32 37 #ifndef VBOX_WS_MAC … … 46 51 case WizardMode_Basic: 47 52 { 48 setPage(Page1, new UIWizardNewCloudVMPageBasic1); 49 setPage(Page2, new UIWizardNewCloudVMPageBasic2); 53 if (m_fFullWizard) 54 setPage(Page1, new UIWizardNewCloudVMPageBasic1); 55 setPage(Page2, new UIWizardNewCloudVMPageBasic2(m_fFullWizard)); 50 56 break; 51 57 } 52 58 case WizardMode_Expert: 53 59 { 54 setPage(PageExpert, new UIWizardNewCloudVMPageExpert );60 setPage(PageExpert, new UIWizardNewCloudVMPageExpert(m_fFullWizard)); 55 61 break; 56 62 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVM.h
r79575 r79580 51 51 }; 52 52 53 /** Constructs new cloud vm wizard passing @a pParent to the base-class. */ 54 UIWizardNewCloudVM(QWidget *pParent); 53 /** Constructs New Cloud VM wizard passing @a pParent to the base-class. 54 * @param comClient Brings the Cloud Client object to work with. 55 * @param comDescription Brings the Virtual System Description object to use. */ 56 UIWizardNewCloudVM(QWidget *pParent, 57 const CCloudClient &comClient = CCloudClient(), 58 const CVirtualSystemDescription &comDescription = CVirtualSystemDescription()); 55 59 56 60 /** Prepares all. */ … … 91 95 /** Holds the Virtual System Description Form object reference. */ 92 96 CVirtualSystemDescriptionForm m_comVSDForm; 97 98 /** Holds whether we want full wizard form or short one. */ 99 bool m_fFullWizard; 93 100 }; 94 101 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic2.cpp
r79575 r79580 31 31 *********************************************************************************************************************************/ 32 32 33 UIWizardNewCloudVMPage2::UIWizardNewCloudVMPage2() 33 UIWizardNewCloudVMPage2::UIWizardNewCloudVMPage2(bool fFullWizard) 34 : m_fFullWizard(fFullWizard) 35 , m_fPolished(false) 34 36 { 35 37 } … … 54 56 *********************************************************************************************************************************/ 55 57 56 UIWizardNewCloudVMPageBasic2::UIWizardNewCloudVMPageBasic2() 58 UIWizardNewCloudVMPageBasic2::UIWizardNewCloudVMPageBasic2(bool fFullWizard) 59 : UIWizardNewCloudVMPage2(fFullWizard) 57 60 { 58 61 /* Create main layout: */ … … 92 95 void UIWizardNewCloudVMPageBasic2::initializePage() 93 96 { 97 /* If wasn't polished yet: */ 98 if (!m_fPolished) 99 { 100 if (!m_fFullWizard) 101 { 102 /* Generate VSD form, asynchronously: */ 103 QMetaObject::invokeMethod(this, "sltInitShortWizardForm", Qt::QueuedConnection); 104 } 105 m_fPolished = true; 106 } 107 94 108 /* Refresh form properties: */ 95 109 refreshFormPropertiesTable(); … … 131 145 return fResult; 132 146 } 147 148 void UIWizardNewCloudVMPageBasic2::sltInitShortWizardForm() 149 { 150 /* Create Virtual System Description Form: */ 151 qobject_cast<UIWizardNewCloudVM*>(wizardImp())->createVSDForm(); 152 153 /* Refresh form properties table: */ 154 refreshFormPropertiesTable(); 155 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageBasic2.h
r79575 r79580 35 35 36 36 /** Constructs 2nd page base. */ 37 UIWizardNewCloudVMPage2( );37 UIWizardNewCloudVMPage2(bool fFullWizard); 38 38 39 39 /** Refreshes form properties table. */ … … 42 42 /** Returns Virtual System Description Form object. */ 43 43 CVirtualSystemDescriptionForm vsdForm() const; 44 45 /** Holds whether wizard should be in full form. */ 46 bool m_fFullWizard; 47 /** Holds whether starting page was polished. */ 48 bool m_fPolished; 44 49 45 50 /** Holds the Form Editor widget instance. */ … … 55 60 56 61 /** Constructs 2nd basic page. */ 57 UIWizardNewCloudVMPageBasic2( );62 UIWizardNewCloudVMPageBasic2(bool fFullWizard); 58 63 59 64 protected: … … 71 76 virtual bool validatePage() /* override */; 72 77 78 private slots: 79 80 /** Initializes short wizard form. */ 81 void sltInitShortWizardForm(); 82 73 83 private: 74 84 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.cpp
r79579 r79580 33 33 34 34 35 UIWizardNewCloudVMPageExpert::UIWizardNewCloudVMPageExpert() 36 : m_pCntDestination(0) 35 UIWizardNewCloudVMPageExpert::UIWizardNewCloudVMPageExpert(bool fFullWizard) 36 : UIWizardNewCloudVMPage2(fFullWizard) 37 , m_pCntDestination(0) 37 38 , m_pSettingsCnt(0) 38 39 { … … 45 46 if (m_pCntDestination) 46 47 { 48 /* There is no destination table in short wizard form: */ 49 if (!m_fFullWizard) 50 m_pCntDestination->setVisible(false); 51 47 52 /* Create destination layout: */ 48 53 m_pDestinationLayout = new QGridLayout(m_pCntDestination); … … 219 224 { 220 225 /* If wasn't polished yet: */ 221 if (!m_fPolished) 222 { 223 /* Populate destinations: */ 224 populateDestinations(); 225 /* Choose one of them, asynchronously: */ 226 QMetaObject::invokeMethod(this, "sltHandleDestinationChange", Qt::QueuedConnection); 227 m_fPolished = true; 226 if (!UIWizardNewCloudVMPage1::m_fPolished || !UIWizardNewCloudVMPage2::m_fPolished) 227 { 228 if (m_fFullWizard) 229 { 230 /* Populate destinations: */ 231 populateDestinations(); 232 /* Choose one of them, asynchronously: */ 233 QMetaObject::invokeMethod(this, "sltHandleDestinationChange", Qt::QueuedConnection); 234 } 235 else 236 { 237 /* Generate VSD form, asynchronously: */ 238 QMetaObject::invokeMethod(this, "sltInitShortWizardForm", Qt::QueuedConnection); 239 } 240 UIWizardNewCloudVMPage1::m_fPolished = true; 241 UIWizardNewCloudVMPage2::m_fPolished = true; 228 242 } 229 243 … … 321 335 emit completeChanged(); 322 336 } 337 338 void UIWizardNewCloudVMPageExpert::sltInitShortWizardForm() 339 { 340 /* Create Virtual System Description Form: */ 341 qobject_cast<UIWizardNewCloudVM*>(wizardImp())->createVSDForm(); 342 343 /* Refresh form properties table: */ 344 refreshFormPropertiesTable(); 345 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newcloudvm/UIWizardNewCloudVMPageExpert.h
r79575 r79580 39 39 40 40 /** Constructs expert page. */ 41 UIWizardNewCloudVMPageExpert( );41 UIWizardNewCloudVMPageExpert(bool fFullWizard); 42 42 43 43 protected: … … 74 74 void sltHandleInstanceListChange(); 75 75 76 /** Initializes short wizard form. */ 77 void sltInitShortWizardForm(); 78 76 79 private: 77 80
Note:
See TracChangeset
for help on using the changeset viewer.