VirtualBox

Changeset 77990 in vbox


Ignore:
Timestamp:
Apr 3, 2019 12:01:58 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:7127: Extend UIVirtualBoxEventHandler with all medium related events, working or not.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/globals
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp

    r76606 r77990  
    5757    void sigSnapshotRestore(const QUuid &uId, const QUuid &uSnapshotId);
    5858
     59    /** Notifies about storage controller change. */
     60    void sigStorageControllerChange();
     61    /** Notifies about storage device change.
     62      * @param  comAttachment  Brings corresponding attachment.
     63      * @param  fRemoved       Brings whether medium is removed or added.
     64      * @param  fSilent        Brings whether this change has gone silent for guest. */
     65    void sigStorageDeviceChange(CMediumAttachment comAttachment, bool fRemoved, bool fSilent);
     66    /** Notifies about storage medium @a comAttachment state change. */
     67    void sigMediumChange(CMediumAttachment comAttachment);
     68    /** Notifies about storage @a comMedium config change. */
     69    void sigMediumConfigChange(CMedium comMedium);
     70    /** Notifies about storage medium is (un)registered.
     71      * @param  uMediumId      Brings corresponding medium ID.
     72      * @param  enmMediumType  Brings corresponding medium type.
     73      * @param  fRegistered    Brings whether medium is registered or unregistered. */
     74    void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered);
     75
    5976public:
    6077
     
    158175        << KVBoxEventType_OnSnapshotDeleted
    159176        << KVBoxEventType_OnSnapshotChanged
    160         << KVBoxEventType_OnSnapshotRestored;
     177        << KVBoxEventType_OnSnapshotRestored
     178        << KVBoxEventType_OnStorageControllerChanged
     179        << KVBoxEventType_OnStorageDeviceChanged
     180        << KVBoxEventType_OnMediumChanged
     181        << KVBoxEventType_OnMediumConfigChanged
     182        << KVBoxEventType_OnMediumRegistered;
    161183
    162184    /* Register event listener for event source aggregator: */
     
    175197void UIVirtualBoxEventHandlerProxy::prepareConnections()
    176198{
    177     /* Create direct (sync) connections for signals of main listener: */
     199    /* Create direct (sync) connections for signals of main event listener.
     200     * Keep in mind that the abstract Qt4 connection notation should be used here. */
    178201    connect(m_pQtListener->getWrapped(), SIGNAL(sigVBoxSVCAvailabilityChange(bool)),
    179202            this, SIGNAL(sigVBoxSVCAvailabilityChange(bool)),
     
    202225    connect(m_pQtListener->getWrapped(), SIGNAL(sigSnapshotRestore(QUuid, QUuid)),
    203226            this, SIGNAL(sigSnapshotRestore(QUuid, QUuid)),
     227            Qt::DirectConnection);
     228    connect(m_pQtListener->getWrapped(), SIGNAL(sigStorageControllerChange()),
     229            this, SIGNAL(sigStorageControllerChange()),
     230            Qt::DirectConnection);
     231    connect(m_pQtListener->getWrapped(), SIGNAL(sigStorageDeviceChange(CMediumAttachment, bool, bool)),
     232            this, SIGNAL(sigStorageDeviceChange(CMediumAttachment, bool, bool)),
     233            Qt::DirectConnection);
     234    connect(m_pQtListener->getWrapped(), SIGNAL(sigMediumChange(CMediumAttachment)),
     235            this, SIGNAL(sigMediumChange(CMediumAttachment)),
     236            Qt::DirectConnection);
     237    connect(m_pQtListener->getWrapped(), SIGNAL(sigMediumConfigChange(CMedium)),
     238            this, SIGNAL(sigMediumConfigChange(CMedium)),
     239            Qt::DirectConnection);
     240    connect(m_pQtListener->getWrapped(), SIGNAL(sigMediumRegistered(const QUuid &, KDeviceType, bool)),
     241            this, SIGNAL(sigMediumRegistered(const QUuid &, KDeviceType, bool)),
    204242            Qt::DirectConnection);
    205243}
     
    272310void UIVirtualBoxEventHandler::prepareConnections()
    273311{
    274     /* Create queued (async) connections for signals of event proxy object: */
     312    /* Create queued (async) connections for signals of event proxy object.
     313     * Keep in mind that the abstract Qt4 connection notation should be used here. */
    275314    connect(m_pProxy, SIGNAL(sigVBoxSVCAvailabilityChange(bool)),
    276315            this, SIGNAL(sigVBoxSVCAvailabilityChange(bool)),
     
    300339            this, SIGNAL(sigSnapshotRestore(QUuid, QUuid)),
    301340            Qt::QueuedConnection);
     341    connect(m_pProxy, SIGNAL(sigStorageControllerChange()),
     342            this, SIGNAL(sigStorageControllerChange()),
     343            Qt::QueuedConnection);
     344    connect(m_pProxy, SIGNAL(sigStorageDeviceChange(CMediumAttachment, bool, bool)),
     345            this, SIGNAL(sigStorageDeviceChange(CMediumAttachment, bool, bool)),
     346            Qt::QueuedConnection);
     347    connect(m_pProxy, SIGNAL(sigMediumChange(CMediumAttachment)),
     348            this, SIGNAL(sigMediumChange(CMediumAttachment)),
     349            Qt::QueuedConnection);
     350    connect(m_pProxy, SIGNAL(sigMediumConfigChange(CMedium)),
     351            this, SIGNAL(sigMediumConfigChange(CMedium)),
     352            Qt::QueuedConnection);
     353    connect(m_pProxy, SIGNAL(sigMediumRegistered(const QUuid &, KDeviceType, bool)),
     354            this, SIGNAL(sigMediumRegistered(const QUuid &, KDeviceType, bool)),
     355            Qt::QueuedConnection);
    302356}
    303357
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.h

    r76581 r77990  
    3030/* COM includes: */
    3131#include "COMEnums.h"
     32#include "CMedium.h"
     33#include "CMediumAttachment.h"
    3234
    3335/* Forward declarations: */
     
    6264    void sigSnapshotRestore(const QUuid &uId, const QUuid &uSnapshotId);
    6365
     66    /** Notifies about storage controller change. */
     67    void sigStorageControllerChange();
     68    /** Notifies about storage device change.
     69      * @param  comAttachment  Brings corresponding attachment.
     70      * @param  fRemoved       Brings whether medium is removed or added.
     71      * @param  fSilent        Brings whether this change has gone silent for guest. */
     72    void sigStorageDeviceChange(CMediumAttachment comAttachment, bool fRemoved, bool fSilent);
     73    /** Notifies about storage medium @a comAttachment state change. */
     74    void sigMediumChange(CMediumAttachment comAttachment);
     75    /** Notifies about storage @a comMedium config change. */
     76    void sigMediumConfigChange(CMedium comMedium);
     77    /** Notifies about storage medium is (un)registered.
     78      * @param  uMediumId      Brings corresponding medium ID.
     79      * @param  enmMediumType  Brings corresponding medium type.
     80      * @param  fRegistered    Brings whether medium is registered or unregistered. */
     81    void sigMediumRegistered(const QUuid &uMediumId, KDeviceType enmMediumType, bool fRegistered);
     82
    6483public:
    6584
Note: See TracChangeset for help on using the changeset viewer.

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