Changeset 83858 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Apr 20, 2020 2:13:40 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137387
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r83760 r83858 2570 2570 } 2571 2571 2572 void UICommon::notifyCloudMachineRegistered(const QString &strProviderShortName, const QString &strProfileName, 2573 const QUuid &uId, const bool fRegistered) 2574 { 2575 emit sigCloudMachineRegistered(strProviderShortName, strProfileName, uId, fRegistered); 2576 } 2577 2572 2578 void UICommon::enumerateMedia(const CMediumVector &comMedia /* = CMediumVector() */) 2573 2579 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r83760 r83858 84 84 /** Notifies listeners about the VBoxSVC availability change. */ 85 85 void sigVBoxSVCAvailabilityChange(); 86 /** @} */ 87 88 /** @name Temporary: Cloud Virtual Machine stuff. 89 * @{ */ 90 /** Notifies listeners about cloud VM was (un)registered. 91 * @note This is to be replaced by corresponding Main API event later. 92 * @param strProviderShortName Brings provider short name. 93 * @param strProfileName Brings profile name. 94 * @param uId Brings cloud VM id. 95 * @param fRegistered True is machine was registered, false otherwise. */ 96 void sigCloudMachineRegistered(const QString &strProviderShortName, const QString &strProfileName, 97 const QUuid &uId, const bool fRegistered); 86 98 /** @} */ 87 99 … … 483 495 /** @} */ 484 496 497 /** @name Temporary: Cloud Virtual Machine stuff. 498 * @{ */ 499 /** Notifies listeners about cloud VM was (un)registered. 500 * @note This is to be replaced by corresponding Main API event later. 501 * @param strProviderShortName Brings provider short name. 502 * @param strProfileName Brings profile name. 503 * @param uId Brings cloud VM id. 504 * @param fRegistered True is machine was registered, false otherwise. */ 505 void notifyCloudMachineRegistered(const QString &strProviderShortName, const QString &strProfileName, 506 const QUuid &uId, const bool fRegistered); 507 /** @} */ 508 485 509 /** @name COM: Virtual Media stuff. 486 510 * @{ */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r83706 r83858 539 539 connect(this, &UIChooserAbstractModel::sigGroupSavingStateChanged, 540 540 m_pParent, &UIChooser::sigGroupSavingStateChanged); 541 542 /* Setup temporary connections, 543 * this is to be replaced by corresponding Main API event later. */ 544 connect(&uiCommon(), &UICommon::sigCloudMachineRegistered, 545 this, &UIChooserAbstractModel::sltCloudMachineRegistered); 541 546 542 547 /* Setup global connections: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r83857 r83858 978 978 /* Execute wizard: */ 979 979 pWizard->exec(); 980 981 // WORKAROUND:982 // Hehey! Now we have to inject created VM nodes and then rebuild tree for the main root node983 // ourselves cause there is no corresponding event yet. So we are calling actual handler to do that.984 foreach (const CCloudMachine &comMachine, pWizard->machines())985 sltCloudMachineRegistered(pWizard->source() /* provider name */,986 pWizard->profileName() /* profile name */,987 comMachine.GetId() /* machine ID */,988 true /* registered? */);989 990 980 delete pWizard; 991 981 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.cpp
r83857 r83858 17 17 18 18 /* GUI includes: */ 19 #include "UICommon.h" 19 20 #include "UIMessageCenter.h" 20 21 #include "UIWizardAddCloudVM.h" … … 66 67 } 67 68 68 QString UIWizardAddCloudVM::source() const69 {70 return field("source").toString();71 }72 73 QString UIWizardAddCloudVM::profileName() const74 {75 return field("profileName").toString();76 }77 78 69 bool UIWizardAddCloudVM::addCloudVMs() 79 70 { … … 118 109 if (comMachine.isNotNull()) 119 110 { 120 m_machines << comMachine; 111 uiCommon().notifyCloudMachineRegistered(field("source").toString(), 112 field("profileName").toString(), 113 comMachine.GetId(), 114 true /* registered */); 121 115 fResult = true; 122 116 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/addcloudvm/UIWizardAddCloudVM.h
r83857 r83858 63 63 CCloudClient client() const { return m_comClient; } 64 64 65 /** Returns Cloud Machine object wrapper list. */66 QList<CCloudMachine> machines() const { return m_machines; }67 68 /** Returns source. */69 QString source() const;70 /** Returns profile name. */71 QString profileName() const;72 73 65 /** Adds cloud VMs. */ 74 66 bool addCloudVMs(); … … 83 75 /** Holds the Cloud Client object wrapper. */ 84 76 CCloudClient m_comClient; 85 86 /** Holds the Cloud Machine object wrapper list. */87 QList<CCloudMachine> m_machines;88 77 }; 89 78
Note:
See TracChangeset
for help on using the changeset viewer.