VirtualBox

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


Ignore:
Timestamp:
Mar 5, 2010 12:49:55 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: new core: presentation mode

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

Legend:

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

    r27071 r27081  
    539539    connect(&vboxGlobal(), SIGNAL(dockIconUpdateChanged(const VBoxChangeDockIconUpdateEvent &)),
    540540            this, SLOT(sltChangeDockIconUpdate(const VBoxChangeDockIconUpdateEvent &)));
    541     /* Presentation Mode connection */
    542     connect(&vboxGlobal(), SIGNAL(presentationModeChanged(const VBoxChangePresentationModeEvent &)),
    543             this, SLOT(sltChangePresentationMode(const VBoxChangePresentationModeEvent &)));
    544541
    545542    /* Overlay logo for the dock icon */
     
    11411138    updateDockOverlay();
    11421139}
    1143 
    1144 # ifdef QT_MAC_USE_COCOA
    1145 void UIMachineView::sltChangePresentationMode(const VBoxChangePresentationModeEvent &event)
    1146 {
    1147     // TODO_NEW_CORE
    1148     // this is full screen related
    1149 #if 0
    1150     if (mIsFullscreen)
    1151     {
    1152         /* First check if we are on the primary screen, only than the presentation mode have to be changed. */
    1153         QDesktopWidget* pDesktop = QApplication::desktop();
    1154         if (pDesktop->screenNumber(this) == pDesktop->primaryScreen())
    1155         {
    1156             QString testStr = vboxGlobal().virtualBox().GetExtraData(VBoxDefs::GUI_PresentationModeEnabled).toLower();
    1157             /* Default to false if it is an empty value */
    1158             if (testStr.isEmpty() || testStr == "false")
    1159                 SetSystemUIMode(kUIModeAllHidden, 0);
    1160             else
    1161                 SetSystemUIMode(kUIModeAllSuppressed, 0);
    1162         }
    1163     }
    1164     else
    1165         SetSystemUIMode(kUIModeNormal, 0);
    1166 #endif
    1167 }
    1168 # endif /* QT_MAC_USE_COCOA */
    11691140#endif
    11701141
     
    26612632}
    26622633
    2663 void UIMachineView::setMouseCoalescingEnabled (bool aOn)
     2634void UIMachineView::setMouseCoalescingEnabled(bool fOn)
    26642635{
    26652636    /* Enable mouse event compression if we leave the VM view. This
     
    26702641       the keyboard/mouse is grabbed (this is when we have a valid
    26712642       event handler). */
    2672     if (aOn || m_fKeyboardGrabbed)
    2673         ::darwinSetMouseCoalescingEnabled (aOn);
     2643    if (fOn || m_fKeyboardGrabbed)
     2644        ::darwinSetMouseCoalescingEnabled(fOn);
    26742645}
    26752646#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h

    r27021 r27081  
    4343#ifdef Q_WS_MAC
    4444class VBoxChangeDockIconUpdateEvent;
    45 class VBoxChangePresentationModeEvent;
    4645class VBoxDockIconPreview;
    4746#endif /* Q_WS_MAC */
     
    8079    void updateDockIcon();
    8180    void updateDockOverlay();
    82     void setMouseCoalescingEnabled(bool aOn);
     81    void setMouseCoalescingEnabled(bool fOn);
    8382    void setDockIconEnabled(bool aOn) { mDockIconEnabled = aOn; };
    8483#endif
     
    171170    /* Dock icon update handler */
    172171    void sltChangeDockIconUpdate(const VBoxChangeDockIconUpdateEvent &event);
    173 # ifdef QT_MAC_USE_COCOA
    174     /* Presentation mode handler */
    175     void sltChangePresentationMode(const VBoxChangePresentationModeEvent &event);
    176 # endif
    177172#endif
    178173
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r27028 r27081  
    151151}
    152152
     153#ifdef Q_WS_MAC
     154void UIMachineLogicFullscreen::prepareConsoleConnections()
     155{
     156    /* Base class connections: */
     157    UIMachineLogic::prepareConsoleConnections();
     158
     159    /* Presentation mode connection */
     160    connect (&vboxGlobal(), SIGNAL(presentationModeChanged(const VBoxChangePresentationModeEvent &)),
     161             this, SLOT(sltChangePresentationMode(const VBoxChangePresentationModeEvent &)));
     162}
     163#endif /* Q_WS_MAC */
     164
    153165void UIMachineLogicFullscreen::prepareActionGroups()
    154166{
     
    303315
    304316#ifdef Q_WS_MAC
    305 # ifdef QT_MAC_USE_COCOA
     317void UIMachineLogicFullscreen::sltChangePresentationMode(const VBoxChangePresentationModeEvent & /* event */)
     318{
     319    setPresentationModeEnabled(true);
     320}
     321
    306322void UIMachineLogicFullscreen::setPresentationModeEnabled(bool fEnabled)
    307323{
     
    327343        SetSystemUIMode(kUIModeNormal, 0);
    328344}
    329 # endif /* QT_MAC_USE_COCOA */
    330345#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h

    r27028 r27081  
    2929/* Local forwards */
    3030class UIActionsPool;
     31class VBoxChangePresentationModeEvent;
    3132
    3233class UIMachineLogicFullscreen : public UIMachineLogic
     
    4546    void initialize();
    4647
     48private slots:
     49
     50#ifdef Q_WS_MAC
     51    void sltChangePresentationMode(const VBoxChangePresentationModeEvent &event);
     52#endif /* Q_WS_MAC */
     53
    4754private:
    4855
    4956    /* Prepare helpers: */
     57#ifdef Q_WS_MAC
     58    void prepareConsoleConnections();
     59#endif /* Q_WS_MAC */
    5060    void prepareActionGroups();
    5161    void prepareMachineWindows();
     
    5666
    5767#ifdef Q_WS_MAC
    58 # ifdef QT_MAC_USE_COCOA
    5968    void setPresentationModeEnabled(bool fEnabled);
    60 # endif /* QT_MAC_USE_COCOA */
    6169#endif /* Q_WS_MAC */
    6270
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