VirtualBox

Changeset 26952 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 2, 2010 3:44:43 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New running VM core: just a cosmetics.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r26950 r26952  
    5959    virtual void change() = 0;
    6060    virtual void finishChange() {}
     61
    6162signals:
    6263
     
    8081    /* Normal visual state holder constructor: */
    8182    UIVisualStateNormal(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
    82         : UIVisualState(pParent, pSession, pActionsPool)
    83     {}
     83        : UIVisualState(pParent, pSession, pActionsPool) {}
    8484
    8585    UIVisualStateType visualStateType() const { return UIVisualStateType_Normal; }
     
    9393                this, SLOT(sltGoToSeamlessMode()));
    9494
    95         /* Initialize the logic object */
     95        /* Initialize the logic object: */
    9696        m_pMachineLogic->initialize();
    9797    }
     
    120120    /* Fullscreen visual state holder constructor: */
    121121    UIVisualStateFullscreen(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
    122         : UIVisualState(pParent, pSession, pActionsPool)
    123     {}
     122        : UIVisualState(pParent, pSession, pActionsPool) {}
    124123
    125124    UIVisualStateType visualStateType() const { return UIVisualStateType_Fullscreen; }
     
    133132                this, SLOT(sltGoToSeamlessMode()));
    134133
    135         /* Initialize the logic object */
     134        /* Initialize the logic object: */
    136135        m_pMachineLogic->initialize();
    137136    }
     
    160159    /* Seamless visual state holder constructor: */
    161160    UIVisualStateSeamless(QObject *pParent, UISession *pSession, UIActionsPool *pActionsPool)
    162         : UIVisualState(pParent, pSession, pActionsPool)
    163     {}
     161        : UIVisualState(pParent, pSession, pActionsPool) {}
    164162
    165163    UIVisualStateType visualStateType() const { return UIVisualStateType_Seamless; }
     
    167165    void change()
    168166    {
    169         /* Connect action handlers */
     167        /* Connect action handlers: */
    170168        connect(m_pActionsPool->action(UIActionIndex_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    171169                this, SLOT(sltGoToFullscreenMode()));
     
    173171                this, SLOT(sltGoToNormalMode()));
    174172
    175         /* Initialize the logic object */
     173        /* Initialize the logic object: */
    176174        m_pMachineLogic->initialize();
    177175    }
     
    240238}
    241239
    242 void UIMachine::closeVirtualMachine()
    243 {
    244     delete this;
    245 }
    246 
    247240UIMachineLogic* UIMachine::machineLogic() const
    248241{
     
    255248void UIMachine::sltChangeVisualState(UIVisualStateType visualStateType)
    256249{
     250    /* Create new state: */
    257251    UIVisualState *pNewVisualState = 0;
    258     /* Create new state: */
    259252    switch (visualStateType)
    260253    {
     
    281274    }
    282275
    283     /* First we have to check if the selected mode is available at all. Only
    284      * then we delete the old mode and switch to the new mode. */
     276    /* First we have to check if the selected mode is available at all.
     277     * Only then we delete the old mode and switch to the new mode. */
    285278    if (pNewVisualState->prepareChange())
    286279    {
     
    288281        delete m_pVisualState;
    289282
    290         /* Set the new mode as current mode. */
     283        /* Set the new mode as current mode: */
    291284        m_pVisualState = pNewVisualState;
    292285        m_pVisualState->change();
    293         /* Finish any setup. */
     286
     287        /* Finish any setup: */
    294288        m_pVisualState->finishChange();
    295289    }
    296290    else
    297         /* Discard the temporary create new state */
     291        /* Discard the temporary create new state: */
    298292        delete pNewVisualState;
    299293}
    300294
     295void UIMachine::closeVirtualMachine()
     296{
     297    delete this;
     298}
     299
    301300void UIMachine::enterBaseVisualState()
    302301{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.h

    r26890 r26952  
    5353    QWidget* mainWindow() const;
    5454
    55     /* Close VM handler: */
    56     void closeVirtualMachine();
    57 
    5855private slots:
    5956
     
    6259
    6360private:
     61
     62    /* Close VM handler: */
     63    void closeVirtualMachine();
    6464
    6565    /* Move VM to default (normal) state: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r26919 r26952  
    3131#include "COMDefs.h"
    3232
     33/* Global forwards */
     34class QMenuBar;
     35
    3336/* Local forwards */
    3437class UIMachine;
     
    3639class UIConsoleCallback;
    3740class UIMachineMenuBar;
    38 
    39 class QMenuBar;
    4041
    4142/* CConsole callback event types: */
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