Changeset 25318 in vbox
- Timestamp:
- Dec 11, 2009 10:28:31 AM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r25116 r25318 736 736 connect (&vboxGlobal(), SIGNAL (dockIconUpdateChanged (const VBoxChangeDockIconUpdateEvent &)), 737 737 this, SLOT (changeDockIconUpdate (const VBoxChangeDockIconUpdateEvent &))); 738 connect (&vboxGlobal(), SIGNAL (presentationModeChanged (const VBoxChangePresentationModeEvent &)), 739 this, SLOT (changePresentationMode (const VBoxChangePresentationModeEvent &))); 738 740 #endif 739 741 … … 2823 2825 } 2824 2826 2827 void VBoxConsoleWnd::changePresentationMode (const VBoxChangePresentationModeEvent &aEvent) 2828 { 2829 Q_UNUSED (aEvent); 2830 #ifdef Q_WS_MAC 2831 if (mIsFullscreen) 2832 { 2833 QString testStr = vboxGlobal().virtualBox().GetExtraData (VBoxDefs::GUI_PresentationModeEnabled).toLower(); 2834 /* Default to false if it is an empty value */ 2835 if (testStr.isEmpty() || testStr == "false") 2836 SetSystemUIMode (kUIModeAllHidden, 0); 2837 else 2838 SetSystemUIMode (kUIModeAllSuppressed, 0); 2839 } 2840 else 2841 SetSystemUIMode (kUIModeNormal, 0); 2842 #endif 2843 } 2844 2825 2845 /** 2826 2846 * Called (on non-UI thread!) when a global GUI setting changes. … … 3501 3521 setWindowState (windowState() ^ Qt::WindowFullScreen); 3502 3522 # ifdef QT_MAC_USE_COCOA 3503 /* Disable the auto show menubar feature of Qt in fullscreen. */ 3504 if (aOn) 3505 SetSystemUIMode (kUIModeAllHidden, 0); 3523 changePresentationMode (VBoxChangePresentationModeEvent(aOn)); 3506 3524 # endif /* QT_MAC_USE_COCOA */ 3507 3525 } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.h
r25171 r25318 59 59 class QIStateIndicator; 60 60 class VBoxChangeDockIconUpdateEvent; 61 class VBoxChangePresentationModeEvent; 61 62 class VBoxConsoleView; 62 63 class VBoxMiniToolBar; … … 178 179 179 180 void changeDockIconUpdate (const VBoxChangeDockIconUpdateEvent &aEvent); 181 void changePresentationMode (const VBoxChangePresentationModeEvent &aEvent); 180 182 void processGlobalSettingChange (const char *aPublicName, const char *aName); 181 183 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
r21711 r25318 63 63 trayIconEnabled = false; 64 64 dockPreviewEnabled = true; 65 presentationModeEnabled = false; 65 66 } 66 67 … … 75 76 trayIconEnabled = that.trayIconEnabled; 76 77 dockPreviewEnabled = that.dockPreviewEnabled; 78 presentationModeEnabled = that.presentationModeEnabled; 77 79 } 78 80 … … 90 92 maxGuestRes == that.maxGuestRes && 91 93 remapScancodes == that.remapScancodes && 92 trayIconEnabled == that.trayIconEnabled 93 && dockPreviewEnabled == that.dockPreviewEnabled 94 trayIconEnabled == that.trayIconEnabled && 95 dockPreviewEnabled == that.dockPreviewEnabled && 96 presentationModeEnabled == that.presentationModeEnabled 94 97 ); 95 98 } … … 113 116 gPropertyMap[] = 114 117 { 115 { "GUI/Input/HostKey", "hostKey", "\\d*[1-9]\\d*", true },116 { "GUI/Input/AutoCapture", "autoCapture", "true|false", true },117 { "GUI/Customizations", "guiFeatures", "\\S+", true },118 { "GUI/LanguageID", "languageId", gVBoxLangIDRegExp, true },119 { "GUI/MaxGuestResolution", "maxGuestRes", "\\d*[1-9]\\d*,\\d*[1-9]\\d*|any|auto", true },120 { "GUI/RemapScancodes", "remapScancodes", "(\\d+=\\d+,)*\\d+=\\d+", true },121 { "GUI/TrayIcon/Enabled", "trayIconEnabled", "true|false", true },118 { "GUI/Input/HostKey", "hostKey", "\\d*[1-9]\\d*", true }, 119 { "GUI/Input/AutoCapture", "autoCapture", "true|false", true }, 120 { "GUI/Customizations", "guiFeatures", "\\S+", true }, 121 { "GUI/LanguageID", "languageId", gVBoxLangIDRegExp, true }, 122 { "GUI/MaxGuestResolution", "maxGuestRes", "\\d*[1-9]\\d*,\\d*[1-9]\\d*|any|auto", true }, 123 { "GUI/RemapScancodes", "remapScancodes", "(\\d+=\\d+,)*\\d+=\\d+", true }, 124 { "GUI/TrayIcon/Enabled", "trayIconEnabled", "true|false", true }, 122 125 #ifdef Q_WS_MAC 123 { VBoxDefs::GUI_RealtimeDockIconUpdateEnabled, "dockPreviewEnabled", "true|false", true } 126 { VBoxDefs::GUI_RealtimeDockIconUpdateEnabled, "dockPreviewEnabled", "true|false", true }, 127 { VBoxDefs::GUI_PresentationModeEnabled, "presentationModeEnabled", "true|false", true } 124 128 #endif /* Q_WS_MAC */ 125 129 }; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h
r25171 r25318 50 50 bool trayIconEnabled; 51 51 bool dockPreviewEnabled; 52 bool presentationModeEnabled; 52 53 53 54 friend class VBoxGlobalSettings; … … 67 68 Q_PROPERTY (bool trayIconEnabled READ trayIconEnabled WRITE setTrayIconEnabled) 68 69 Q_PROPERTY (bool dockPreviewEnabled READ dockPreviewEnabled WRITE setDockPreviewEnabled) 70 Q_PROPERTY (bool presentationModeEnabled READ presentationModeEnabled WRITE setPresentationModeEnabled) 69 71 70 72 public: … … 129 131 } 130 132 133 bool presentationModeEnabled() const { return data()->presentationModeEnabled; } 134 void setPresentationModeEnabled (bool enabled) 135 { 136 mData()->presentationModeEnabled = enabled; 137 } 138 131 139 132 140 // -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.cpp
r25177 r25318 55 55 #ifdef Q_WS_MAC 56 56 const char* VBoxDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled"; 57 const char* VBoxDefs::GUI_PresentationModeEnabled = "GUI/PresentationModeEnabled"; 57 58 #endif /* Q_WS_MAC */ 58 59 const char* VBoxDefs::GUI_PassCAD = "GUI/PassCAD"; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxDefs.h
r25177 r25318 6 6 7 7 /* 8 * Copyright (C) 2006-200 8Sun Microsystems, Inc.8 * Copyright (C) 2006-2009 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 91 91 enum 92 92 { 93 AsyncEventType = QEvent::User + 100,94 ResizeEventType,95 RepaintEventType,96 SetRegionEventType,97 MouseCapabilityEventType,98 MousePointerChangeEventType,99 MachineStateChangeEventType,100 AdditionsStateChangeEventType,101 MediaDriveChangeEventType,102 MachineDataChangeEventType,103 MachineRegisteredEventType,104 SessionStateChangeEventType,105 SnapshotEventType,106 CanShowRegDlgEventType,107 CanShowUpdDlgEventType,108 NetworkAdapterChangeEventType,109 USBCtlStateChangeEventType,110 USBDeviceStateChangeEventType,111 SharedFolderChangeEventType,112 RuntimeErrorEventType,113 ModifierKeyChangeEventType,114 MediaEnumEventType,93 AsyncEventType = QEvent::User + 100 94 , ResizeEventType 95 , RepaintEventType 96 , SetRegionEventType 97 , MouseCapabilityEventType 98 , MousePointerChangeEventType 99 , MachineStateChangeEventType 100 , AdditionsStateChangeEventType 101 , MediaDriveChangeEventType 102 , MachineDataChangeEventType 103 , MachineRegisteredEventType 104 , SessionStateChangeEventType 105 , SnapshotEventType 106 , CanShowRegDlgEventType 107 , CanShowUpdDlgEventType 108 , NetworkAdapterChangeEventType 109 , USBCtlStateChangeEventType 110 , USBDeviceStateChangeEventType 111 , SharedFolderChangeEventType 112 , RuntimeErrorEventType 113 , ModifierKeyChangeEventType 114 , MediaEnumEventType 115 115 #if defined (Q_WS_WIN) 116 ShellExecuteEventType,116 , ShellExecuteEventType 117 117 #endif 118 ActivateMenuEventType,118 , ActivateMenuEventType 119 119 #if defined (Q_WS_MAC) 120 ShowWindowEventType,120 , ShowWindowEventType 121 121 #endif 122 ChangeGUILanguageEventType,122 , ChangeGUILanguageEventType 123 123 #if defined (VBOX_GUI_WITH_SYSTRAY) 124 CanShowTrayIconEventType,125 ShowTrayIconEventType,126 TrayIconChangeEventType,127 MainWindowCountChangeEventType,124 , CanShowTrayIconEventType 125 , ShowTrayIconEventType 126 , TrayIconChangeEventType 127 , MainWindowCountChangeEventType 128 128 #endif 129 AddVDMUrlsEventType, 130 ChangeDockIconUpdateEventType 129 , AddVDMUrlsEventType 130 , ChangeDockIconUpdateEventType 131 , ChangePresentationmodeEventType 131 132 #ifdef VBOX_GUI_USE_QGL 132 , 133 VHWACommandProcessType 133 , VHWACommandProcessType 134 134 #endif 135 135 }; … … 173 173 #ifdef Q_WS_MAC 174 174 static const char* GUI_RealtimeDockIconUpdateEnabled; 175 static const char* GUI_PresentationModeEnabled; 175 176 #endif /* Q_WS_MAC */ 176 177 static const char* GUI_PassCAD; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r25177 r25318 379 379 QApplication::postEvent (&mGlobal, new VBoxChangeDockIconUpdateEvent (f)); 380 380 } 381 else if (sKey == VBoxDefs::GUI_PresentationModeEnabled) 382 { 383 /* Default to true if it is an empty value */ 384 QString testStr = sVal.toLower(); 385 bool f = (testStr.isEmpty() || testStr == "false"); 386 QApplication::postEvent (&mGlobal, new VBoxChangePresentationModeEvent (f)); 387 } 381 388 #endif 382 389 … … 4512 4519 { 4513 4520 emit dockIconUpdateChanged (*(VBoxChangeDockIconUpdateEvent *) e); 4521 return true; 4522 } 4523 case VBoxDefs::ChangePresentationmodeEventType: 4524 { 4525 emit presentationModeChanged (*(VBoxChangePresentationModeEvent *) e); 4514 4526 return true; 4515 4527 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r25177 r25318 199 199 VBoxChangeDockIconUpdateEvent (bool aChanged) 200 200 : QEvent ((QEvent::Type) VBoxDefs::ChangeDockIconUpdateEventType) 201 , mChanged (aChanged) 202 {} 203 204 const bool mChanged; 205 }; 206 207 class VBoxChangePresentationModeEvent : public QEvent 208 { 209 public: 210 VBoxChangePresentationModeEvent (bool aChanged) 211 : QEvent ((QEvent::Type) VBoxDefs::ChangePresentationmodeEventType) 201 212 , mChanged (aChanged) 202 213 {} … … 855 866 #endif 856 867 void dockIconUpdateChanged (const VBoxChangeDockIconUpdateEvent &e); 868 void presentationModeChanged (const VBoxChangePresentationModeEvent &e); 857 869 858 870 void canShowRegDlg (bool aCanShow); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsGeneral.cpp
r25177 r25318 36 36 #ifndef Q_WS_MAC 37 37 mCbCheckDockPreview->hide(); 38 mCbCheckPresentationMode->hide(); 38 39 #endif /* Q_WS_MAC */ 39 if (mCbCheckTrayIcon->isHidden() && mCbCheckDockPreview->isHidden()) 40 if ( mCbCheckTrayIcon->isHidden() 41 && mCbCheckDockPreview->isHidden() 42 && mCbCheckPresentationMode->isHidden()) 40 43 mLnSeparator2->hide(); 41 44 … … 58 61 #ifdef Q_WS_MAC 59 62 mCbCheckDockPreview->setChecked (aGs.dockPreviewEnabled()); 63 mCbCheckPresentationMode->setChecked (aGs.presentationModeEnabled()); 60 64 #endif /* Q_WS_MAC */ 61 65 } … … 73 77 #ifdef Q_WS_MAC 74 78 aGs.setDockPreviewEnabled (mCbCheckDockPreview->isChecked()); 79 aGs.setPresentationModeEnabled (mCbCheckPresentationMode->isChecked()); 75 80 #endif /* Q_WS_MAC */ 76 81 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/VBoxGLSettingsGeneral.ui
r25196 r25318 1 <ui version="4.0" > 1 <?xml version="1.0" encoding="UTF-8"?> 2 <ui version="4.0"> 2 3 <comment> 3 VBox frontends: Qt4 GUI ( "VirtualBox"):4 VBox frontends: Qt4 GUI ("VirtualBox"): 4 5 5 6 Copyright (C) 2008 Sun Microsystems, Inc. … … 9 10 you can redistribute it and/or modify it under the terms of the GNU 10 11 General Public License (GPL) as published by the Free Software 11 Foundation, in version 2 as it comes in the "COPYING"file of the12 Foundation, in version 2 as it comes in the "COPYING" file of the 12 13 VirtualBox OSE distribution. VirtualBox OSE is distributed in the 13 14 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. … … 18 19 </comment> 19 20 <class>VBoxGLSettingsGeneral</class> 20 <widget class="QWidget" name="VBoxGLSettingsGeneral" 21 <property name="geometry" 21 <widget class="QWidget" name="VBoxGLSettingsGeneral"> 22 <property name="geometry"> 22 23 <rect> 23 24 <x>0</x> 24 25 <y>0</y> 25 <width> 390</width>26 <height> 172</height>26 <width>402</width> 27 <height>212</height> 27 28 </rect> 28 29 </property> 29 <layout class="QGridLayout" > 30 <property name="leftMargin" > 31 <number>0</number> 32 </property> 33 <property name="topMargin" > 34 <number>0</number> 35 </property> 36 <property name="rightMargin" > 37 <number>0</number> 38 </property> 39 <property name="bottomMargin" > 30 <layout class="QGridLayout"> 31 <property name="margin"> 40 32 <number>0</number> 41 33 </property> 42 34 <item row="0" column="0" colspan="2"> 43 <widget class="QLabel" name="mLbHardDisk" 44 <property name="text" 35 <widget class="QLabel" name="mLbHardDisk"> 36 <property name="text"> 45 37 <string>Default &Hard Disk Folder:</string> 46 38 </property> 47 <property name="alignment" 39 <property name="alignment"> 48 40 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 49 41 </property> 50 <property name="buddy" 42 <property name="buddy"> 51 43 <cstring>mPsHardDisk</cstring> 52 44 </property> 53 45 </widget> 54 46 </item> 55 <item row="0" column="2" 56 <widget class="VBoxFilePathSelectorWidget" name="mPsHardDisk" 57 <property name="sizePolicy" 58 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">47 <item row="0" column="2"> 48 <widget class="VBoxFilePathSelectorWidget" name="mPsHardDisk"> 49 <property name="sizePolicy"> 50 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 59 51 <horstretch>0</horstretch> 60 52 <verstretch>0</verstretch> … … 64 56 </item> 65 57 <item row="1" column="0" colspan="2"> 66 <widget class="QLabel" name="mLbMach" 67 <property name="text" 58 <widget class="QLabel" name="mLbMach"> 59 <property name="text"> 68 60 <string>Default &Machine Folder:</string> 69 61 </property> 70 <property name="alignment" 62 <property name="alignment"> 71 63 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 72 64 </property> 73 <property name="buddy" 65 <property name="buddy"> 74 66 <cstring>mPsMach</cstring> 75 67 </property> 76 68 </widget> 77 69 </item> 78 <item row="1" column="2" 79 <widget class="VBoxFilePathSelectorWidget" name="mPsMach" 80 <property name="sizePolicy" 81 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">70 <item row="1" column="2"> 71 <widget class="VBoxFilePathSelectorWidget" name="mPsMach"> 72 <property name="sizePolicy"> 73 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 82 74 <horstretch>0</horstretch> 83 75 <verstretch>0</verstretch> … … 86 78 </widget> 87 79 </item> 88 <item row="2" column="0" colspan="3" 89 <widget class="Line" name="mLnSeparator" 90 <property name="orientation" 80 <item row="2" column="0" colspan="3"> 81 <widget class="Line" name="mLnSeparator"> 82 <property name="orientation"> 91 83 <enum>Qt::Horizontal</enum> 92 84 </property> … … 94 86 </item> 95 87 <item row="3" column="0" colspan="2"> 96 <widget class="QLabel" name="mLbVRDP" 97 <property name="text" 88 <widget class="QLabel" name="mLbVRDP"> 89 <property name="text"> 98 90 <string>V&RDP Authentication Library:</string> 99 91 </property> 100 <property name="alignment" 92 <property name="alignment"> 101 93 <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> 102 94 </property> 103 <property name="buddy" 95 <property name="buddy"> 104 96 <cstring>mPsVRDP</cstring> 105 97 </property> 106 98 </widget> 107 99 </item> 108 <item row="3" column="2" 109 <widget class="VBoxFilePathSelectorWidget" name="mPsVRDP" 110 <property name="sizePolicy" 111 <sizepolicy vsizetype="Fixed" hsizetype="MinimumExpanding">100 <item row="3" column="2"> 101 <widget class="VBoxFilePathSelectorWidget" name="mPsVRDP"> 102 <property name="sizePolicy"> 103 <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"> 112 104 <horstretch>0</horstretch> 113 105 <verstretch>0</verstretch> … … 116 108 </widget> 117 109 </item> 118 <item row="4" column="0" colspan="3" 119 <widget class="Line" name="mLnSeparator2" 120 <property name="orientation" 110 <item row="4" column="0" colspan="3"> 111 <widget class="Line" name="mLnSeparator2"> 112 <property name="orientation"> 121 113 <enum>Qt::Horizontal</enum> 122 114 </property> 123 115 </widget> 124 116 </item> 125 <item row="5" column="1" colspan="2" 126 <widget class="QCheckBox" name="mCbCheckTrayIcon" 127 <property name="whatsThis" 117 <item row="5" column="1" colspan="2"> 118 <widget class="QCheckBox" name="mCbCheckTrayIcon"> 119 <property name="whatsThis"> 128 120 <string>When checked, the application will provide an icon with the context menu in the system tray.</string> 129 121 </property> 130 <property name="text" 122 <property name="text"> 131 123 <string>&Show System Tray Icon</string> 132 124 </property> 133 <property name="checked" 125 <property name="checked"> 134 126 <bool>true</bool> 135 127 </property> 136 128 </widget> 137 129 </item> 138 <item row="6" column="1" colspan="2" 139 <widget class="QCheckBox" name="mCbCheckDockPreview" 140 <property name="whatsThis" 130 <item row="6" column="1" colspan="2"> 131 <widget class="QCheckBox" name="mCbCheckDockPreview"> 132 <property name="whatsThis"> 141 133 <string>When checked, the Dock Icon will reflect the VM window content in realtime.</string> 142 134 </property> 143 <property name="text" 135 <property name="text"> 144 136 <string>&Dock Icon Realtime Preview</string> 145 137 </property> 146 <property name="checked" 138 <property name="checked"> 147 139 <bool>true</bool> 148 140 </property> 149 141 </widget> 150 142 </item> 151 <item row=" 7" column="0" colspan="3">143 <item row="11" column="0" colspan="3"> 152 144 <spacer> 153 <property name="orientation" 145 <property name="orientation"> 154 146 <enum>Qt::Vertical</enum> 155 147 </property> 156 <property name="sizeHint" >148 <property name="sizeHint" stdset="0"> 157 149 <size> 158 150 <width>0</width> … … 161 153 </property> 162 154 </spacer> 155 </item> 156 <item row="7" column="1" colspan="2"> 157 <widget class="QCheckBox" name="mCbCheckPresentationMode"> 158 <property name="text"> 159 <string>&Auto show Dock && Menubar in fullscreen</string> 160 </property> 161 </widget> 163 162 </item> 164 163 </layout>
Note:
See TracChangeset
for help on using the changeset viewer.