Changeset 86748 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Oct 28, 2020 7:14:47 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r86326 r86748 306 306 m_pProgressHandler = new UIProgress(m_comProgress, this); 307 307 if (m_pProgressHandler) 308 { 308 309 connect(m_pProgressHandler.data(), &UIProgress::sigProgressEventHandlingFinished, 309 310 this, &UIVirtualMachineItemCloud::sltHandleRefreshCloudMachineInfoDone); 311 emit sigRefreshStarted(); 312 } 310 313 } 311 314 } … … 329 332 /* If not canceled => notify listeners: */ 330 333 if (!fCanceled) 331 emit sig StateChange();334 emit sigRefreshFinished(); 332 335 } 333 336 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h
r86215 r86748 44 44 signals: 45 45 46 /** Notifies listeners about state change. */ 47 void sigStateChange(); 46 /** Notifies listeners about refresh started. */ 47 void sigRefreshStarted(); 48 /** Notifies listeners about refresh finished. */ 49 void sigRefreshFinished(); 48 50 49 51 public: -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r86746 r86748 662 662 } 663 663 664 void UIChooserAbstractModel::sltHandleCloudMachineStateChange() 665 { 664 void UIChooserAbstractModel::sltHandleCloudMachineRefreshStarted() 665 { 666 /* Acquire sender: */ 666 667 UIVirtualMachineItem *pCache = qobject_cast<UIVirtualMachineItem*>(sender()); 667 668 AssertPtrReturnVoid(pCache); 668 emit sigCloudMachineStateChange(pCache->id()); 669 670 /* Acquire sender's ID: */ 671 const QUuid uId = pCache->id(); 672 673 /* Search for a first machine node with passed ID: */ 674 UIChooserNode *pMachineNode = searchMachineNode(invisibleRoot(), uId); 675 676 /* Insert cloud entity key into a list of keys currently being updated: */ 677 const UICloudEntityKey cloudEntityKey = UICloudEntityKey(pMachineNode->parentNode()->parentNode()->name(), 678 pMachineNode->parentNode()->name(), 679 pMachineNode->toMachineNode()->id()); 680 insertCloudEntityKey(cloudEntityKey); 681 } 682 683 void UIChooserAbstractModel::sltHandleCloudMachineRefreshFinished() 684 { 685 /* Acquire sender: */ 686 UIVirtualMachineItem *pCache = qobject_cast<UIVirtualMachineItem*>(sender()); 687 AssertPtrReturnVoid(pCache); 688 689 /* Acquire sender's ID: */ 690 const QUuid uId = pCache->id(); 691 692 /* Search for a first machine node with passed ID: */ 693 UIChooserNode *pMachineNode = searchMachineNode(invisibleRoot(), uId); 694 695 /* Remove cloud entity key from the list of keys currently being updated: */ 696 const UICloudEntityKey cloudEntityKey = UICloudEntityKey(pMachineNode->parentNode()->parentNode()->name(), 697 pMachineNode->parentNode()->name(), 698 pMachineNode->toMachineNode()->id()); 699 removeCloudEntityKey(cloudEntityKey); 700 701 /* Notify listeners: */ 702 emit sigCloudMachineStateChange(uId); 669 703 } 670 704 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h
r86745 r86748 180 180 /** @name Cloud machine stuff. 181 181 * @{ */ 182 /** Handles cloud machine state change. */ 183 void sltHandleCloudMachineStateChange(); 182 /** Handles cloud machine refresh started. */ 183 void sltHandleCloudMachineRefreshStarted(); 184 /** Handles cloud machine refresh finished. */ 185 void sltHandleCloudMachineRefreshFinished(); 184 186 /** @} */ 185 187 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp
r84625 r86748 48 48 49 49 /* Cloud VM item can notify machine node only directly (no console), we have to setup listener: */ 50 connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sig StateChange,50 connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigRefreshFinished, 51 51 this, &UIChooserNodeMachine::sltHandleStateChange); 52 connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigStateChange, 53 static_cast<UIChooserAbstractModel*>(model()), &UIChooserAbstractModel::sltHandleCloudMachineStateChange); 52 connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigRefreshStarted, 53 static_cast<UIChooserAbstractModel*>(model()), &UIChooserAbstractModel::sltHandleCloudMachineRefreshStarted); 54 connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigRefreshFinished, 55 static_cast<UIChooserAbstractModel*>(model()), &UIChooserAbstractModel::sltHandleCloudMachineRefreshFinished); 54 56 55 57 /* Apply language settings: */
Note:
See TracChangeset
for help on using the changeset viewer.