VirtualBox

Ignore:
Timestamp:
Feb 1, 2023 12:15:57 PM (2 years ago)
Author:
vboxsync
Message:

Merging r155183 and r155198 from gui4 branch: Runtime UI: Provide UIMachineLogic and UIIndicatorsPool with access to UIMachine stuff.

Location:
trunk
Files:
16 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,155198
        2122/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,155198
  • 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,155198
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r98124 r98375  
    3434
    3535/* GUI includes: */
     36#include "QIStatusBarIndicator.h"
     37#include "QIWithRetranslateUI.h"
     38#include "UIAnimationFramework.h"
     39#include "UICommon.h"
     40#include "UIConverter.h"
     41#include "UIHostComboEditor.h"
     42#include "UIIconPool.h"
    3643#include "UIIndicatorsPool.h"
    37 #include "QIWithRetranslateUI.h"
    3844#include "UIExtraDataManager.h"
     45#include "UIMachine.h"
    3946#include "UIMachineDefs.h"
    40 #include "UIConverter.h"
    41 #include "UIAnimationFramework.h"
     47#include "UIMedium.h"
    4248#include "UISession.h"
    43 #include "UIMedium.h"
    44 #include "UIIconPool.h"
    45 #include "UIHostComboEditor.h"
    46 #include "QIStatusBarIndicator.h"
    47 #include "UICommon.h"
    4849
    4950/* COM includes: */
     
    7980
    8081    /** Constructor which remembers passed @a session object. */
    81     UISessionStateStatusBarIndicator(IndicatorType enmType, UISession *pSession);
     82    UISessionStateStatusBarIndicator(IndicatorType enmType, UIMachine *pMachine, UISession *pSession);
    8283
    8384    /** Returns the indicator type. */
     
    9899    const IndicatorType m_enmType;
    99100
     101    /** Holds the machine UI reference. */
     102    UIMachine *m_pMachine;
    100103    /** Holds the session UI reference. */
    101104    UISession *m_pSession;
     
    167170
    168171
    169 UISessionStateStatusBarIndicator::UISessionStateStatusBarIndicator(IndicatorType enmType, UISession *pSession)
     172UISessionStateStatusBarIndicator::UISessionStateStatusBarIndicator(IndicatorType enmType, UIMachine *pMachine, UISession *pSession)
    170173    : m_enmType(enmType)
     174    , m_pMachine(pMachine)
    171175    , m_pSession(pSession)
    172176{
     
    194198
    195199    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    196     UIIndicatorHardDrive(UISession *pSession)
    197         : UISessionStateStatusBarIndicator(IndicatorType_HardDisks, pSession)
     200    UIIndicatorHardDrive(UIMachine *pMachine, UISession *pSession)
     201        : UISessionStateStatusBarIndicator(IndicatorType_HardDisks, pMachine, pSession)
    198202    {
    199203        /* Assign state-icons: */
     
    271275
    272276    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    273     UIIndicatorOpticalDisks(UISession *pSession)
    274         : UISessionStateStatusBarIndicator(IndicatorType_OpticalDisks, pSession)
     277    UIIndicatorOpticalDisks(UIMachine *pMachine, UISession *pSession)
     278        : UISessionStateStatusBarIndicator(IndicatorType_OpticalDisks, pMachine, pSession)
    275279    {
    276280        /* Assign state-icons: */
     
    340344
    341345    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    342     UIIndicatorFloppyDisks(UISession *pSession)
    343         : UISessionStateStatusBarIndicator(IndicatorType_FloppyDisks, pSession)
     346    UIIndicatorFloppyDisks(UIMachine *pMachine, UISession *pSession)
     347        : UISessionStateStatusBarIndicator(IndicatorType_FloppyDisks, pMachine, pSession)
    344348    {
    345349        /* Assign state-icons: */
     
    418422
    419423    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    420     UIIndicatorAudio(UISession *pSession)
    421         : UISessionStateStatusBarIndicator(IndicatorType_Audio, pSession)
     424    UIIndicatorAudio(UIMachine *pMachine, UISession *pSession)
     425        : UISessionStateStatusBarIndicator(IndicatorType_Audio, pMachine, pSession)
    422426    {
    423427        /* Assign state-icons: */
     
    483487
    484488    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    485     UIIndicatorNetwork(UISession *pSession)
    486         : UISessionStateStatusBarIndicator(IndicatorType_Network, pSession)
     489    UIIndicatorNetwork(UIMachine *pMachine, UISession *pSession)
     490        : UISessionStateStatusBarIndicator(IndicatorType_Network, pMachine, pSession)
    487491        , m_pTimerAutoUpdate(0)
    488492        , m_cMaxNetworkAdapters(0)
     
    624628
    625629    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    626     UIIndicatorUSB(UISession *pSession)
    627         : UISessionStateStatusBarIndicator(IndicatorType_USB, pSession)
     630    UIIndicatorUSB(UIMachine *pMachine, UISession *pSession)
     631        : UISessionStateStatusBarIndicator(IndicatorType_USB, pMachine, pSession)
    628632    {
    629633        /* Assign state-icons: */
     
    683687
    684688    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    685     UIIndicatorSharedFolders(UISession *pSession)
    686         : UISessionStateStatusBarIndicator(IndicatorType_SharedFolders, pSession)
     689    UIIndicatorSharedFolders(UIMachine *pMachine, UISession *pSession)
     690        : UISessionStateStatusBarIndicator(IndicatorType_SharedFolders, pMachine, pSession)
    687691    {
    688692        /* Assign state-icons: */
     
    745749
    746750    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    747     UIIndicatorDisplay(UISession *pSession)
    748         : UISessionStateStatusBarIndicator(IndicatorType_Display, pSession)
     751    UIIndicatorDisplay(UIMachine *pMachine, UISession *pSession)
     752        : UISessionStateStatusBarIndicator(IndicatorType_Display, pMachine, pSession)
    749753    {
    750754        /* Assign state-icons: */
     
    831835
    832836    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    833     UIIndicatorRecording(UISession *pSession)
    834         : UISessionStateStatusBarIndicator(IndicatorType_Recording, pSession)
     837    UIIndicatorRecording(UIMachine *pMachine, UISession *pSession)
     838        : UISessionStateStatusBarIndicator(IndicatorType_Recording, pMachine, pSession)
    835839        , m_pAnimation(0)
    836840        , m_dRotationAngle(0)
     
    10051009
    10061010    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    1007     UIIndicatorFeatures(UISession *pSession)
    1008         : UISessionStateStatusBarIndicator(IndicatorType_Features, pSession)
     1011    UIIndicatorFeatures(UIMachine *pMachine, UISession *pSession)
     1012        : UISessionStateStatusBarIndicator(IndicatorType_Features, pMachine, pSession)
    10091013        , m_iCPULoadPercentage(0)
    10101014    {
     
    11671171
    11681172    /** Constructor, using @a pSession for state-update routine. */
    1169     UIIndicatorMouse(UISession *pSession)
    1170         : UISessionStateStatusBarIndicator(IndicatorType_Mouse, pSession)
     1173    UIIndicatorMouse(UIMachine *pMachine, UISession *pSession)
     1174        : UISessionStateStatusBarIndicator(IndicatorType_Mouse, pMachine, pSession)
    11711175    {
    11721176        /* Assign state-icons: */
     
    12431247
    12441248    /** Constructor, using @a pSession for state-update routine. */
    1245     UIIndicatorKeyboard(UISession *pSession)
    1246         : UISessionStateStatusBarIndicator(IndicatorType_Keyboard, pSession)
     1249    UIIndicatorKeyboard(UIMachine *pMachine, UISession *pSession)
     1250        : UISessionStateStatusBarIndicator(IndicatorType_Keyboard, pMachine, pSession)
    12471251    {
    12481252        /* Assign state-icons: */
     
    13251329
    13261330
    1327 UIIndicatorsPool::UIIndicatorsPool(UISession *pSession, QWidget *pParent /* = 0 */)
     1331UIIndicatorsPool::UIIndicatorsPool(UIMachine *pMachine, UISession *pSession, QWidget *pParent /* = 0 */)
    13281332    : QWidget(pParent)
     1333    , m_pMachine(pMachine)
    13291334    , m_pSession(pSession)
    13301335    , m_fEnabled(false)
    13311336    , m_pTimerAutoUpdate(0)
    13321337{
    1333     /* Prepare: */
    13341338    prepare();
    13351339}
     
    13371341UIIndicatorsPool::~UIIndicatorsPool()
    13381342{
    1339     /* Cleanup: */
    13401343    cleanup();
    13411344}
     
    15721575            switch (indicatorType)
    15731576            {
    1574                 case IndicatorType_HardDisks:         m_pool[indicatorType] = new UIIndicatorHardDrive(m_pSession);     break;
    1575                 case IndicatorType_OpticalDisks:      m_pool[indicatorType] = new UIIndicatorOpticalDisks(m_pSession);  break;
    1576                 case IndicatorType_FloppyDisks:       m_pool[indicatorType] = new UIIndicatorFloppyDisks(m_pSession);   break;
    1577                 case IndicatorType_Audio:             m_pool[indicatorType] = new UIIndicatorAudio(m_pSession);         break;
    1578                 case IndicatorType_Network:           m_pool[indicatorType] = new UIIndicatorNetwork(m_pSession);       break;
    1579                 case IndicatorType_USB:               m_pool[indicatorType] = new UIIndicatorUSB(m_pSession);           break;
    1580                 case IndicatorType_SharedFolders:     m_pool[indicatorType] = new UIIndicatorSharedFolders(m_pSession); break;
    1581                 case IndicatorType_Display:           m_pool[indicatorType] = new UIIndicatorDisplay(m_pSession);       break;
    1582                 case IndicatorType_Recording:         m_pool[indicatorType] = new UIIndicatorRecording(m_pSession);     break;
    1583                 case IndicatorType_Features:          m_pool[indicatorType] = new UIIndicatorFeatures(m_pSession);      break;
    1584                 case IndicatorType_Mouse:             m_pool[indicatorType] = new UIIndicatorMouse(m_pSession);         break;
    1585                 case IndicatorType_Keyboard:          m_pool[indicatorType] = new UIIndicatorKeyboard(m_pSession);      break;
    1586                 case IndicatorType_KeyboardExtension: m_pool[indicatorType] = new UIIndicatorKeyboardExtension;         break;
     1577                case IndicatorType_HardDisks:         m_pool[indicatorType] = new UIIndicatorHardDrive(m_pMachine, m_pSession);     break;
     1578                case IndicatorType_OpticalDisks:      m_pool[indicatorType] = new UIIndicatorOpticalDisks(m_pMachine, m_pSession);  break;
     1579                case IndicatorType_FloppyDisks:       m_pool[indicatorType] = new UIIndicatorFloppyDisks(m_pMachine, m_pSession);   break;
     1580                case IndicatorType_Audio:             m_pool[indicatorType] = new UIIndicatorAudio(m_pMachine, m_pSession);         break;
     1581                case IndicatorType_Network:           m_pool[indicatorType] = new UIIndicatorNetwork(m_pMachine, m_pSession);       break;
     1582                case IndicatorType_USB:               m_pool[indicatorType] = new UIIndicatorUSB(m_pMachine, m_pSession);           break;
     1583                case IndicatorType_SharedFolders:     m_pool[indicatorType] = new UIIndicatorSharedFolders(m_pMachine, m_pSession); break;
     1584                case IndicatorType_Display:           m_pool[indicatorType] = new UIIndicatorDisplay(m_pMachine, m_pSession);       break;
     1585                case IndicatorType_Recording:         m_pool[indicatorType] = new UIIndicatorRecording(m_pMachine, m_pSession);     break;
     1586                case IndicatorType_Features:          m_pool[indicatorType] = new UIIndicatorFeatures(m_pMachine, m_pSession);      break;
     1587                case IndicatorType_Mouse:             m_pool[indicatorType] = new UIIndicatorMouse(m_pMachine, m_pSession);         break;
     1588                case IndicatorType_Keyboard:          m_pool[indicatorType] = new UIIndicatorKeyboard(m_pMachine, m_pSession);      break;
     1589                case IndicatorType_KeyboardExtension: m_pool[indicatorType] = new UIIndicatorKeyboardExtension;                     break;
    15871590                default: break;
    15881591            }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.h

    r98103 r98375  
    4444
    4545/* Forward declarations: */
     46class UIMachine;
    4647class UISession;
    4748class CSession;
     
    6667
    6768    /** Constructor, passes @a pParent to the QWidget constructor.
    68       * @param pSession is used to retrieve appearance information. */
    69     UIIndicatorsPool(UISession *pSession, QWidget *pParent = 0);
     69      * @param  pMachine  Brings the machine UI reference.
     70      * @param  pSession  Brings the session UI reference. */
     71    UIIndicatorsPool(UIMachine *pMachine, UISession *pSession, QWidget *pParent = 0);
    7072    /** Destructor. */
    7173    ~UIIndicatorsPool();
     
    121123    void updateIndicatorStateForDevice(QIStatusBarIndicator *pIndicator, KDeviceActivity state);
    122124
    123     /** Holds the UI session reference. */
     125    /** Holds the machine UI reference. */
     126    UIMachine *m_pMachine;
     127    /** Holds the session UI reference. */
    124128    UISession *m_pSession;
    125129    /** Holds whether status-bar is enabled. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r98103 r98375  
    5555#include "UIIconPool.h"
    5656#include "UIKeyboardHandler.h"
     57#include "UIMachine.h"
    5758#include "UIMachineLogic.h"
    5859#include "UIMachineLogicFullscreen.h"
     
    154155
    155156/* static */
    156 UIMachineLogic* UIMachineLogic::create(QObject *pParent,
     157UIMachineLogic *UIMachineLogic::create(UIMachine *pMachine,
    157158                                       UISession *pSession,
    158                                        UIVisualStateType visualStateType)
     159                                       UIVisualStateType enmVisualStateType)
    159160{
    160161    UIMachineLogic *pLogic = 0;
    161     switch (visualStateType)
     162    switch (enmVisualStateType)
    162163    {
    163164        case UIVisualStateType_Normal:
    164             pLogic = new UIMachineLogicNormal(pParent, pSession);
     165            pLogic = new UIMachineLogicNormal(pMachine, pSession);
    165166            break;
    166167        case UIVisualStateType_Fullscreen:
    167             pLogic = new UIMachineLogicFullscreen(pParent, pSession);
     168            pLogic = new UIMachineLogicFullscreen(pMachine, pSession);
    168169            break;
    169170        case UIVisualStateType_Seamless:
    170             pLogic = new UIMachineLogicSeamless(pParent, pSession);
     171            pLogic = new UIMachineLogicSeamless(pMachine, pSession);
    171172            break;
    172173        case UIVisualStateType_Scale:
    173             pLogic = new UIMachineLogicScale(pParent, pSession);
     174            pLogic = new UIMachineLogicScale(pMachine, pSession);
    174175            break;
    175 
    176         case UIVisualStateType_Invalid: case UIVisualStateType_All: break; /* Shut up, MSC! */
     176        case UIVisualStateType_Invalid:
     177        case UIVisualStateType_All:
     178            break;
    177179    }
    178180    return pLogic;
     
    180182
    181183/* static */
    182 void UIMachineLogic::destroy(UIMachineLogic *pWhichLogic)
    183 {
    184     delete pWhichLogic;
     184void UIMachineLogic::destroy(UIMachineLogic *pLogic)
     185{
     186    delete pLogic;
    185187}
    186188
     
    271273}
    272274
    273 UIActionPool* UIMachineLogic::actionPool() const
     275UIActionPool *UIMachineLogic::actionPool() const
    274276{
    275277    return uisession()->actionPool();
     
    755757}
    756758
    757 UIMachineLogic::UIMachineLogic(QObject *pParent, UISession *pSession, UIVisualStateType visualStateType)
    758     : QIWithRetranslateUI3<QObject>(pParent)
     759UIMachineLogic::UIMachineLogic(UIMachine *pMachine, UISession *pSession)
     760    : QIWithRetranslateUI3<QObject>(pMachine)
     761    , m_pMachine(pMachine)
    759762    , m_pSession(pSession)
    760     , m_visualStateType(visualStateType)
    761763    , m_pKeyboardHandler(0)
    762764    , m_pMouseHandler(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r98103 r98375  
    4747class UIActionPool;
    4848class UIKeyboardHandler;
    49 class UIMouseHandler;
     49class UIMachine;
    5050class UIMachineWindow;
    5151class UIMachineView;
     52class UIMouseHandler;
    5253class UIDockIconPreview;
    5354class UISoftKeyboard;
     
    8889public:
    8990
    90     /* Factory functions to create/destroy required logic sub-child: */
    91     static UIMachineLogic* create(QObject *pParent, UISession *pSession, UIVisualStateType visualStateType);
    92     static void destroy(UIMachineLogic *pWhichLogic);
     91    /** Factory function to create a logic of required type.
     92      * @param  pMachine            Brings the machine this logic belongs to.
     93      * @param  pSession            Brings the session this logic is created for.
     94      * @param  enmVisualStateType  Brings the visual state type of logic to be created. */
     95    static UIMachineLogic *create(UIMachine *pMachine, UISession *pSession, UIVisualStateType enmVisualStateType);
     96    /** Factory function to destroy passed @a pLogic. */
     97    static void destroy(UIMachineLogic *pLogic);
     98
     99    /** Returns visual state type. */
     100    virtual UIVisualStateType visualStateType() const = 0;
    93101
    94102    /* Check if this logic is available: */
     
    104112    void initializePostPowerUp();
    105113
    106     /* Main getters/setters: */
    107     UISession* uisession() const { return m_pSession; }
    108     UIActionPool* actionPool() const;
     114    /** Returns machine UI reference.  */
     115    UIMachine *uimachine() const { return m_pMachine; }
     116    /** Returns session UI reference.  */
     117    UISession *uisession() const { return m_pSession; }
     118
     119    /** Returns action-pool reference.  */
     120    UIActionPool *actionPool() const;
    109121
    110122    /** Returns the session reference. */
     
    127139    /** Returns the machine name. */
    128140    const QString& machineName() const;
    129 
    130     UIVisualStateType visualStateType() const { return m_visualStateType; }
    131141    const QList<UIMachineWindow*>& machineWindows() const { return m_machineWindowsList; }
    132142    UIKeyboardHandler* keyboardHandler() const { return m_pKeyboardHandler; }
     
    200210protected:
    201211
    202     /* Constructor: */
    203     UIMachineLogic(QObject *pParent, UISession *pSession, UIVisualStateType visualStateType);
    204     /* Destructor: */
    205     ~UIMachineLogic();
     212    /** Constructs a logic passing @a pMachine and @a pSession to the base class.
     213      * @param  pMachine  Brings the machine this logic belongs to.
     214      * @param  pSession  Brings the session this logic is created for. */
     215    UIMachineLogic(UIMachine *pMachine, UISession *pSession);
     216    /* Destructs the logic. */
     217    virtual ~UIMachineLogic() RT_OVERRIDE;
    206218
    207219    /* Protected getters/setters: */
     
    405417
    406418    /* Private variables: */
     419    UIMachine *m_pMachine;
    407420    UISession *m_pSession;
    408     UIVisualStateType m_visualStateType;
    409421    UIKeyboardHandler *m_pKeyboardHandler;
    410422    UIMouseHandler *m_pMouseHandler;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r98103 r98375  
    5353
    5454
    55 UIMachineLogicFullscreen::UIMachineLogicFullscreen(QObject *pParent, UISession *pSession)
    56     : UIMachineLogic(pParent, pSession, UIVisualStateType_Fullscreen)
     55UIMachineLogicFullscreen::UIMachineLogicFullscreen(UIMachine *pMachine, UISession *pSession)
     56    : UIMachineLogic(pMachine, pSession)
    5757    , m_pPopupMenu(0)
    5858#ifdef VBOX_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r98103 r98375  
    5959public:
    6060
    61     /** Constructs full-screen logic passing @a pParent to the base-class.
    62       * @param  pSession  Brings the session UI reference. */
    63     UIMachineLogicFullscreen(QObject *pParent, UISession *pSession);
    64     /** Destructs full-screen logic. */
     61    /** Constructs a logic passing @a pMachine and @a pSession to the base-class.
     62      * @param  pMachine  Brings the machine this logic belongs to.
     63      * @param  pSession  Brings the session this logic is created for. */
     64    UIMachineLogicFullscreen(UIMachine *pMachine, UISession *pSession);
     65    /** Destructs the logic. */
    6566    virtual ~UIMachineLogicFullscreen() RT_OVERRIDE;
     67
     68    /** Returns visual state type. */
     69    virtual UIVisualStateType visualStateType() const { return UIVisualStateType_Fullscreen; }
    6670
    6771    /** Returns an index of host-screen for guest-screen with @a iScreenId specified. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r98103 r98375  
    5555
    5656
    57 UIMachineLogicNormal::UIMachineLogicNormal(QObject *pParent, UISession *pSession)
    58     : UIMachineLogic(pParent, pSession, UIVisualStateType_Normal)
     57UIMachineLogicNormal::UIMachineLogicNormal(UIMachine *pMachine, UISession *pSession)
     58    : UIMachineLogic(pMachine, pSession)
    5959#ifndef VBOX_WS_MAC
    6060    , m_pPopupMenu(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.h

    r98103 r98375  
    4242public:
    4343
    44     /** Constructs normal logic passing @a pParent to the base-class.
    45       * @param  pSession  Brings the session UI reference. */
    46     UIMachineLogicNormal(QObject *pParent, UISession *pSession);
     44    /** Constructs a logic passing @a pMachine and @a pSession to the base-class.
     45      * @param  pMachine  Brings the machine this logic belongs to.
     46      * @param  pSession  Brings the session this logic is created for. */
     47    UIMachineLogicNormal(UIMachine *pMachine, UISession *pSession);
     48
     49    /** Returns visual state type. */
     50    virtual UIVisualStateType visualStateType() const { return UIVisualStateType_Normal; }
    4751
    4852protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r98103 r98375  
    308308                this, &UIMachineWindowNormal::sltHandleStatusBarContextMenuRequest);
    309309        /* Create indicator-pool: */
    310         m_pIndicatorsPool = new UIIndicatorsPool(machineLogic()->uisession());
     310        m_pIndicatorsPool = new UIIndicatorsPool(machineLogic()->uimachine(), machineLogic()->uisession());
    311311        AssertPtrReturnVoid(m_pIndicatorsPool);
    312312        {
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp

    r98103 r98375  
    5050
    5151
    52 UIMachineLogicScale::UIMachineLogicScale(QObject *pParent, UISession *pSession)
    53     : UIMachineLogic(pParent, pSession, UIVisualStateType_Scale)
     52UIMachineLogicScale::UIMachineLogicScale(UIMachine *pMachine, UISession *pSession)
     53    : UIMachineLogic(pMachine, pSession)
    5454#ifndef VBOX_WS_MAC
    5555    , m_pPopupMenu(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h

    r98103 r98375  
    4242public:
    4343
    44     /** Constructs scaled logic passing @a pParent to the base-class.
    45       * @param  pSession  Brings the session UI reference. */
    46     UIMachineLogicScale(QObject *pParent, UISession *pSession);
     44    /** Constructs a logic passing @a pMachine and @a pSession to the base-class.
     45      * @param  pMachine  Brings the machine this logic belongs to.
     46      * @param  pSession  Brings the session this logic is created for. */
     47    UIMachineLogicScale(UIMachine *pMachine, UISession *pSession);
     48
     49    /** Returns visual state type. */
     50    virtual UIVisualStateType visualStateType() const { return UIVisualStateType_Scale; }
    4751
    4852protected:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r98103 r98375  
    5050
    5151
    52 UIMachineLogicSeamless::UIMachineLogicSeamless(QObject *pParent, UISession *pSession)
    53     : UIMachineLogic(pParent, pSession, UIVisualStateType_Seamless)
     52UIMachineLogicSeamless::UIMachineLogicSeamless(UIMachine *pMachine, UISession *pSession)
     53    : UIMachineLogic(pMachine, pSession)
    5454#ifndef VBOX_WS_MAC
    5555    , m_pPopupMenu(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h

    r98103 r98375  
    4545public:
    4646
    47     /** Constructs seamless logic passing @a pParent to the base-class.
    48       * @param  pSession  Brings the session UI reference. */
    49     UIMachineLogicSeamless(QObject *pParent, UISession *pSession);
    50     /** Destructs seamless logic. */
     47    /** Constructs a logic passing @a pMachine and @a pSession to the base-class.
     48      * @param  pMachine  Brings the machine this logic belongs to.
     49      * @param  pSession  Brings the session this logic is created for. */
     50    UIMachineLogicSeamless(UIMachine *pMachine, UISession *pSession);
     51    /** Destructs the logic. */
    5152    virtual ~UIMachineLogicSeamless() RT_OVERRIDE;
     53
     54    /** Returns visual state type. */
     55    virtual UIVisualStateType visualStateType() const { return UIVisualStateType_Seamless; }
    5256
    5357    /** Returns an index of host-screen for guest-screen with @a iScreenId specified. */
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