VirtualBox

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


Ignore:
Timestamp:
Jul 31, 2013 2:39:13 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: Popup-center: Handle new type of 3D related event in IFramebuffer::Notify3DEvent callback.

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

Legend:

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

    r47455 r47493  
    303303}
    304304
    305 void UIPopupCenter::raisePopupStack(QWidget *pParent)
     305void UIPopupCenter::reinstallPopupStack(QWidget *pParent, bool fAsTopLevel)
    306306{
    307307    /* Make sure passed parent is valid: */
    308308    if (!pParent)
    309     {
    310         AssertMsgFailed(("Passed parent is NULL"));
    311         return;
    312     }
     309        return;
    313310
    314311    /* Do we have a stack for passed parent? */
     
    317314        return;
    318315
     316    /* Make sure we should really reinstall stack: */
     317    if ((fAsTopLevel && m_type == UIPopupIntegrationType_Toplevel) ||
     318        (!fAsTopLevel && m_type == UIPopupIntegrationType_Embedded))
     319        return;
     320
     321    LogRelFlow(("UIPopupCenter::reinstallPopupStack: Reinstalling popup-stack as %s.\n",
     322                fAsTopLevel ? "top level window" : "embedded widget"));
     323
    319324    /* Remove stack: */
    320325    hidePopupStack(pParent);
    321326
    322327    /* Make sure integration type is correct: */
    323     setStackIntegrationType(UIPopupIntegrationType_Toplevel);
     328    setStackIntegrationType(fAsTopLevel ? UIPopupIntegrationType_Toplevel : UIPopupIntegrationType_Embedded);
    324329
    325330    /* Return stack again: */
     
    389394}
    390395
    391 void UIPopupCenter::sltRaisePopupStack()
    392 {
    393     raisePopupStack(vboxGlobal().activeMachineWindow());
     396void UIPopupCenter::sltReinstallPopupStack(bool fAsTopLevel)
     397{
     398    reinstallPopupStack(vboxGlobal().activeMachineWindow(), fAsTopLevel);
    394399}
    395400
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h

    r47210 r47493  
    116116    void sltShowPopupStack();
    117117    void sltHidePopupStack();
    118     void sltRaisePopupStack();
     118    void sltReinstallPopupStack(bool fAsTopLevel);
    119119    void sltRemovePopupStack();
    120120
     
    140140    void showPopupStack(QWidget *pParent);
    141141    void hidePopupStack(QWidget *pParent);
    142     void raisePopupStack(QWidget *pParent);
     142    void reinstallPopupStack(QWidget *pParent, bool fAsTopLevel);
    143143    void assignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent);
    144144    void unassignPopupStackParent(UIPopupStack *pPopupStack, QWidget *pParent);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp

    r47485 r47493  
    348348        case VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA:
    349349        {
     350            /* Notify GUI about 3D overlay visibility change: */
    350351            BOOL fVisible = !!pData;
    351 
    352             /* @todo: implement 3D visibility handling */
    353 //            /* Notify GUI about 3D event: */
    354 //            emit sigNotify3DEvent();
    355 
     352            LogRelFlow(("UIFrameBuffer::Notify3DEvent: "
     353                        "VBOX3D_NOTIFY_EVENT_TYPE_VISIBLE_3DDATA=%s\n",
     354                        fVisible ? "TRUE" : "FALSE"));
     355            emit sigNotifyAbout3DOverlayVisibilityChange(fVisible);
    356356            return S_OK;
    357357        }
     
    427427            m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)),
    428428            Qt::QueuedConnection);
    429     connect(this, SIGNAL(sigNotify3DEvent()),
    430             m_pMachineView, SLOT(sltNotify3DEvent()),
     429    connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
     430            m_pMachineView, SLOT(sltHandle3DOverlayVisibilityChange(bool)),
    431431            Qt::QueuedConnection);
    432432}
     
    440440    disconnect(this, SIGNAL(sigSetVisibleRegion(QRegion)),
    441441               m_pMachineView, SLOT(sltHandleSetVisibleRegion(QRegion)));
    442     disconnect(this, SIGNAL(sigNotify3DEvent()),
    443                m_pMachineView, SLOT(sltNotify3DEvent()));
    444 }
    445 
     442    disconnect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
     443               m_pMachineView, SLOT(sltHandle3DOverlayVisibilityChange(bool)));
     444}
     445
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h

    r47485 r47493  
    9999    void sigNotifyUpdate(int iX, int iY, int iWidth, int iHeight);
    100100    void sigSetVisibleRegion(QRegion region);
    101     void sigNotify3DEvent();
     101    void sigNotifyAbout3DOverlayVisibilityChange(bool fVisible);
    102102
    103103public:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r47478 r47493  
    351351}
    352352
    353 void UIMachineLogic::notifyAbout3DEvent()
    354 {
    355     /* Notify listener about 3D event: */
    356     emit sigNotify3DEvent();
     353void UIMachineLogic::notifyAbout3DOverlayVisibilityChange(bool fVisible)
     354{
     355    /* Notify listener about 3D overlay visibility change: */
     356    emit sigNotifyAbout3DOverlayVisibilityChange(fVisible);
    357357}
    358358
     
    549549    connect(this, SIGNAL(sigMachineWindowsDestroyed()),
    550550            &popupCenter(), SLOT(sltHidePopupStack()));
    551     connect(this, SIGNAL(sigNotify3DEvent()),
    552             &popupCenter(), SLOT(sltRaisePopupStack()));
     551    connect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
     552            &popupCenter(), SLOT(sltReinstallPopupStack(bool)));
    553553}
    554554
     
    560560    disconnect(this, SIGNAL(sigMachineWindowsDestroyed()),
    561561               &popupCenter(), SLOT(sltHidePopupStack()));
    562     disconnect(this, SIGNAL(sigNotify3DEvent()),
    563                &popupCenter(), SLOT(sltRaisePopupStack()));
     562    disconnect(this, SIGNAL(sigNotifyAbout3DOverlayVisibilityChange(bool)),
     563               &popupCenter(), SLOT(sltReinstallPopupStack(bool)));
    564564}
    565565
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r47478 r47493  
    5858    void sigMachineWindowsCreated();
    5959    void sigMachineWindowsDestroyed();
    60     void sigNotify3DEvent();
     60    void sigNotifyAbout3DOverlayVisibilityChange(bool fVisible);
    6161
    6262public:
     
    101101    void powerOff(bool fDiscardingState);
    102102
    103     /* API: 3D event stuff: */
    104     void notifyAbout3DEvent();
     103    /* API: 3D overlay visibility stuff: */
     104    void notifyAbout3DOverlayVisibilityChange(bool fVisible);
    105105
    106106protected slots:
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp

    r47396 r47493  
    293293}
    294294
    295 void UIMachineView::sltNotify3DEvent()
    296 {
    297     machineLogic()->notifyAbout3DEvent();
     295void UIMachineView::sltHandle3DOverlayVisibilityChange(bool fVisible)
     296{
     297    machineLogic()->notifyAbout3DOverlayVisibilityChange(fVisible);
    298298}
    299299
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r47103 r47493  
    103103    virtual void sltHandleSetVisibleRegion(QRegion region);
    104104
    105     /* Handler: Frame-buffer Notify3DEvent stuff: */
    106     virtual void sltNotify3DEvent();
     105    /* Handler: Frame-buffer 3D overlay visibility stuff: */
     106    virtual void sltHandle3DOverlayVisibilityChange(bool fVisible);
    107107
    108108    /* Watch dog for desktop resizes: */
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