VirtualBox

Changeset 98385 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 1, 2023 1:11:51 PM (23 months ago)
Author:
vboxsync
Message:

Merging r155282 and r155285 from gui4 branch: FE/Qt: Runtime UI: A bit of cleanup for UISession; Console signals/connections stuff; Link all console event listeners to UIMachine instead of UISession.

Location:
trunk
Files:
20 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:mergeinfo
      •  

        old new  
        1919/branches/dsen/gui2:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        2020/branches/dsen/gui3:79645-79692
        21 /branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248
         21/branches/dsen/gui4:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285
        2222/trunk/src:92342,154921
  • trunk/src/VBox

    • Property svn:mergeinfo
      •  

        old new  
        1919/branches/dsen/gui2/src/VBox:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        2020/branches/dsen/gui3/src/VBox:79645-79692
        21 /branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248
         21/branches/dsen/gui4/src/VBox:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285
  • trunk/src/VBox/Frontends

    • Property svn:mergeinfo
      •  

        old new  
        1616/branches/dsen/gui2/src/VBox/Frontends:79224,79228,79233,79235,79258,79262-79263,79273,79341,79345,79354,79357,79387-79388,79559-79569,79572-79573,79578,79581-79582,79590-79591,79598-79599,79602-79603,79605-79606,79632,79635,79637,79644
        1717/branches/dsen/gui3/src/VBox/Frontends:79645-79692
        18 /branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248
         18/branches/dsen/gui4/src/VBox/Frontends:155183-155185,155187,155198,155200-155201,155205,155228,155235,155243,155248,155282,155285
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r98384 r98385  
    498498        setStateIcon(KDeviceActivity_Null,    UIIconPool::iconSet(":/nw_disabled_16px.png"));
    499499        /* Configure machine state-change listener: */
    500         connect(m_pSession, &UISession::sigMachineStateChange,
     500        connect(m_pMachine, &UIMachine::sigMachineStateChange,
    501501                this, &UIIndicatorNetwork::sltHandleMachineStateChange);
    502502        /* Fetch maximum network adapters count: */
     
    10231023
    10241024        /* Configure machine state-change listener: */
    1025         connect(m_pSession, &UISession::sigMachineStateChange,
     1025        connect(m_pMachine, &UIMachine::sigMachineStateChange,
    10261026                this, &UIIndicatorFeatures::sltHandleMachineStateChange);
    10271027        m_pTimerAutoUpdate = new QTimer(this);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r98384 r98385  
    10201020
    10211021    /* Machine state-change updater: */
    1022     connect(uisession(), &UISession::sigMachineStateChange, this, &UIKeyboardHandler::sltMachineStateChanged);
     1022    connect(uimachine(), &UIMachine::sigMachineStateChange, this, &UIKeyboardHandler::sltMachineStateChanged);
    10231023
    10241024    /* Pressed keys: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r98384 r98385  
    404404void UIMachine::prepareSessionConnections()
    405405{
     406    /* Console events stuff: */
     407    connect(uisession(), &UISession::sigAudioAdapterChange,
     408            this, &UIMachine::sigAudioAdapterChange);
     409    connect(uisession(), &UISession::sigAdditionsStateChange,
     410            this, &UIMachine::sigAdditionsStateChange);
     411    connect(uisession(), &UISession::sigAdditionsStateActualChange,
     412            this, &UIMachine::sigAdditionsStateActualChange);
     413    connect(uisession(), &UISession::sigClipboardModeChange,
     414            this, &UIMachine::sigClipboardModeChange);
     415    connect(uisession(), &UISession::sigCPUExecutionCapChange,
     416            this, &UIMachine::sigCPUExecutionCapChange);
     417    connect(uisession(), &UISession::sigDnDModeChange,
     418            this, &UIMachine::sigDnDModeChange);
     419    connect(uisession(), &UISession::sigGuestMonitorChange,
     420            this, &UIMachine::sigGuestMonitorChange);
     421    connect(uisession(), &UISession::sigMachineStateChange,
     422            this, &UIMachine::sigMachineStateChange);
     423    connect(uisession(), &UISession::sigMediumChange,
     424            this, &UIMachine::sigMediumChange);
     425    connect(uisession(), &UISession::sigNetworkAdapterChange,
     426            this, &UIMachine::sigNetworkAdapterChange);
     427    connect(uisession(), &UISession::sigRecordingChange,
     428            this, &UIMachine::sigRecordingChange);
     429    connect(uisession(), &UISession::sigSharedFolderChange,
     430            this, &UIMachine::sigSharedFolderChange);
     431    connect(uisession(), &UISession::sigStorageDeviceChange,
     432            this, &UIMachine::sigStorageDeviceChange);
     433    connect(uisession(), &UISession::sigUSBControllerChange,
     434            this, &UIMachine::sigUSBControllerChange);
     435    connect(uisession(), &UISession::sigUSBDeviceStateChange,
     436            this, &UIMachine::sigUSBDeviceStateChange);
     437    connect(uisession(), &UISession::sigVRDEChange,
     438            this, &UIMachine::sigVRDEChange);
     439    connect(uisession(), &UISession::sigRuntimeError,
     440            this, &UIMachine::sigRuntimeError);
     441#ifdef VBOX_WS_MAC
     442    connect(uisession(), &UISession::sigShowWindows,
     443            this, &UIMachine::sigShowWindows);
     444#endif
     445
    406446    /* Keyboard stuff: */
    407447    connect(uisession(), &UISession::sigKeyboardLedsChange,
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h

    r98384 r98385  
    4343/* COM includes: */
    4444#include "COMEnums.h"
     45#include "CMediumAttachment.h"
     46#include "CNetworkAdapter.h"
     47#include "CUSBDevice.h"
    4548
    4649/* Forward declarations: */
     
    5962    /** Requests async visual-state change. */
    6063    void sigRequestAsyncVisualStateChange(UIVisualStateType visualStateType);
     64
     65    /** @name COM events stuff.
     66     ** @{ */
     67        /** Notifies about additions state change. */
     68        void sigAdditionsStateChange();
     69        /** Notifies about additions state actually change. */
     70        void sigAdditionsStateActualChange();
     71        /** Notifies about audio adapter change. */
     72        void sigAudioAdapterChange();
     73        /** Notifies about clipboard mode change. */
     74        void sigClipboardModeChange(KClipboardMode enmMode);
     75        /** Notifies about CPU execution cap change. */
     76        void sigCPUExecutionCapChange();
     77        /** Notifies about DnD mode change. */
     78        void sigDnDModeChange(KDnDMode enmMode);
     79        /** Notifies about guest monitor change. */
     80        void sigGuestMonitorChange(KGuestMonitorChangedEventType emnChangeType, ulong uScreenId, QRect screenGeo);
     81        /** Notifies about machine change. */
     82        void sigMachineStateChange();
     83        /** Notifies about medium change. */
     84        void sigMediumChange(const CMediumAttachment &comMediumAttachment);
     85        /** Notifies about network adapter change. */
     86        void sigNetworkAdapterChange(const CNetworkAdapter &comNetworkAdapter);
     87        /** Notifies about recording change. */
     88        void sigRecordingChange();
     89        /** Notifies about shared folder change. */
     90        void sigSharedFolderChange();
     91        /** Handles storage device change signal. */
     92        void sigStorageDeviceChange(const CMediumAttachment &comAttachment, bool fRemoved, bool fSilent);
     93        /** Handles USB controller change signal. */
     94        void sigUSBControllerChange();
     95        /** Handles USB device state change signal. */
     96        void sigUSBDeviceStateChange(const CUSBDevice &comDevice, bool fAttached, const CVirtualBoxErrorInfo &comError);
     97        /** Notifies about VRDE change. */
     98        void sigVRDEChange();
     99
     100        /** Notifies about runtime error happened. */
     101        void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage);
     102
     103#ifdef VBOX_WS_MAC
     104        /** Notifies about VM window should be shown. */
     105        void sigShowWindows();
     106#endif
     107    /** @} */
    61108
    62109    /** @name Keyboard stuff.
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r98384 r98385  
    883883    /* We should watch for requested modes: */
    884884    connect(uisession(), &UISession::sigInitialized, this, &UIMachineLogic::sltCheckForRequestedVisualStateType, Qt::QueuedConnection);
    885     connect(uisession(), &UISession::sigAdditionsStateChange, this, &UIMachineLogic::sltCheckForRequestedVisualStateType);
     885    connect(uimachine(), &UIMachine::sigAdditionsStateChange, this, &UIMachineLogic::sltCheckForRequestedVisualStateType);
    886886
    887887    /* We should watch for console events: */
    888     connect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineLogic::sltMachineStateChanged);
    889     connect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineLogic::sltAdditionsStateChanged);
     888    connect(uimachine(), &UIMachine::sigMachineStateChange, this, &UIMachineLogic::sltMachineStateChanged);
     889    connect(uimachine(), &UIMachine::sigAdditionsStateActualChange, this, &UIMachineLogic::sltAdditionsStateChanged);
    890890    connect(uimachine(), &UIMachine::sigMouseCapabilityChange, this, &UIMachineLogic::sltMouseCapabilityChanged);
    891891    connect(uimachine(), &UIMachine::sigKeyboardLedsChange, this, &UIMachineLogic::sltKeyboardLedsChanged);
    892     connect(uisession(), &UISession::sigUSBDeviceStateChange, this, &UIMachineLogic::sltUSBDeviceStateChange);
    893     connect(uisession(), &UISession::sigRuntimeError, this, &UIMachineLogic::sltRuntimeError);
     892    connect(uimachine(), &UIMachine::sigUSBDeviceStateChange, this, &UIMachineLogic::sltUSBDeviceStateChange);
     893    connect(uimachine(), &UIMachine::sigRuntimeError, this, &UIMachineLogic::sltRuntimeError);
    894894#ifdef VBOX_WS_MAC
    895     connect(uisession(), &UISession::sigShowWindows, this, &UIMachineLogic::sltShowWindows);
    896 #endif /* VBOX_WS_MAC */
    897     connect(uisession(), &UISession::sigGuestMonitorChange, this, &UIMachineLogic::sltGuestMonitorChange);
     895    connect(uimachine(), &UIMachine::sigShowWindows, this, &UIMachineLogic::sltShowWindows);
     896#endif
     897    connect(uimachine(), &UIMachine::sigGuestMonitorChange, this, &UIMachineLogic::sltGuestMonitorChange);
    898898
    899899    /* We should watch for host-screen-change events: */
     
    14331433    /* We should stop watching for requested modes: */
    14341434    disconnect(uisession(), &UISession::sigInitialized, this, &UIMachineLogic::sltCheckForRequestedVisualStateType);
    1435     disconnect(uisession(), &UISession::sigAdditionsStateChange, this, &UIMachineLogic::sltCheckForRequestedVisualStateType);
     1435    disconnect(uimachine(), &UIMachine::sigAdditionsStateChange, this, &UIMachineLogic::sltCheckForRequestedVisualStateType);
    14361436
    14371437    /* We should stop watching for console events: */
    1438     disconnect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineLogic::sltMachineStateChanged);
    1439     disconnect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineLogic::sltAdditionsStateChanged);
     1438    disconnect(uimachine(), &UIMachine::sigMachineStateChange, this, &UIMachineLogic::sltMachineStateChanged);
     1439    disconnect(uimachine(), &UIMachine::sigAdditionsStateActualChange, this, &UIMachineLogic::sltAdditionsStateChanged);
    14401440    disconnect(uimachine(), &UIMachine::sigMouseCapabilityChange, this, &UIMachineLogic::sltMouseCapabilityChanged);
    14411441    disconnect(uimachine(), &UIMachine::sigKeyboardLedsChange, this, &UIMachineLogic::sltKeyboardLedsChanged);
    1442     disconnect(uisession(), &UISession::sigUSBDeviceStateChange, this, &UIMachineLogic::sltUSBDeviceStateChange);
    1443     disconnect(uisession(), &UISession::sigRuntimeError, this, &UIMachineLogic::sltRuntimeError);
     1442    disconnect(uimachine(), &UIMachine::sigUSBDeviceStateChange, this, &UIMachineLogic::sltUSBDeviceStateChange);
     1443    disconnect(uimachine(), &UIMachine::sigRuntimeError, this, &UIMachineLogic::sltRuntimeError);
    14441444#ifdef VBOX_WS_MAC
    14451445    disconnect(uisession(), &UISession::sigShowWindows, this, &UIMachineLogic::sltShowWindows);
    1446 #endif /* VBOX_WS_MAC */
    1447     disconnect(uisession(), &UISession::sigGuestMonitorChange, this, &UIMachineLogic::sltGuestMonitorChange);
     1446#endif
     1447    disconnect(uimachine(), &UIMachine::sigGuestMonitorChange, this, &UIMachineLogic::sltGuestMonitorChange);
    14481448
    14491449    /* We should stop watching for host-screen-change events: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r98379 r98385  
    13851385{
    13861386    /* Machine state-change updater: */
    1387     connect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineView::sltMachineStateChanged);
     1387    connect(uimachine(), &UIMachine::sigMachineStateChange, this, &UIMachineView::sltMachineStateChanged);
    13881388    /* Mouse pointer shape updater: */
    13891389    connect(uimachine(), &UIMachine::sigMousePointerShapeChange, this, &UIMachineView::sltMousePointerShapeChange);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp

    r98376 r98385  
    559559{
    560560    /* We should watch for console events: */
    561     connect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged);
     561    connect(uimachine(), &UIMachine::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged);
    562562}
    563563
     
    641641{
    642642    /* We should stop watching for console events: */
    643     disconnect(uisession(), &UISession::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged);
     643    disconnect(uimachine(), &UIMachine::sigMachineStateChange, this, &UIMachineWindow::sltMachineStateChanged);
    644644}
    645645
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r98379 r98385  
    527527{
    528528    /* Machine state-change updater: */
    529     connect(uisession(), &UISession::sigMachineStateChange, this, &UIMouseHandler::sltMachineStateChanged);
     529    connect(uimachine(), &UIMachine::sigMachineStateChange, this, &UIMouseHandler::sltMachineStateChanged);
    530530
    531531    /* Mouse capability state-change updater: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r98384 r98385  
    612612    emit sigAudioAdapterChange();
    613613
    614 }
    615 
    616 void UISession::sltClipboardModeChange(KClipboardMode enmMode)
    617 {
    618     emit sigClipboardModeChange(enmMode);
    619 }
    620 
    621 void UISession::sltDnDModeChange(KDnDMode enmMode)
    622 {
    623     emit sigDnDModeChange(enmMode);
    624614}
    625615
     
    920910    m_pConsoleEventhandler = new UIConsoleEventHandler(this);
    921911
    922     /* Add console event connections: */
     912    /* Console event connections: */
     913    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigAdditionsChange,
     914            this, &UISession::sltAdditionsChange);
     915    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigAudioAdapterChange,
     916            this, &UISession::sltAudioAdapterChange);
     917    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigClipboardModeChange,
     918            this, &UISession::sigClipboardModeChange);
     919    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigCPUExecutionCapChange,
     920            this, &UISession::sigCPUExecutionCapChange);
     921    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigDnDModeChange,
     922            this, &UISession::sigDnDModeChange);
     923    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigGuestMonitorChange,
     924            this, &UISession::sltGuestMonitorChange);
     925    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigMediumChange,
     926            this, &UISession::sigMediumChange);
     927    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigNetworkAdapterChange,
     928            this, &UISession::sigNetworkAdapterChange);
     929    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigRecordingChange,
     930            this, &UISession::sltRecordingChange);
     931    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigSharedFolderChange,
     932            this, &UISession::sigSharedFolderChange);
     933    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigStateChange,
     934            this, &UISession::sltStateChange);
     935    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigStorageDeviceChange,
     936            this, &UISession::sltHandleStorageDeviceChange);
     937    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigUSBControllerChange,
     938            this, &UISession::sigUSBControllerChange);
     939    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigUSBDeviceStateChange,
     940            this, &UISession::sigUSBDeviceStateChange);
     941    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigVRDEChange,
     942            this, &UISession::sltVRDEChange);
     943    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigRuntimeError,
     944            this, &UISession::sigRuntimeError);
     945
     946#ifdef VBOX_WS_MAC
     947    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigShowWindow,
     948            this, &UISession::sigShowWindows, Qt::QueuedConnection);
     949#endif
     950
     951    /* Console keyboard connections: */
     952    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigKeyboardLedsChange,
     953            this, &UISession::sigKeyboardLedsChange);
     954
     955    /* Console mouse connections: */
    923956    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigMousePointerShapeChange,
    924957            this, &UISession::sigMousePointerShapeChange);
     
    927960    connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigCursorPositionChange,
    928961            this, &UISession::sigCursorPositionChange);
    929     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigKeyboardLedsChange,
    930             this, &UISession::sigKeyboardLedsChange);
    931     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigStateChange,
    932             this, &UISession::sltStateChange);
    933     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigAdditionsChange,
    934             this, &UISession::sltAdditionsChange);
    935     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigVRDEChange,
    936             this, &UISession::sltVRDEChange);
    937     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigRecordingChange,
    938             this, &UISession::sltRecordingChange);
    939     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigNetworkAdapterChange,
    940             this, &UISession::sigNetworkAdapterChange);
    941     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigStorageDeviceChange,
    942             this, &UISession::sltHandleStorageDeviceChange);
    943     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigMediumChange,
    944             this, &UISession::sigMediumChange);
    945     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigUSBControllerChange,
    946             this, &UISession::sigUSBControllerChange);
    947     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigUSBDeviceStateChange,
    948             this, &UISession::sigUSBDeviceStateChange);
    949     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigSharedFolderChange,
    950             this, &UISession::sigSharedFolderChange);
    951     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigRuntimeError,
    952             this, &UISession::sigRuntimeError);
    953 #ifdef VBOX_WS_MAC
    954     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigShowWindow,
    955             this, &UISession::sigShowWindows, Qt::QueuedConnection);
    956 #endif /* VBOX_WS_MAC */
    957     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigCPUExecutionCapChange,
    958             this, &UISession::sigCPUExecutionCapChange);
    959     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigGuestMonitorChange,
    960             this, &UISession::sltGuestMonitorChange);
    961     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigAudioAdapterChange,
    962             this, &UISession::sltAudioAdapterChange);
    963     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigClipboardModeChange,
    964             this, &UISession::sltClipboardModeChange);
    965     connect(m_pConsoleEventhandler, &UIConsoleEventHandler::sigDnDModeChange,
    966             this, &UISession::sltDnDModeChange);
    967962}
    968963
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r98384 r98385  
    7878signals:
    7979
    80     /** Notifies about frame-buffer resize. */
    81     void sigFrameBufferResize();
    82 
    83     /* Console callback signals: */
     80    /** Notifies listeners about session initialized. */
     81    void sigInitialized();
     82
     83    /** Notifies about additions state change. */
     84    void sigAdditionsStateChange();
     85    /** Notifies about additions state actually change. */
     86    void sigAdditionsStateActualChange();
     87    /** Notifies about additions state actually change. */
     88    void sigAudioAdapterChange();
     89    /** Notifies about clipboard mode change. */
     90    void sigClipboardModeChange(KClipboardMode enmMode);
     91    /** Notifies about CPU execution cap change. */
     92    void sigCPUExecutionCapChange();
     93    /** Notifies about DnD mode change. */
     94    void sigDnDModeChange(KDnDMode enmMode);
     95    /** Notifies about guest monitor change. */
     96    void sigGuestMonitorChange(KGuestMonitorChangedEventType enmChangeType, ulong uScreenId, QRect screenGeo);
     97    /** Notifies about machine change. */
     98    void sigMachineStateChange();
     99    /** Notifies about medium change. */
     100    void sigMediumChange(const CMediumAttachment &comMediumAttachment);
     101    /** Notifies about network adapter change. */
     102    void sigNetworkAdapterChange(const CNetworkAdapter &comNetworkAdapter);
     103    /** Notifies about recording change. */
     104    void sigRecordingChange();
     105    /** Notifies about shared folder change. */
     106    void sigSharedFolderChange();
     107    /** Notifies about storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
     108    void sigStorageDeviceChange(const CMediumAttachment &comAttachment, bool fRemoved, bool fSilent);
     109    /** Handles USB controller change signal. */
     110    void sigUSBControllerChange();
     111    /** Handles USB device state change signal. */
     112    void sigUSBDeviceStateChange(const CUSBDevice &comDevice, bool fAttached, const CVirtualBoxErrorInfo &comError);
     113    /** Notifies about VRDE change. */
     114    void sigVRDEChange();
     115
     116    /** Notifies about runtime error happened. */
     117    void sigRuntimeError(bool fFatal, const QString &strErrorId, const QString &strMessage);
     118
     119#ifdef VBOX_WS_MAC
     120    /** Notifies about VM window should be shown. */
     121    void sigShowWindows();
     122#endif
     123
     124    /** Notifies about keyboard LEDs change. */
     125    void sigKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);
     126
    84127    /** Notifies listeners about mouse pointer shape change. */
    85128    void sigMousePointerShapeChange(const UIMousePointerShapeData &shapeData);
     
    90133    /** Notifies listeners about cursor position change. */
    91134    void sigCursorPositionChange(bool fContainsData, unsigned long uX, unsigned long uY);
    92     void sigKeyboardLedsChange(bool fNumLock, bool fCapsLock, bool fScrollLock);
    93     void sigMachineStateChange();
    94     void sigAdditionsStateChange();
    95     void sigAdditionsStateActualChange();
    96     void sigNetworkAdapterChange(const CNetworkAdapter &networkAdapter);
    97     /** Notifies about storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */
    98     void sigStorageDeviceChange(const CMediumAttachment &attachment, bool fRemoved, bool fSilent);
    99     void sigMediumChange(const CMediumAttachment &mediumAttachment);
    100     void sigVRDEChange();
    101     void sigRecordingChange();
    102     void sigUSBControllerChange();
    103     void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error);
    104     void sigSharedFolderChange();
    105     void sigRuntimeError(bool bIsFatal, const QString &strErrorId, const QString &strMessage);
    106 #ifdef RT_OS_DARWIN
    107     void sigShowWindows();
    108 #endif /* RT_OS_DARWIN */
    109     void sigCPUExecutionCapChange();
    110     void sigGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
    111     void sigAudioAdapterChange();
    112     void sigClipboardModeChange(KClipboardMode enmMode);
    113     void sigDnDModeChange(KDnDMode enmMode);
    114135
    115136    /** Notifies about host-screen count change. */
     
    120141    void sigHostScreenAvailableAreaChange();
    121142
    122     /* Session signals: */
    123     void sigInitialized();
     143    /** Notifies about frame-buffer resize. */
     144    void sigFrameBufferResize();
    124145
    125146public:
     
    327348    /** Handles audio adapter change. */
    328349    void sltAudioAdapterChange();
    329     /** Handles clip board mode change. */
    330     void sltClipboardModeChange(KClipboardMode enmMode);
    331     /** Handles drag and drop mode change. */
    332     void sltDnDModeChange(KDnDMode enmMode);
    333350
    334351    /* Handlers: Display reconfiguration stuff: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp

    r98103 r98385  
    3535
    3636/* GUI includes: */
     37#include "UIActionPoolRuntime.h"
     38#include "UIDesktopWidgetWatchdog.h"
     39#include "UIExtraDataManager.h"
     40#include "UIFrameBuffer.h"
     41#include "UIMachine.h"
     42#include "UIMachineLogicFullscreen.h"
     43#include "UIMachineViewFullscreen.h"
     44#include "UIMachineWindow.h"
    3745#include "UISession.h"
    38 #include "UIActionPoolRuntime.h"
    39 #include "UIMachineLogicFullscreen.h"
    40 #include "UIMachineWindow.h"
    41 #include "UIMachineViewFullscreen.h"
    42 #include "UIFrameBuffer.h"
    43 #include "UIExtraDataManager.h"
    44 #include "UIDesktopWidgetWatchdog.h"
    4546
    4647/* Other VBox includes: */
     
    118119
    119120    /* Guest additions state-change updater: */
    120     connect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineViewFullscreen::sltAdditionsStateChanged);
     121    connect(uimachine(), &UIMachine::sigAdditionsStateActualChange, this, &UIMachineViewFullscreen::sltAdditionsStateChanged);
    121122}
    122123
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp

    r98103 r98385  
    4141#include "UIIconPool.h"
    4242#include "UIInformationRuntime.h"
    43 #include "UISession.h"
     43#include "UIMachine.h"
    4444
    4545/* COM includes: */
     46#include "CDisplay.h"
    4647#include "CGraphicsAdapter.h"
    4748#include "CGuest.h"
     49#include "CMachineDebugger.h"
    4850#include "CVRDEServerInfo.h"
    4951
     
    497499*********************************************************************************************************************************/
    498500
    499 UIInformationRuntime::UIInformationRuntime(QWidget *pParent, const CMachine &machine, const CConsole &console, const UISession *pSession)
     501UIInformationRuntime::UIInformationRuntime(QWidget *pParent, const CMachine &machine, const CConsole &console, const UIMachine *pMachine)
    500502    : QIWithRetranslateUI<QWidget>(pParent)
    501503    , m_machine(machine)
     
    507509    if (!m_console.isNull())
    508510        m_comGuest = m_console.GetGuest();
    509     connect(pSession, &UISession::sigAdditionsStateChange, this, &UIInformationRuntime::sltGuestAdditionsStateChange);
    510     connect(pSession, &UISession::sigGuestMonitorChange, this, &UIInformationRuntime::sltGuestMonitorChange);
    511     connect(pSession, &UISession::sigVRDEChange, this, &UIInformationRuntime::sltVRDEChange);
    512     connect(pSession, &UISession::sigClipboardModeChange, this, &UIInformationRuntime::sltClipboardChange);
    513     connect(pSession, &UISession::sigDnDModeChange, this, &UIInformationRuntime::sltDnDModeChange);
     511    connect(pMachine, &UIMachine::sigAdditionsStateChange, this, &UIInformationRuntime::sltGuestAdditionsStateChange);
     512    connect(pMachine, &UIMachine::sigGuestMonitorChange, this, &UIInformationRuntime::sltGuestMonitorChange);
     513    connect(pMachine, &UIMachine::sigVRDEChange, this, &UIInformationRuntime::sltVRDEChange);
     514    connect(pMachine, &UIMachine::sigClipboardModeChange, this, &UIInformationRuntime::sltClipboardChange);
     515    connect(pMachine, &UIMachine::sigDnDModeChange, this, &UIInformationRuntime::sltDnDModeChange);
    514516
    515517    prepareObjects();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.h

    r98103 r98385  
    4747class QAction;
    4848class QVBoxLayout;
    49 class UISession;
     49class UIMachine;
    5050class UIRuntimeInfoWidget;
    5151
     
    6161      * @param machine is machine reference.
    6262      * @param console is machine console reference. */
    63     UIInformationRuntime(QWidget *pParent, const CMachine &machine, const CConsole &console, const UISession *pSession);
     63    UIInformationRuntime(QWidget *pParent, const CMachine &machine, const CConsole &console, const UIMachine *pMachine);
    6464
    6565protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIVMInformationDialog.cpp

    r98103 r98385  
    247247        /* Create Runtime Information tab: */
    248248        UIInformationRuntime *pInformationRuntimeWidget =
    249             new UIInformationRuntime(this, m_pMachineWindow->machine(), m_pMachineWindow->console(), m_pMachineWindow->uisession());
     249            new UIInformationRuntime(this, m_pMachineWindow->machine(), m_pMachineWindow->console(), m_pMachineWindow->uimachine());
    250250        if (pInformationRuntimeWidget)
    251251        {
     
    259259        if (pVMActivityMonitorWidget)
    260260        {
    261             connect(m_pMachineWindow->uisession(), &UISession::sigAdditionsStateChange,
     261            connect(m_pMachineWindow->uimachine(), &UIMachine::sigAdditionsStateChange,
    262262                    pVMActivityMonitorWidget, &UIVMActivityMonitor::sltGuestAdditionsStateChange);
    263263            m_tabs.insert(Tabs_ActivityMonitor, pVMActivityMonitorWidget);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp

    r98103 r98385  
    3434
    3535/* GUI includes: */
     36#include "UIActionPoolRuntime.h"
     37#include "UIDesktopWidgetWatchdog.h"
     38#include "UIExtraDataManager.h"
     39#include "UIFrameBuffer.h"
     40#include "UIMachine.h"
     41#include "UIMachineLogic.h"
     42#include "UIMachineViewNormal.h"
     43#include "UIMachineWindow.h"
    3644#include "UISession.h"
    37 #include "UIActionPoolRuntime.h"
    38 #include "UIMachineLogic.h"
    39 #include "UIMachineWindow.h"
    40 #include "UIMachineViewNormal.h"
    41 #include "UIFrameBuffer.h"
    42 #include "UIExtraDataManager.h"
    43 #include "UIDesktopWidgetWatchdog.h"
    4445
    4546/* Other VBox includes: */
     
    132133
    133134    /* Guest additions state-change updater: */
    134     connect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineViewNormal::sltAdditionsStateChanged);
     135    connect(uimachine(), &UIMachine::sigAdditionsStateActualChange, this, &UIMachineViewNormal::sltAdditionsStateChanged);
    135136}
    136137
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r98375 r98385  
    4444#include "UIIndicatorsPool.h"
    4545#include "UIKeyboardHandler.h"
     46#include "UIMachine.h"
    4647#include "UIMouseHandler.h"
    4748#include "UIMachineLogic.h"
     
    254255    UIMachineWindow::prepareSessionConnections();
    255256
    256     /* We should watch for console events: */
    257     connect(machineLogic()->uisession(), &UISession::sigMediumChange,
     257    /* Start watching for console events: */
     258    connect(machineLogic()->uimachine(), &UIMachine::sigMediumChange,
    258259        this, &UIMachineWindowNormal::sltMediumChange);
    259     connect(machineLogic()->uisession(), &UISession::sigUSBControllerChange,
     260    connect(machineLogic()->uimachine(), &UIMachine::sigUSBControllerChange,
    260261            this, &UIMachineWindowNormal::sltUSBControllerChange);
    261     connect(machineLogic()->uisession(), &UISession::sigUSBDeviceStateChange,
     262    connect(machineLogic()->uimachine(), &UIMachine::sigUSBDeviceStateChange,
    262263            this, &UIMachineWindowNormal::sltUSBDeviceStateChange);
    263     connect(machineLogic()->uisession(), &UISession::sigAudioAdapterChange,
     264    connect(machineLogic()->uimachine(), &UIMachine::sigAudioAdapterChange,
    264265            this, &UIMachineWindowNormal::sltAudioAdapterChange);
    265     connect(machineLogic()->uisession(), &UISession::sigNetworkAdapterChange,
     266    connect(machineLogic()->uimachine(), &UIMachine::sigNetworkAdapterChange,
    266267            this, &UIMachineWindowNormal::sltNetworkAdapterChange);
    267     connect(machineLogic()->uisession(), &UISession::sigSharedFolderChange,
     268    connect(machineLogic()->uimachine(), &UIMachine::sigSharedFolderChange,
    268269            this, &UIMachineWindowNormal::sltSharedFolderChange);
    269     connect(machineLogic()->uisession(), &UISession::sigRecordingChange,
     270    connect(machineLogic()->uimachine(), &UIMachine::sigRecordingChange,
    270271            this, &UIMachineWindowNormal::sltRecordingChange);
    271     connect(machineLogic()->uisession(), &UISession::sigCPUExecutionCapChange,
     272    connect(machineLogic()->uimachine(), &UIMachine::sigCPUExecutionCapChange,
    272273            this, &UIMachineWindowNormal::sltCPUExecutionCapChange);
     274
     275    /* Watch for UISession signals: */
    273276    connect(machineLogic()->uisession(), &UISession::sigInitialized,
    274277            this, &UIMachineWindowNormal::sltHandleSessionInitialized);
     
    459462void UIMachineWindowNormal::cleanupSessionConnections()
    460463{
    461     /* We should stop watching for console events: */
    462     disconnect(machineLogic()->uisession(), &UISession::sigMediumChange,
     464    /* Stop watching for console events: */
     465    disconnect(machineLogic()->uimachine(), &UIMachine::sigMediumChange,
    463466               this, &UIMachineWindowNormal::sltMediumChange);
    464     disconnect(machineLogic()->uisession(), &UISession::sigUSBControllerChange,
     467    disconnect(machineLogic()->uimachine(), &UIMachine::sigUSBControllerChange,
    465468               this, &UIMachineWindowNormal::sltUSBControllerChange);
    466     disconnect(machineLogic()->uisession(), &UISession::sigUSBDeviceStateChange,
     469    disconnect(machineLogic()->uimachine(), &UIMachine::sigUSBDeviceStateChange,
    467470               this, &UIMachineWindowNormal::sltUSBDeviceStateChange);
    468     disconnect(machineLogic()->uisession(), &UISession::sigNetworkAdapterChange,
     471    disconnect(machineLogic()->uimachine(), &UIMachine::sigNetworkAdapterChange,
    469472               this, &UIMachineWindowNormal::sltNetworkAdapterChange);
    470     disconnect(machineLogic()->uisession(), &UISession::sigAudioAdapterChange,
     473    disconnect(machineLogic()->uimachine(), &UIMachine::sigAudioAdapterChange,
    471474               this, &UIMachineWindowNormal::sltAudioAdapterChange);
    472     disconnect(machineLogic()->uisession(), &UISession::sigSharedFolderChange,
     475    disconnect(machineLogic()->uimachine(), &UIMachine::sigSharedFolderChange,
    473476               this, &UIMachineWindowNormal::sltSharedFolderChange);
    474     disconnect(machineLogic()->uisession(), &UISession::sigRecordingChange,
     477    disconnect(machineLogic()->uimachine(), &UIMachine::sigRecordingChange,
    475478               this, &UIMachineWindowNormal::sltRecordingChange);
    476     disconnect(machineLogic()->uisession(), &UISession::sigCPUExecutionCapChange,
     479    disconnect(machineLogic()->uimachine(), &UIMachine::sigCPUExecutionCapChange,
    477480               this, &UIMachineWindowNormal::sltCPUExecutionCapChange);
    478481
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp

    r98103 r98385  
    3535
    3636/* GUI includes: */
     37#include "UIDesktopWidgetWatchdog.h"
     38#include "UIExtraDataManager.h"
     39#include "UIFrameBuffer.h"
     40#include "UIMachine.h"
     41#include "UIMachineLogicSeamless.h"
     42#include "UIMachineViewSeamless.h"
     43#include "UIMachineWindow.h"
    3744#include "UISession.h"
    38 #include "UIMachineLogicSeamless.h"
    39 #include "UIMachineWindow.h"
    40 #include "UIMachineViewSeamless.h"
    41 #include "UIFrameBuffer.h"
    42 #include "UIExtraDataManager.h"
    43 #include "UIDesktopWidgetWatchdog.h"
    4445
    4546/* COM includes: */
     
    129130
    130131    /* Guest additions state-change updater: */
    131     connect(uisession(), &UISession::sigAdditionsStateActualChange, this, &UIMachineViewSeamless::sltAdditionsStateChanged);
     132    connect(uimachine(), &UIMachine::sigAdditionsStateActualChange, this, &UIMachineViewSeamless::sltAdditionsStateChanged);
    132133}
    133134
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