VirtualBox

Changeset 26644 in vbox for trunk


Ignore:
Timestamp:
Feb 19, 2010 11:35:45 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: Entry point for new running VM core (vboxglobal).

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

Legend:

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

    r26603 r26644  
    3333#include "QIDialogButtonBox.h"
    3434
     35#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     36#include "UIMachine.h"
     37#endif
    3538#ifdef VBOX_WITH_REGISTRATION
    3639#include "UIRegistrationWzd.h"
     
    592595    : mValid (false)
    593596    , mSelectorWnd (NULL), mConsoleWnd (NULL)
     597#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     598    , m_pVirtualMachine(0)
     599#endif
    594600    , mMainWindow (NULL)
    595601#ifdef VBOX_WITH_REGISTRATION
     
    777783    return *mConsoleWnd;
    778784}
     785
     786#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     787UIMachine& VBoxGlobal::virtualMachine(const CSession &session /* = CSession() */)
     788{
     789    if (!m_pVirtualMachine)
     790    {
     791        UIMachine *pVirtualMachine = new UIMachine(&m_pVirtualMachine, session);
     792        Assert(pVirtualMachine == m_pVirtualMachine);
     793        NOREF(pVirtualMachine);
     794    }
     795    return *m_pVirtualMachine;
     796}
     797#endif
    779798
    780799bool VBoxGlobal::brandingIsActive (bool aForce /* = false*/)
     
    22482267        return false;
    22492268
     2269#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     2270    virtualMachine(session);
     2271    return true;
     2272#else
    22502273    return consoleWnd().openView (session);
     2274#endif
    22512275}
    22522276
     
    49925016    if (mSelectorWnd)
    49935017        delete mSelectorWnd;
     5018#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     5019    if (m_pVirtualMachine)
     5020        delete m_pVirtualMachine;
     5021#endif
    49945022
    49955023    /* ensure CGuestOSType objects are no longer used */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r26469 r26644  
    4545class QLabel;
    4646class QToolButton;
     47#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     48class UIMachine;
     49#endif
    4750
    4851// VirtualBox callback events
     
    304307    VBoxSelectorWnd &selectorWnd();
    305308    VBoxConsoleWnd &consoleWnd();
     309#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     310    UIMachine &virtualMachine(const CSession &session = CSession());
     311#endif
    306312
    307313    /* main window handle storage */
     
    899905    VBoxSelectorWnd *mSelectorWnd;
    900906    VBoxConsoleWnd *mConsoleWnd;
     907#ifdef VBOX_WITH_NEW_RUNTIME_CORE
     908    UIMachine *m_pVirtualMachine;
     909#endif
    901910    QWidget* mMainWindow;
    902911
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