VirtualBox

Changeset 83064 in vbox


Ignore:
Timestamp:
Feb 12, 2020 7:24:33 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
136104
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Propagate cloud machine state change events through item hierarchy to the UIVirtualBoxManager itself.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r83060 r83064  
    350350}
    351351
     352void UIVirtualBoxManager::sltHandleCloudMachineStateChange(const QString /* strMachineId */)
     353{
     354    updateActionsAppearance();
     355}
     356
    352357void UIVirtualBoxManager::sltHandleStateChange(const QUuid &)
    353358{
     
    13521357        connect(m_pWidget, &UIVirtualBoxManagerWidget::sigCurrentSnapshotItemChange,
    13531358                this, &UIVirtualBoxManager::sltCurrentSnapshotItemChange);
     1359        connect(m_pWidget, &UIVirtualBoxManagerWidget::sigCloudMachineStateChange,
     1360                this, &UIVirtualBoxManager::sltHandleCloudMachineStateChange);
    13541361        setCentralWidget(m_pWidget);
    13551362    }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h

    r83011 r83064  
    130130        /** Handles current snapshot item change. */
    131131        void sltCurrentSnapshotItemChange();
     132
     133        /** Handles state change for cloud machine with specified @a strMachineId. */
     134        void sltHandleCloudMachineStateChange(const QString strMachineId);
    132135    /** @} */
    133136
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r83059 r83064  
    371371            if (m_pPaneChooser)
    372372            {
     373                /* Configure Chooser-pane: */
     374                connect(m_pPaneChooser, &UIChooser::sigCloudMachineStateChange,
     375                        this, &UIVirtualBoxManagerWidget::sigCloudMachineStateChange);
    373376                /* Add into splitter: */
    374377                m_pSplitter->addWidget(m_pPaneChooser);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r83059 r83064  
    6565    /** Notifies listeners about current Snapshots pane item change. */
    6666    void sigCurrentSnapshotItemChange();
     67
     68    /** Notifies about state change for cloud machine with certain @a strMachineId. */
     69    void sigCloudMachineStateChange(const QString &strMachineId);
    6770
    6871public:
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp

    r82968 r83064  
    169169    connect(m_pChooserModel, &UIChooserModel::sigToolMenuRequested,
    170170            this, &UIChooser::sltToolMenuRequested);
     171    connect(m_pChooserModel, &UIChooserModel::sigCloudMachineStateChange,
     172            this, &UIChooser::sigCloudMachineStateChange);
    171173
    172174    /* Setup chooser-view connections: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h

    r82968 r83064  
    5757        /** Notifies listeners about tool popup-menu request for certain tool @a enmClass and in specified @a position. */
    5858        void sigToolMenuRequested(UIToolClass enmClass, const QPoint &position);
     59    /** @} */
     60
     61    /** @name Cloud machine stuff.
     62      * @{ */
     63        /** Notifies about state change for cloud machine with certain @a strId. */
     64        void sigCloudMachineStateChange(const QString &strId);
    5965    /** @} */
    6066
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r83063 r83064  
    308308}
    309309#endif /* VBOX_GUI_WITH_CLOUD_VMS */
     310
     311void UIChooserAbstractModel::sltHandleCloudMachineStateChange()
     312{
     313    UIVirtualMachineItem *pCache = qobject_cast<UIVirtualMachineItem*>(sender());
     314    AssertPtrReturnVoid(pCache);
     315    sigCloudMachineStateChange(pCache->id());
     316}
    310317
    311318void UIChooserAbstractModel::sltGroupDefinitionsSaveComplete()
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r83041 r83064  
    5050signals:
    5151
     52    /** @name Cloud machine stuff.
     53      * @{ */
     54        /** Notifies about state change for cloud machine with certain @a strId. */
     55        void sigCloudMachineStateChange(const QString &strId);
     56    /** @} */
     57
    5258    /** @name Group saving stuff.
    5359      * @{ */
     
    104110public slots:
    105111
    106    /** @name Group saving stuff.
     112    /** @name Cloud machine stuff.
     113      * @{ */
     114        /** Handles cloud machine state change. */
     115        void sltHandleCloudMachineStateChange();
     116    /** @} */
     117
     118    /** @name Group saving stuff.
    107119      * @{ */
    108120        /** Handles group definition saving complete. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp

    r83055 r83064  
    1717
    1818/* GUI includes: */
     19#include "UIChooserAbstractModel.h"
    1920#include "UIChooserNodeMachine.h"
    2021#include "UIVirtualMachineItemCloud.h"
     
    4142    , m_pCache(new UIVirtualMachineItemCloud(guiCloudMachine))
    4243{
     44    if (parentNode())
     45        parentNode()->addNode(this, iPosition);
    4346    /* Cloud VM item can notify machine node only directly (no console), we have to setup listener: */
    4447    connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigStateChange,
    4548            this, &UIChooserNodeMachine::sltHandleStateChange);
    46     if (parentNode())
    47         parentNode()->addNode(this, iPosition);
     49    connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigStateChange,
     50            static_cast<UIChooserAbstractModel*>(model()), &UIChooserAbstractModel::sltHandleCloudMachineStateChange);
    4851    retranslateUi();
    4952}
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette