VirtualBox

Changeset 50490 in vbox


Ignore:
Timestamp:
Feb 18, 2014 9:38:41 AM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
92331
Message:

FE/Qt: Runtime UI: Moving visual-state switch slots from UISession to UIMachineLogic allowing to reimplement it.

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

Legend:

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

    r50354 r50490  
    397397        popupCenter().showPopupStack(activeMachineWindow());
    398398    }
     399}
     400
     401void UIMachineLogic::sltChangeVisualStateToNormal()
     402{
     403    uisession()->setRequestedVisualState(UIVisualStateType_Invalid);
     404    uisession()->changeVisualState(UIVisualStateType_Normal);
     405}
     406
     407void UIMachineLogic::sltChangeVisualStateToFullscreen()
     408{
     409    uisession()->setRequestedVisualState(UIVisualStateType_Invalid);
     410    uisession()->changeVisualState(UIVisualStateType_Fullscreen);
     411}
     412
     413void UIMachineLogic::sltChangeVisualStateToSeamless()
     414{
     415    uisession()->setRequestedVisualState(UIVisualStateType_Invalid);
     416    uisession()->changeVisualState(UIVisualStateType_Seamless);
     417}
     418
     419void UIMachineLogic::sltChangeVisualStateToScale()
     420{
     421    uisession()->setRequestedVisualState(UIVisualStateType_Invalid);
     422    uisession()->changeVisualState(UIVisualStateType_Scale);
    399423}
    400424
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r50309 r50490  
    105105    /** Checks if some visual-state type was requested. */
    106106    virtual void sltCheckForRequestedVisualStateType() {}
     107
     108    /** Requests visual-state change to 'normal' (window). */
     109    virtual void sltChangeVisualStateToNormal();
     110    /** Requests visual-state change to 'fullscreen'. */
     111    virtual void sltChangeVisualStateToFullscreen();
     112    /** Requests visual-state change to 'seamless'. */
     113    virtual void sltChangeVisualStateToSeamless();
     114    /** Requests visual-state change to 'scale'. */
     115    virtual void sltChangeVisualStateToScale();
    107116
    108117    /* Console callback handlers: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r50309 r50490  
    665665}
    666666
    667 void UISession::sltChangeVisualStateToNormal()
    668 {
    669     /* Reset requests: */
    670     setRequestedVisualState(UIVisualStateType_Invalid);
    671     /* Request change: */
    672     m_pMachine->asyncChangeVisualState(UIVisualStateType_Normal);
    673 }
    674 
    675 void UISession::sltChangeVisualStateToFullscreen()
    676 {
    677     /* Reset requests: */
    678     setRequestedVisualState(UIVisualStateType_Invalid);
    679     /* Request change: */
    680     m_pMachine->asyncChangeVisualState(UIVisualStateType_Fullscreen);
    681 }
    682 
    683 void UISession::sltChangeVisualStateToSeamless()
    684 {
    685     /* Reset requests: */
    686     setRequestedVisualState(UIVisualStateType_Invalid);
    687     /* Request change: */
    688     m_pMachine->asyncChangeVisualState(UIVisualStateType_Seamless);
    689 }
    690 
    691 void UISession::sltChangeVisualStateToScale()
    692 {
    693     /* Reset requests: */
    694     setRequestedVisualState(UIVisualStateType_Invalid);
    695     /* Request change: */
    696     m_pMachine->asyncChangeVisualState(UIVisualStateType_Scale);
    697 }
    698 
    699667void UISession::sltCloseRuntimeUI()
    700668{
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r50042 r50490  
    256256private slots:
    257257
    258     /** Requests visual-state change to 'normal' (window). */
    259     void sltChangeVisualStateToNormal();
    260     /** Requests visual-state change to 'fullscreen'. */
    261     void sltChangeVisualStateToFullscreen();
    262     /** Requests visual-state change to 'seamless'. */
    263     void sltChangeVisualStateToSeamless();
    264     /** Requests visual-state change to 'scale'. */
    265     void sltChangeVisualStateToScale();
    266 
    267258    /* Handler: Close Runtime UI stuff: */
    268259    void sltCloseRuntimeUI();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r49698 r50490  
    181181    /* "View" actions connections: */
    182182    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    183             uisession(), SLOT(sltChangeVisualStateToNormal()));
     183            this, SLOT(sltChangeVisualStateToNormal()));
    184184    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    185             uisession(), SLOT(sltChangeVisualStateToSeamless()));
     185            this, SLOT(sltChangeVisualStateToSeamless()));
    186186    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    187             uisession(), SLOT(sltChangeVisualStateToScale()));
     187            this, SLOT(sltChangeVisualStateToScale()));
    188188}
    189189
     
    266266    /* "View" actions disconnections: */
    267267    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    268                uisession(), SLOT(sltChangeVisualStateToNormal()));
     268               this, SLOT(sltChangeVisualStateToNormal()));
    269269    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    270                uisession(), SLOT(sltChangeVisualStateToSeamless()));
     270               this, SLOT(sltChangeVisualStateToSeamless()));
    271271    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    272                uisession(), SLOT(sltChangeVisualStateToScale()));
     272               this, SLOT(sltChangeVisualStateToScale()));
    273273
    274274    /* Call to base-class: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineLogicNormal.cpp

    r50309 r50490  
    107107    /* "View" actions connections: */
    108108    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    109             uisession(), SLOT(sltChangeVisualStateToFullscreen()));
     109            this, SLOT(sltChangeVisualStateToFullscreen()));
    110110    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    111             uisession(), SLOT(sltChangeVisualStateToSeamless()));
     111            this, SLOT(sltChangeVisualStateToSeamless()));
    112112    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    113             uisession(), SLOT(sltChangeVisualStateToScale()));
     113            this, SLOT(sltChangeVisualStateToScale()));
    114114
    115115    /* "Device" actions connections: */
     
    167167    /* "View" actions disconnections: */
    168168    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    169                uisession(), SLOT(sltChangeVisualStateToFullscreen()));
     169               this, SLOT(sltChangeVisualStateToFullscreen()));
    170170    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    171                uisession(), SLOT(sltChangeVisualStateToSeamless()));
     171               this, SLOT(sltChangeVisualStateToSeamless()));
    172172    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    173                uisession(), SLOT(sltChangeVisualStateToScale()));
     173               this, SLOT(sltChangeVisualStateToScale()));
    174174
    175175    /* Call to base-class: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp

    r49596 r50490  
    7676    /* "View" actions connections: */
    7777    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    78             uisession(), SLOT(sltChangeVisualStateToNormal()));
     78            this, SLOT(sltChangeVisualStateToNormal()));
    7979    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    80             uisession(), SLOT(sltChangeVisualStateToFullscreen()));
     80            this, SLOT(sltChangeVisualStateToFullscreen()));
    8181    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    82             uisession(), SLOT(sltChangeVisualStateToSeamless()));
     82            this, SLOT(sltChangeVisualStateToSeamless()));
    8383}
    8484
     
    126126    /* "View" actions disconnections: */
    127127    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    128                uisession(), SLOT(sltChangeVisualStateToNormal()));
     128               this, SLOT(sltChangeVisualStateToNormal()));
    129129    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    130                uisession(), SLOT(sltChangeVisualStateToFullscreen()));
     130               this, SLOT(sltChangeVisualStateToFullscreen()));
    131131    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    132                uisession(), SLOT(sltChangeVisualStateToSeamless()));
     132               this, SLOT(sltChangeVisualStateToSeamless()));
    133133
    134134    /* Call to base-class: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.cpp

    r49698 r50490  
    200200    /* "View" actions connections: */
    201201    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    202             uisession(), SLOT(sltChangeVisualStateToNormal()));
     202            this, SLOT(sltChangeVisualStateToNormal()));
    203203    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    204             uisession(), SLOT(sltChangeVisualStateToFullscreen()));
     204            this, SLOT(sltChangeVisualStateToFullscreen()));
    205205    connect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    206             uisession(), SLOT(sltChangeVisualStateToScale()));
     206            this, SLOT(sltChangeVisualStateToScale()));
    207207}
    208208
     
    263263    /* "View" actions disconnections: */
    264264    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Seamless), SIGNAL(triggered(bool)),
    265                uisession(), SLOT(sltChangeVisualStateToNormal()));
     265               this, SLOT(sltChangeVisualStateToNormal()));
    266266    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Fullscreen), SIGNAL(triggered(bool)),
    267                uisession(), SLOT(sltChangeVisualStateToFullscreen()));
     267               this, SLOT(sltChangeVisualStateToFullscreen()));
    268268    disconnect(gActionPool->action(UIActionIndexRuntime_Toggle_Scale), SIGNAL(triggered(bool)),
    269                uisession(), SLOT(sltChangeVisualStateToScale()));
     269               this, SLOT(sltChangeVisualStateToScale()));
    270270
    271271    /* Call to base-class: */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette