VirtualBox

Ignore:
Timestamp:
Sep 23, 2015 3:56:45 PM (9 years ago)
Author:
vboxsync
Message:

FE/Qt: Runtime UI: Pass-through IStorageDeviceChangedEvent to UISession.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
6 edited

Legend:

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

    r57364 r57873  
    4444# include "CStateChangedEvent.h"
    4545# include "CNetworkAdapterChangedEvent.h"
     46# include "CStorageDeviceChangedEvent.h"
    4647# include "CMediumChangedEvent.h"
    4748# include "CUSBDevice.h"
     
    187188            break;
    188189        }
     190        case KVBoxEventType_OnStorageDeviceChanged:
     191        {
     192            CStorageDeviceChangedEvent es(pEvent);
     193            emit sigStorageDeviceChange(es.GetStorageDevice(), es.GetRemoved(), es.GetSilent());
     194            break;
     195        }
    189196        case KVBoxEventType_OnMediumChanged:
    190197        {
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h

    r55554 r57873  
    8585    /** Notifies about network @a adapter state change. */
    8686    void sigNetworkAdapterChange(CNetworkAdapter adapter);
     87    /** Notifies about storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
     88    void sigStorageDeviceChange(CMediumAttachment attachment, bool fRemoved, bool fSilent);
    8789    /** Notifies about storage medium @a attachment state change. */
    8890    void sigMediumChange(CMediumAttachment attachment);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp

    r52998 r57873  
    118118        << KVBoxEventType_OnAdditionsStateChanged
    119119        << KVBoxEventType_OnNetworkAdapterChanged
     120        << KVBoxEventType_OnStorageDeviceChanged
    120121        << KVBoxEventType_OnMediumChanged
    121122        << KVBoxEventType_OnVRDEServerChanged
     
    152153            this, SIGNAL(sigNetworkAdapterChange(CNetworkAdapter)),
    153154            Qt::QueuedConnection);
     155    connect(pListener->getWrapped(), SIGNAL(sigStorageDeviceChange(CMediumAttachment, bool, bool)),
     156            this, SIGNAL(sigStorageDeviceChange(CMediumAttachment, bool, bool)),
     157            Qt::QueuedConnection);
    154158    connect(pListener->getWrapped(), SIGNAL(sigMediumChange(CMediumAttachment)),
    155159            this, SIGNAL(sigMediumChange(CMediumAttachment)),
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h

    r55401 r57873  
    4949    /** Notifies about network @a adapter state change. */
    5050    void sigNetworkAdapterChange(CNetworkAdapter adapter);
     51    /** Notifies about storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
     52    void sigStorageDeviceChange(CMediumAttachment attachment, bool fRemoved, bool fSilent);
    5153    /** Notifies about storage medium @a attachment state change. */
    5254    void sigMediumChange(CMediumAttachment attachment);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r57805 r57873  
    772772    /* Notify listeners about the change: */
    773773    emit sigGuestMonitorChange(changeType, uScreenId, screenGeo);
     774}
     775
     776void UISession::sltHandleStorageDeviceChange(const CMediumAttachment &attachment, bool fRemoved, bool fSilent)
     777{
     778    /* Notify listeners about storage device change: */
     779    emit sigStorageDeviceChange(attachment, fRemoved, fSilent);
    774780}
    775781
     
    11921198            this, SIGNAL(sigNetworkAdapterChange(CNetworkAdapter)));
    11931199
     1200    connect(gConsoleEvents, SIGNAL(sigStorageDeviceChange(CMediumAttachment, bool, bool)),
     1201            this, SLOT(sltHandleStorageDeviceChange(CMediumAttachment, bool, bool)));
     1202
    11941203    connect(gConsoleEvents, SIGNAL(sigMediumChange(CMediumAttachment)),
    11951204            this, SIGNAL(sigMediumChange(CMediumAttachment)));
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r57495 r57873  
    262262    void sigAdditionsStateActualChange();
    263263    void sigNetworkAdapterChange(const CNetworkAdapter &networkAdapter);
     264    /** Notifies about storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
     265    void sigStorageDeviceChange(const CMediumAttachment &attachment, bool fRemoved, bool fSilent);
    264266    void sigMediumChange(const CMediumAttachment &mediumAttachment);
    265267    void sigVRDEChange();
     
    317319    void sltVideoCaptureChange();
    318320    void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
     321    /** Handles storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
     322    void sltHandleStorageDeviceChange(const CMediumAttachment &attachment, bool fRemoved, bool fSilent);
    319323
    320324    /* Handlers: Display reconfiguration stuff: */
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