Changeset 27081 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 5, 2010 12:49:55 PM (15 years ago)
- 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 539 539 connect(&vboxGlobal(), SIGNAL(dockIconUpdateChanged(const VBoxChangeDockIconUpdateEvent &)), 540 540 this, SLOT(sltChangeDockIconUpdate(const VBoxChangeDockIconUpdateEvent &))); 541 /* Presentation Mode connection */542 connect(&vboxGlobal(), SIGNAL(presentationModeChanged(const VBoxChangePresentationModeEvent &)),543 this, SLOT(sltChangePresentationMode(const VBoxChangePresentationModeEvent &)));544 541 545 542 /* Overlay logo for the dock icon */ … … 1141 1138 updateDockOverlay(); 1142 1139 } 1143 1144 # ifdef QT_MAC_USE_COCOA1145 void UIMachineView::sltChangePresentationMode(const VBoxChangePresentationModeEvent &event)1146 {1147 // TODO_NEW_CORE1148 // this is full screen related1149 #if 01150 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 else1161 SetSystemUIMode(kUIModeAllSuppressed, 0);1162 }1163 }1164 else1165 SetSystemUIMode(kUIModeNormal, 0);1166 #endif1167 }1168 # endif /* QT_MAC_USE_COCOA */1169 1140 #endif 1170 1141 … … 2661 2632 } 2662 2633 2663 void UIMachineView::setMouseCoalescingEnabled (bool aOn)2634 void UIMachineView::setMouseCoalescingEnabled(bool fOn) 2664 2635 { 2665 2636 /* Enable mouse event compression if we leave the VM view. This … … 2670 2641 the keyboard/mouse is grabbed (this is when we have a valid 2671 2642 event handler). */ 2672 if ( aOn || m_fKeyboardGrabbed)2673 ::darwinSetMouseCoalescingEnabled (aOn);2643 if (fOn || m_fKeyboardGrabbed) 2644 ::darwinSetMouseCoalescingEnabled(fOn); 2674 2645 } 2675 2646 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r27021 r27081 43 43 #ifdef Q_WS_MAC 44 44 class VBoxChangeDockIconUpdateEvent; 45 class VBoxChangePresentationModeEvent;46 45 class VBoxDockIconPreview; 47 46 #endif /* Q_WS_MAC */ … … 80 79 void updateDockIcon(); 81 80 void updateDockOverlay(); 82 void setMouseCoalescingEnabled(bool aOn);81 void setMouseCoalescingEnabled(bool fOn); 83 82 void setDockIconEnabled(bool aOn) { mDockIconEnabled = aOn; }; 84 83 #endif … … 171 170 /* Dock icon update handler */ 172 171 void sltChangeDockIconUpdate(const VBoxChangeDockIconUpdateEvent &event); 173 # ifdef QT_MAC_USE_COCOA174 /* Presentation mode handler */175 void sltChangePresentationMode(const VBoxChangePresentationModeEvent &event);176 # endif177 172 #endif 178 173 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r27028 r27081 151 151 } 152 152 153 #ifdef Q_WS_MAC 154 void 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 153 165 void UIMachineLogicFullscreen::prepareActionGroups() 154 166 { … … 303 315 304 316 #ifdef Q_WS_MAC 305 # ifdef QT_MAC_USE_COCOA 317 void UIMachineLogicFullscreen::sltChangePresentationMode(const VBoxChangePresentationModeEvent & /* event */) 318 { 319 setPresentationModeEnabled(true); 320 } 321 306 322 void UIMachineLogicFullscreen::setPresentationModeEnabled(bool fEnabled) 307 323 { … … 327 343 SetSystemUIMode(kUIModeNormal, 0); 328 344 } 329 # endif /* QT_MAC_USE_COCOA */330 345 #endif /* Q_WS_MAC */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.h
r27028 r27081 29 29 /* Local forwards */ 30 30 class UIActionsPool; 31 class VBoxChangePresentationModeEvent; 31 32 32 33 class UIMachineLogicFullscreen : public UIMachineLogic … … 45 46 void initialize(); 46 47 48 private slots: 49 50 #ifdef Q_WS_MAC 51 void sltChangePresentationMode(const VBoxChangePresentationModeEvent &event); 52 #endif /* Q_WS_MAC */ 53 47 54 private: 48 55 49 56 /* Prepare helpers: */ 57 #ifdef Q_WS_MAC 58 void prepareConsoleConnections(); 59 #endif /* Q_WS_MAC */ 50 60 void prepareActionGroups(); 51 61 void prepareMachineWindows(); … … 56 66 57 67 #ifdef Q_WS_MAC 58 # ifdef QT_MAC_USE_COCOA59 68 void setPresentationModeEnabled(bool fEnabled); 60 # endif /* QT_MAC_USE_COCOA */61 69 #endif /* Q_WS_MAC */ 62 70
Note:
See TracChangeset
for help on using the changeset viewer.