Changeset 51679 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 20, 2014 5:15:36 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UIVMInfoDialog.cpp
r51665 r51679 479 479 480 480 /* Maximize (if necessary): */ 481 if (gEDataManager->i sInformationWindowShouldBeMaximized(vboxGlobal().managedVMUuid()))481 if (gEDataManager->informationWindowShouldBeMaximized(vboxGlobal().managedVMUuid())) 482 482 showMaximized(); 483 483 } -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r51671 r51679 19 19 #include "UIExtraDataDefs.h" 20 20 21 /* G lobal definitions: */21 /* General: */ 22 22 const char* UIExtraDataDefs::GUI_LanguageId = "GUI/LanguageID"; 23 24 /* Messaging: */ 25 const char* UIExtraDataDefs::GUI_SuppressMessages = "GUI/SuppressMessages"; 26 const char* UIExtraDataDefs::GUI_InvertMessageOption = "GUI/InvertMessageOption"; 27 #if !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) 23 28 const char* UIExtraDataDefs::GUI_PreventBetaWarning = "GUI/PreventBetaWarning"; 29 #endif /* !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) */ 30 31 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 32 /* Application Update: */ 33 const char* UIExtraDataDefs::GUI_PreventApplicationUpdate = "GUI/PreventApplicationUpdate"; 34 const char* UIExtraDataDefs::GUI_UpdateDate = "GUI/UpdateDate"; 35 const char* UIExtraDataDefs::GUI_UpdateCheckCount = "GUI/UpdateCheckCount"; 36 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 37 38 /* Settings: */ 39 const char* UIExtraDataDefs::GUI_RestrictedGlobalSettingsPages = "GUI/RestrictedGlobalSettingsPages"; 40 const char* UIExtraDataDefs::GUI_RestrictedMachineSettingsPages = "GUI/RestrictedMachineSettingsPages"; 41 42 /* Settings: Keyboard: */ 43 const char* UIExtraDataDefs::GUI_Input_SelectorShortcuts = "GUI/Input/SelectorShortcuts"; 44 const char* UIExtraDataDefs::GUI_Input_MachineShortcuts = "GUI/Input/MachineShortcuts"; 45 46 /* Settings: Storage: */ 24 47 const char* UIExtraDataDefs::GUI_RecentFolderHD = "GUI/RecentFolderHD"; 25 48 const char* UIExtraDataDefs::GUI_RecentFolderCD = "GUI/RecentFolderCD"; … … 29 52 const char* UIExtraDataDefs::GUI_RecentListFD = "GUI/RecentListFD"; 30 53 31 /* Message-center definitions: */ 32 const char* UIExtraDataDefs::GUI_SuppressMessages = "GUI/SuppressMessages"; 33 const char* UIExtraDataDefs::GUI_InvertMessageOption = "GUI/InvertMessageOption"; 34 35 /* Settings-dialog definitions: */ 36 const char* UIExtraDataDefs::GUI_RestrictedGlobalSettingsPages = "GUI/RestrictedGlobalSettingsPages"; 37 const char* UIExtraDataDefs::GUI_RestrictedMachineSettingsPages = "GUI/RestrictedMachineSettingsPages"; 38 39 /* Wizards definitions: */ 40 const char* UIExtraDataDefs::GUI_FirstRun = "GUI/FirstRun"; 41 const char* UIExtraDataDefs::GUI_HideDescriptionForWizards = "GUI/HideDescriptionForWizards"; 42 43 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 44 /* Update-manager definitions: */ 45 const char* UIExtraDataDefs::GUI_PreventApplicationUpdate = "GUI/PreventApplicationUpdate"; 46 const char* UIExtraDataDefs::GUI_UpdateDate = "GUI/UpdateDate"; 47 const char* UIExtraDataDefs::GUI_UpdateCheckCount = "GUI/UpdateCheckCount"; 48 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 49 50 /* Selector UI definitions: */ 51 const char* UIExtraDataDefs::GUI_Input_SelectorShortcuts = "GUI/Input/SelectorShortcuts"; 54 /* VirtualBox Manager: */ 52 55 const char* UIExtraDataDefs::GUI_LastSelectorWindowPosition = "GUI/LastWindowPosition"; 53 56 const char* UIExtraDataDefs::GUI_SplitterSizes = "GUI/SplitterSizes"; 54 57 const char* UIExtraDataDefs::GUI_Toolbar = "GUI/Toolbar"; 55 58 const char* UIExtraDataDefs::GUI_Statusbar = "GUI/Statusbar"; 59 const char* UIExtraDataDefs::GUI_GroupDefinitions = "GUI/GroupDefinitions"; 60 const char* UIExtraDataDefs::GUI_LastItemSelected = "GUI/LastItemSelected"; 61 const char* UIExtraDataDefs::GUI_DetailsPageBoxes = "GUI/DetailsPageBoxes"; 56 62 const char* UIExtraDataDefs::GUI_PreviewUpdate = "GUI/PreviewUpdate"; 57 const char* UIExtraDataDefs::GUI_DetailsPageBoxes = "GUI/DetailsPageBoxes"; 58 const char* UIExtraDataDefs::GUI_LastItemSelected = "GUI/LastItemSelected"; 59 const char* UIExtraDataDefs::GUI_GroupDefinitions = "GUI/GroupDefinitions"; 63 64 /* Wizards: */ 65 const char* UIExtraDataDefs::GUI_HideDescriptionForWizards = "GUI/HideDescriptionForWizards"; 66 67 /* Virtual Machine: */ 60 68 const char* UIExtraDataDefs::GUI_HideFromManager = "GUI/HideFromManager"; 69 const char* UIExtraDataDefs::GUI_HideDetails = "GUI/HideDetails"; 61 70 const char* UIExtraDataDefs::GUI_PreventReconfiguration = "GUI/PreventReconfiguration"; 62 71 const char* UIExtraDataDefs::GUI_PreventSnapshotOperations = "GUI/PreventSnapshotOperations"; 63 const char* UIExtraDataDefs::GUI_HideDetails = "GUI/HideDetails"; 64 65 /* Runtime UI definitions: */ 72 const char* UIExtraDataDefs::GUI_FirstRun = "GUI/FirstRun"; 66 73 #ifndef Q_WS_MAC 67 74 const char* UIExtraDataDefs::GUI_MachineWindowIcons = "GUI/MachineWindowIcons"; 68 75 const char* UIExtraDataDefs::GUI_MachineWindowNamePostfix = "GUI/MachineWindowNamePostfix"; 69 76 #endif /* !Q_WS_MAC */ 77 const char* UIExtraDataDefs::GUI_LastNormalWindowPosition = "GUI/LastNormalWindowPosition"; 78 const char* UIExtraDataDefs::GUI_LastScaleWindowPosition = "GUI/LastScaleWindowPosition"; 79 const char* UIExtraDataDefs::GUI_Geometry_State_Max = "max"; 70 80 const char* UIExtraDataDefs::GUI_RestrictedRuntimeMenus = "GUI/RestrictedRuntimeMenus"; 71 81 #ifdef Q_WS_MAC … … 80 90 const char* UIExtraDataDefs::GUI_RestrictedRuntimeHelpMenuActions = "GUI/RestrictedRuntimeHelpMenuActions"; 81 91 const char* UIExtraDataDefs::GUI_RestrictedVisualStates = "GUI/RestrictedVisualStates"; 82 const char* UIExtraDataDefs::GUI_Input_MachineShortcuts = "GUI/Input/MachineShortcuts";83 const char* UIExtraDataDefs::GUI_LastNormalWindowPosition = "GUI/LastNormalWindowPosition";84 const char* UIExtraDataDefs::GUI_LastScaleWindowPosition = "GUI/LastScaleWindowPosition";85 const char* UIExtraDataDefs::GUI_Geometry_State_Max = "max";86 const char* UIExtraDataDefs::GUI_LastGuestSizeHint = "GUI/LastGuestSizeHint";87 const char* UIExtraDataDefs::GUI_LastGuestSizeHintWasFullscreen = "GUI/LastGuestSizeHintWasFullscreen";88 92 const char* UIExtraDataDefs::GUI_Fullscreen = "GUI/Fullscreen"; 89 93 const char* UIExtraDataDefs::GUI_Seamless = "GUI/Seamless"; 90 94 const char* UIExtraDataDefs::GUI_Scale = "GUI/Scale"; 95 const char* UIExtraDataDefs::GUI_AutoresizeGuest = "GUI/AutoresizeGuest"; 96 const char* UIExtraDataDefs::GUI_LastGuestSizeHint = "GUI/LastGuestSizeHint"; 97 const char* UIExtraDataDefs::GUI_LastGuestSizeHintWasFullscreen = "GUI/LastGuestSizeHintWasFullscreen"; 91 98 const char* UIExtraDataDefs::GUI_VirtualScreenToHostScreen = "GUI/VirtualScreenToHostScreen"; 92 const char* UIExtraDataDefs::GUI_AutoresizeGuest = "GUI/AutoresizeGuest";93 99 const char* UIExtraDataDefs::GUI_AutomountGuestScreens = "GUI/AutomountGuestScreens"; 94 const char* UIExtraDataDefs::GUI_PassCAD = "GUI/PassCAD";95 const char* UIExtraDataDefs::GUI_DefaultCloseAction = "GUI/DefaultCloseAction";96 const char* UIExtraDataDefs::GUI_RestrictedStatusBarIndicators = "GUI/RestrictedStatusBarIndicators";97 const char* UIExtraDataDefs::GUI_HidLedsSync = "GUI/HidLedsSync";98 const char* UIExtraDataDefs::GUI_GuruMeditationHandler = "GUI/GuruMeditationHandler";99 const char* UIExtraDataDefs::GUI_HiDPI_Optimization = "GUI/HiDPI/Optimization";100 101 /* Runtime UI: Mini-toolbar definitions: */102 const char* UIExtraDataDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar";103 const char* UIExtraDataDefs::GUI_MiniToolBarAlignment = "GUI/MiniToolBarAlignment";104 const char* UIExtraDataDefs::GUI_MiniToolBarAutoHide = "GUI/MiniToolBarAutoHide";105 106 #ifdef Q_WS_MAC107 /* Runtime UI: Mac-dock definitions: */108 const char* UIExtraDataDefs::GUI_PresentationModeEnabled = "GUI/PresentationModeEnabled";109 const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled";110 const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateMonitor = "GUI/RealtimeDockIconUpdateMonitor";111 #endif /* Q_WS_MAC */112 113 100 #ifdef VBOX_WITH_VIDEOHWACCEL 114 /* Runtime UI: Video-acceleration definitions: */115 101 const char* UIExtraDataDefs::GUI_Accelerate2D_StretchLinear = "GUI/Accelerate2D/StretchLinear"; 116 102 const char* UIExtraDataDefs::GUI_Accelerate2D_PixformatYV12 = "GUI/Accelerate2D/PixformatYV12"; … … 119 105 const char* UIExtraDataDefs::GUI_Accelerate2D_PixformatAYUV = "GUI/Accelerate2D/PixformatAYUV"; 120 106 #endif /* VBOX_WITH_VIDEOHWACCEL */ 107 const char* UIExtraDataDefs::GUI_HiDPI_Optimization = "GUI/HiDPI/Optimization"; 108 const char* UIExtraDataDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar"; 109 const char* UIExtraDataDefs::GUI_MiniToolBarAutoHide = "GUI/MiniToolBarAutoHide"; 110 const char* UIExtraDataDefs::GUI_MiniToolBarAlignment = "GUI/MiniToolBarAlignment"; 111 const char* UIExtraDataDefs::GUI_RestrictedStatusBarIndicators = "GUI/RestrictedStatusBarIndicators"; 112 #ifdef Q_WS_MAC 113 const char* UIExtraDataDefs::GUI_PresentationModeEnabled = "GUI/PresentationModeEnabled"; 114 const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled"; 115 const char* UIExtraDataDefs::GUI_RealtimeDockIconUpdateMonitor = "GUI/RealtimeDockIconUpdateMonitor"; 116 #endif /* Q_WS_MAC */ 117 const char* UIExtraDataDefs::GUI_PassCAD = "GUI/PassCAD"; 118 const char* UIExtraDataDefs::GUI_GuruMeditationHandler = "GUI/GuruMeditationHandler"; 119 const char* UIExtraDataDefs::GUI_HidLedsSync = "GUI/HidLedsSync"; 121 120 122 /* Runtime UI: Close-dialog definitions: */ 121 /* Virtual Machine: Information dialog: */ 122 const char* UIExtraDataDefs::GUI_InformationWindowGeometry = "GUI/InformationWindowGeometry"; 123 124 /* Virtual Machine: Close dialog: */ 125 const char* UIExtraDataDefs::GUI_DefaultCloseAction = "GUI/DefaultCloseAction"; 123 126 const char* UIExtraDataDefs::GUI_RestrictedCloseActions = "GUI/RestrictedCloseActions"; 124 127 const char* UIExtraDataDefs::GUI_LastCloseAction = "GUI/LastCloseAction"; 125 128 const char* UIExtraDataDefs::GUI_CloseActionHook = "GUI/CloseActionHook"; 126 129 127 /* Runtime UI: Information-window definitions: */128 const char* UIExtraDataDefs::GUI_Geometry_InformationWindow = "GUI/Geometry/InformationWindow";129 130 130 #ifdef VBOX_WITH_DEBUGGER_GUI 131 /* Runtime UI: Debugger GUI definitions: */131 /* Virtual Machine: Debug UI: */ 132 132 const char* UIExtraDataDefs::GUI_Dbg_Enabled = "GUI/Dbg/Enabled"; 133 133 const char* UIExtraDataDefs::GUI_Dbg_AutoShow = "GUI/Dbg/AutoShow"; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r51671 r51679 27 27 namespace UIExtraDataDefs 28 28 { 29 /* Global declarations: */ 30 extern const char* GUI_LanguageId; 31 extern const char* GUI_PreventBetaWarning; 32 extern const char* GUI_RecentFolderHD; 33 extern const char* GUI_RecentFolderCD; 34 extern const char* GUI_RecentFolderFD; 35 extern const char* GUI_RecentListHD; 36 extern const char* GUI_RecentListCD; 37 extern const char* GUI_RecentListFD; 38 39 /* Message-center declarations: */ 40 extern const char* GUI_SuppressMessages; 41 extern const char* GUI_InvertMessageOption; 42 43 /* Settings-dialog declarations: */ 44 extern const char* GUI_RestrictedGlobalSettingsPages; 45 extern const char* GUI_RestrictedMachineSettingsPages; 46 47 /* Wizard declarations: */ 48 extern const char* GUI_FirstRun; 49 extern const char* GUI_HideDescriptionForWizards; 29 /** @name General 30 * @{ */ 31 /** VBox language ID. */ 32 extern const char* GUI_LanguageId; 33 /** @} */ 34 35 /** @name Messaging 36 * @{ */ 37 /** Holds the list of supressed messages for the Message/Popup center frameworks. */ 38 extern const char* GUI_SuppressMessages; 39 /** Holds the list of messages for the Message/Popup center frameworks with inverted check-box state. */ 40 extern const char* GUI_InvertMessageOption; 41 #if !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) 42 /** Holds version for which user wants to prevent BETA build warning. */ 43 extern const char* GUI_PreventBetaWarning; 44 #endif /* !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) */ 45 /** @} */ 50 46 51 47 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 52 /* Update-manager declarations: */ 53 extern const char* GUI_PreventApplicationUpdate; 54 extern const char* GUI_UpdateDate; 55 extern const char* GUI_UpdateCheckCount; 48 /** @name Application Update 49 * @{ */ 50 /** Holds whether Application Update functionality enabled. */ 51 extern const char* GUI_PreventApplicationUpdate; 52 /** Holds Application Update data. */ 53 extern const char* GUI_UpdateDate; 54 /** Holds Application Update check counter. */ 55 extern const char* GUI_UpdateCheckCount; 56 /** @} */ 56 57 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 57 58 58 /* Selector UI declarations: */ 59 extern const char* GUI_Input_SelectorShortcuts; 60 extern const char* GUI_LastSelectorWindowPosition; 61 extern const char* GUI_SplitterSizes; 62 extern const char* GUI_Toolbar; 63 extern const char* GUI_Statusbar; 64 extern const char* GUI_PreviewUpdate; 65 extern const char* GUI_DetailsPageBoxes; 66 extern const char* GUI_LastItemSelected; 67 extern const char* GUI_GroupDefinitions; 68 extern const char* GUI_HideFromManager; 69 extern const char* GUI_PreventReconfiguration; 70 extern const char* GUI_PreventSnapshotOperations; 71 extern const char* GUI_HideDetails; 72 73 /* Runtime UI declarations: */ 59 /** @name Settings 60 * @{ */ 61 /** Holds restricted Plobal Settings pages. */ 62 extern const char* GUI_RestrictedGlobalSettingsPages; 63 /** Holds restricted Machine Settings pages. */ 64 extern const char* GUI_RestrictedMachineSettingsPages; 65 /** @} */ 66 67 /** @name Settings: Keyboard 68 * @{ */ 69 /** Holds Selector UI shortcut overrides. */ 70 extern const char* GUI_Input_SelectorShortcuts; 71 /** Holds Runtime UI shortcut overrides. */ 72 extern const char* GUI_Input_MachineShortcuts; 73 /** @} */ 74 75 /** @name Settings: Storage 76 * @{ */ 77 /** Holds recent folder for hard-drives. */ 78 extern const char* GUI_RecentFolderHD; 79 /** Holds recent folder for optical-disks. */ 80 extern const char* GUI_RecentFolderCD; 81 /** Holds recent folder for floppy-disks. */ 82 extern const char* GUI_RecentFolderFD; 83 /** Holds the list of recently used hard-drives. */ 84 extern const char* GUI_RecentListHD; 85 /** Holds the list of recently used optical-disks. */ 86 extern const char* GUI_RecentListCD; 87 /** Holds the list of recently used floppy-disks. */ 88 extern const char* GUI_RecentListFD; 89 /** @} */ 90 91 /** @name VirtualBox Manager 92 * @{ */ 93 /** Holds selector-window geometry. */ 94 extern const char* GUI_LastSelectorWindowPosition; 95 /** Holds selector-window splitter hints. */ 96 extern const char* GUI_SplitterSizes; 97 /** Holds whether selector-window tool-bar visible. */ 98 extern const char* GUI_Toolbar; 99 /** Holds whether selector-window status-bar visible. */ 100 extern const char* GUI_Statusbar; 101 /** Prefix used by composite extra-data keys, 102 * which holds selector-window chooser-pane' groups definitions. */ 103 extern const char* GUI_GroupDefinitions; 104 /** Holds last item chosen in selector-window chooser-pane. */ 105 extern const char* GUI_LastItemSelected; 106 /** Holds selector-window details-pane' elements. */ 107 extern const char* GUI_DetailsPageBoxes; 108 /** Holds selector-window details-pane' preview update interval. */ 109 extern const char* GUI_PreviewUpdate; 110 /** @} */ 111 112 /** @name Wizards 113 * @{ */ 114 /** Holds wizard types for which descriptions should be hidden. */ 115 extern const char* GUI_HideDescriptionForWizards; 116 /** @} */ 117 118 /** @name Virtual Machine 119 * @{ */ 120 /** Holds whether machine shouldn't be shown in selector-window chooser-pane. */ 121 extern const char* GUI_HideFromManager; 122 /** Holds whether machine shouldn't be shown in selector-window details-pane. */ 123 extern const char* GUI_HideDetails; 124 /** Holds whether machine reconfiguration disabled. */ 125 extern const char* GUI_PreventReconfiguration; 126 /** Holds whether machine snapshot operations disabled. */ 127 extern const char* GUI_PreventSnapshotOperations; 128 /** Holds whether this machine is first time started. */ 129 extern const char* GUI_FirstRun; 74 130 #ifndef Q_WS_MAC 75 extern const char* GUI_MachineWindowIcons; 76 extern const char* GUI_MachineWindowNamePostfix; 131 /** Except Mac OS X: Holds redefined machine-window icon names. */ 132 extern const char* GUI_MachineWindowIcons; 133 /** Except Mac OS X: Holds redefined machine-window name postfix. */ 134 extern const char* GUI_MachineWindowNamePostfix; 77 135 #endif /* !Q_WS_MAC */ 78 extern const char* GUI_RestrictedRuntimeMenus; 136 /** Prefix used by composite extra-data keys, 137 * which holds normal machine-window geometry per screen-index. */ 138 extern const char* GUI_LastNormalWindowPosition; 139 /** Prefix used by composite extra-data keys, 140 * which holds scaled machine-window geometry per screen-index. */ 141 extern const char* GUI_LastScaleWindowPosition; 142 /** Holds machine-window geometry maximized state flag. */ 143 extern const char* GUI_Geometry_State_Max; 144 /** Holds restricted Runtime UI menu types. */ 145 extern const char* GUI_RestrictedRuntimeMenus; 79 146 #ifdef Q_WS_MAC 80 extern const char* GUI_RestrictedRuntimeApplicationMenuActions; 147 /** Mac OS X: Holds restricted Runtime UI action types for Application menu. */ 148 extern const char* GUI_RestrictedRuntimeApplicationMenuActions; 81 149 #endif /* Q_WS_MAC */ 82 extern const char* GUI_RestrictedRuntimeMachineMenuActions; 83 extern const char* GUI_RestrictedRuntimeViewMenuActions; 84 extern const char* GUI_RestrictedRuntimeDevicesMenuActions; 150 /** Holds restricted Runtime UI action types for Machine menu. */ 151 extern const char* GUI_RestrictedRuntimeMachineMenuActions; 152 /** Holds restricted Runtime UI action types for View menu. */ 153 extern const char* GUI_RestrictedRuntimeViewMenuActions; 154 /** Holds restricted Runtime UI action types for Devices menu. */ 155 extern const char* GUI_RestrictedRuntimeDevicesMenuActions; 85 156 #ifdef VBOX_WITH_DEBUGGER_GUI 86 extern const char* GUI_RestrictedRuntimeDebuggerMenuActions; 157 /** Holds restricted Runtime UI action types for Debugger menu. */ 158 extern const char* GUI_RestrictedRuntimeDebuggerMenuActions; 87 159 #endif /* VBOX_WITH_DEBUGGER_GUI */ 88 extern const char* GUI_RestrictedRuntimeHelpMenuActions; 89 extern const char* GUI_RestrictedVisualStates; 90 extern const char* GUI_Input_MachineShortcuts; 91 extern const char* GUI_LastNormalWindowPosition; 92 extern const char* GUI_LastScaleWindowPosition; 93 extern const char* GUI_Geometry_State_Max; 94 extern const char* GUI_LastGuestSizeHint; 95 extern const char* GUI_LastGuestSizeHintWasFullscreen; 96 extern const char* GUI_Fullscreen; 97 extern const char* GUI_Seamless; 98 extern const char* GUI_Scale; 99 extern const char* GUI_VirtualScreenToHostScreen; 100 extern const char* GUI_AutoresizeGuest; 101 extern const char* GUI_AutomountGuestScreens; 102 extern const char* GUI_PassCAD; 103 extern const char* GUI_DefaultCloseAction; 104 extern const char* GUI_RestrictedStatusBarIndicators; 105 extern const char* GUI_HidLedsSync; 106 extern const char* GUI_GuruMeditationHandler; 107 extern const char* GUI_HiDPI_Optimization; 108 109 /* Runtime UI: Mini-toolbar declarations: */ 110 extern const char* GUI_ShowMiniToolBar; 111 extern const char* GUI_MiniToolBarAlignment; 112 extern const char* GUI_MiniToolBarAutoHide; 113 160 /** Holds restricted Runtime UI action types for Help menu. */ 161 extern const char* GUI_RestrictedRuntimeHelpMenuActions; 162 /** Holds restricted Runtime UI visual-states. */ 163 extern const char* GUI_RestrictedVisualStates; 164 /** Holds whether full screen visual-state is requested. */ 165 extern const char* GUI_Fullscreen; 166 /** Holds whether seamless visual-state is requested. */ 167 extern const char* GUI_Seamless; 168 /** Holds whether scaled visual-state is requested. */ 169 extern const char* GUI_Scale; 170 /** Holds whether guest-screen auto-resize according machine-window size is enabled. */ 171 extern const char* GUI_AutoresizeGuest; 172 /** Prefix used by composite extra-data keys, 173 * which holds last guest-screen size-hint per screen-index. */ 174 extern const char* GUI_LastGuestSizeHint; 175 /** Prefix used by composite extra-data keys, 176 * which holds whether guest size-hint was for full or seamless screen per screen-index. */ 177 extern const char* GUI_LastGuestSizeHintWasFullscreen; 178 /** Prefix used by composite extra-data keys, 179 * which holds host-screen index per guest-screen index. */ 180 extern const char* GUI_VirtualScreenToHostScreen; 181 /** Holds whether automatic mounting/unmounting of guest-screens enabled. */ 182 extern const char* GUI_AutomountGuestScreens; 183 #ifdef VBOX_WITH_VIDEOHWACCEL 184 /** Holds whether 2D acceleration should use linear sretch. */ 185 extern const char* GUI_Accelerate2D_StretchLinear; 186 /** Holds whether 2D acceleration should use YV12 pixel format. */ 187 extern const char* GUI_Accelerate2D_PixformatYV12; 188 /** Holds whether 2D acceleration should use UYVY pixel format. */ 189 extern const char* GUI_Accelerate2D_PixformatUYVY; 190 /** Holds whether 2D acceleration should use YUY2 pixel format. */ 191 extern const char* GUI_Accelerate2D_PixformatYUY2; 192 /** Holds whether 2D acceleration should use AYUV pixel format. */ 193 extern const char* GUI_Accelerate2D_PixformatAYUV; 194 #endif /* VBOX_WITH_VIDEOHWACCEL */ 195 /** Holds Runtime UI HiDPI optimization type. */ 196 extern const char* GUI_HiDPI_Optimization; 197 /** Holds whether mini-toolbar is enabled for full and seamless screens. */ 198 extern const char* GUI_ShowMiniToolBar; 199 /** Holds whether mini-toolbar should auto-hide itself. */ 200 extern const char* GUI_MiniToolBarAutoHide; 201 /** Holds mini-toolbar alignment. */ 202 extern const char* GUI_MiniToolBarAlignment; 203 /** Holds restricted Runtime UI status-bar indicators. */ 204 extern const char* GUI_RestrictedStatusBarIndicators; 114 205 #ifdef Q_WS_MAC 115 /* Runtime UI: Mac-dock declarations: */ 116 extern const char* GUI_PresentationModeEnabled; 117 extern const char* GUI_RealtimeDockIconUpdateEnabled; 118 extern const char* GUI_RealtimeDockIconUpdateMonitor; 206 /** Mac OS X: Holds whether 'presentation mode' enabled. */ 207 extern const char* GUI_PresentationModeEnabled; 208 /** Mac OS X: Holds whether Dock icon should be updated at runtime. */ 209 extern const char* GUI_RealtimeDockIconUpdateEnabled; 210 /** Mac OS X: Holds guest-screen which Dock icon should reflect at runtime. */ 211 extern const char* GUI_RealtimeDockIconUpdateMonitor; 119 212 #endif /* Q_WS_MAC */ 120 121 #ifdef VBOX_WITH_VIDEOHWACCEL 122 /* Runtime UI: Video-acceleration declarations: */ 123 extern const char* GUI_Accelerate2D_StretchLinear; 124 extern const char* GUI_Accelerate2D_PixformatYV12; 125 extern const char* GUI_Accelerate2D_PixformatUYVY; 126 extern const char* GUI_Accelerate2D_PixformatYUY2; 127 extern const char* GUI_Accelerate2D_PixformatAYUV; 128 #endif /* VBOX_WITH_VIDEOHWACCEL */ 129 130 /* Runtime UI: Close-dialog declarations: */ 131 extern const char* GUI_RestrictedCloseActions; 132 extern const char* GUI_LastCloseAction; 133 extern const char* GUI_CloseActionHook; 134 135 /* Runtime UI: Information-window declarations: */ 136 extern const char* GUI_Geometry_InformationWindow; 213 /** Holds whether machine should pass CAD to guest. */ 214 extern const char* GUI_PassCAD; 215 /** Holds redefined guru-meditation handler type. */ 216 extern const char* GUI_GuruMeditationHandler; 217 /** Holds whether machine should perform HID LEDs synchronization. */ 218 extern const char* GUI_HidLedsSync; 219 /** @} */ 220 221 /** @name Virtual Machine: Information dialog 222 * @{ */ 223 /** Holds information-window geometry. */ 224 extern const char* GUI_InformationWindowGeometry; 225 /** @} */ 226 227 /** @name Virtual Machine: Close dialog 228 * @{ */ 229 /** Holds default machine close action. */ 230 extern const char* GUI_DefaultCloseAction; 231 /** Holds restricted machine close actions. */ 232 extern const char* GUI_RestrictedCloseActions; 233 /** Holds last machine close action. */ 234 extern const char* GUI_LastCloseAction; 235 /** Holds machine close hook script name as simple string. */ 236 extern const char* GUI_CloseActionHook; 237 /** @} */ 137 238 138 239 #ifdef VBOX_WITH_DEBUGGER_GUI 139 /* Runtime UI: Debugger GUI declarations: */ 140 extern const char* GUI_Dbg_Enabled; 141 extern const char* GUI_Dbg_AutoShow; 240 /** @name Virtual Machine Debug UI 241 * @{ */ 242 /** Holds whether debugger UI enabled. */ 243 extern const char* GUI_Dbg_Enabled; 244 /** Holds whether debugger UI should be auto-shown. */ 245 extern const char* GUI_Dbg_AutoShow; 246 /** @} */ 142 247 #endif /* VBOX_WITH_DEBUGGER_GUI */ 143 248 } -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r51671 r51679 158 158 } 159 159 160 QString UIExtraDataManager::preventBETAwarningForVersion() const 160 QStringList UIExtraDataManager::suppressedMessages() const 161 { 162 return extraDataStringList(GUI_SuppressMessages); 163 } 164 165 void UIExtraDataManager::setSuppressedMessages(const QStringList &list) 166 { 167 setExtraDataStringList(GUI_SuppressMessages, list); 168 } 169 170 QStringList UIExtraDataManager::messagesWithInvertedOption() const 171 { 172 return extraDataStringList(GUI_InvertMessageOption); 173 } 174 175 #if !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) 176 QString UIExtraDataManager::preventBetaBuildWarningForVersion() const 161 177 { 162 178 return extraDataString(GUI_PreventBetaWarning); 163 179 } 180 #endif /* !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) */ 164 181 165 182 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 166 bool UIExtraDataManager:: shouldWeAllowApplicationUpdate() const167 { 168 /* Allow unless 'forbidden' flag is set: */183 bool UIExtraDataManager::applicationUpdateEnabled() const 184 { 185 /* 'True' unless 'restriction' feature allowed: */ 169 186 return !isFeatureAllowed(GUI_PreventApplicationUpdate); 170 187 } … … 188 205 { 189 206 bool ok = false; 190 intuCheckCount = strCheckCount.toULongLong(&ok);207 qulonglong uCheckCount = strCheckCount.toULongLong(&ok); 191 208 if (ok) uResult = uCheckCount; 192 209 } … … 201 218 } 202 219 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 220 221 QList<GlobalSettingsPageType> UIExtraDataManager::restrictedGlobalSettingsPages() const 222 { 223 /* Prepare result: */ 224 QList<GlobalSettingsPageType> result; 225 /* Get restricted global-settings-pages: */ 226 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedGlobalSettingsPages)) 227 { 228 GlobalSettingsPageType value = gpConverter->fromInternalString<GlobalSettingsPageType>(strValue); 229 if (value != GlobalSettingsPageType_Invalid) 230 result << value; 231 } 232 /* Return result: */ 233 return result; 234 } 235 236 QList<MachineSettingsPageType> UIExtraDataManager::restrictedMachineSettingsPages(const QString &strID) const 237 { 238 /* Prepare result: */ 239 QList<MachineSettingsPageType> result; 240 /* Get restricted machine-settings-pages: */ 241 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedMachineSettingsPages, strID)) 242 { 243 MachineSettingsPageType value = gpConverter->fromInternalString<MachineSettingsPageType>(strValue); 244 if (value != MachineSettingsPageType_Invalid) 245 result << value; 246 } 247 /* Return result: */ 248 return result; 249 } 203 250 204 251 QStringList UIExtraDataManager::shortcutOverrides(const QString &strPoolExtraDataID) const … … 271 318 } 272 319 273 QStringList UIExtraDataManager::suppressedMessages() const 274 { 275 return extraDataStringList(GUI_SuppressMessages); 276 } 277 278 void UIExtraDataManager::setSuppressedMessages(const QStringList &value) 279 { 280 setExtraDataStringList(GUI_SuppressMessages, value); 281 } 282 283 QStringList UIExtraDataManager::messagesWithInvertedOption() const 284 { 285 return extraDataStringList(GUI_InvertMessageOption); 286 } 287 288 WizardMode UIExtraDataManager::modeForWizard(WizardType type) 320 QRect UIExtraDataManager::selectorWindowGeometry(QWidget *pWidget) const 321 { 322 /* Get corresponding extra-data: */ 323 const QStringList data = extraDataStringList(GUI_LastSelectorWindowPosition); 324 325 /* Parse loaded data: */ 326 int iX = 0, iY = 0, iW = 0, iH = 0; 327 bool fOk = data.size() >= 4; 328 do 329 { 330 if (!fOk) break; 331 iX = data[0].toInt(&fOk); 332 if (!fOk) break; 333 iY = data[1].toInt(&fOk); 334 if (!fOk) break; 335 iW = data[2].toInt(&fOk); 336 if (!fOk) break; 337 iH = data[3].toInt(&fOk); 338 } 339 while (0); 340 341 /* Use geometry (loaded or default): */ 342 QRect geometry = fOk ? QRect(iX, iY, iW, iH) : QRect(0, 0, 770, 550); 343 344 /* Take widget into account: */ 345 if (pWidget) 346 geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint())); 347 348 /* Get screen-geometry [of screen with point (iX, iY) if possible]: */ 349 const QRect screenGeometry = fOk ? QApplication::desktop()->availableGeometry(QPoint(iX, iY)) : 350 QApplication::desktop()->availableGeometry(); 351 352 /* Make sure resulting geometry is within current bounds: */ 353 geometry = geometry.intersected(screenGeometry); 354 355 /* Move default-geometry to screen-geometry' center: */ 356 if (!fOk) 357 geometry.moveCenter(screenGeometry.center()); 358 359 /* Return result: */ 360 return geometry; 361 } 362 363 bool UIExtraDataManager::selectorWindowShouldBeMaximized() const 364 { 365 /* Get corresponding extra-data: */ 366 const QStringList data = extraDataStringList(GUI_LastSelectorWindowPosition); 367 368 /* Make sure 5th item has required value: */ 369 return data.size() == 5 && data[4] == GUI_Geometry_State_Max; 370 } 371 372 void UIExtraDataManager::setSelectorWindowGeometry(const QRect &geometry, bool fMaximized) 373 { 374 /* Serialize passed values: */ 375 QStringList data; 376 data << QString::number(geometry.x()); 377 data << QString::number(geometry.y()); 378 data << QString::number(geometry.width()); 379 data << QString::number(geometry.height()); 380 if (fMaximized) 381 data << GUI_Geometry_State_Max; 382 383 /* Re-cache corresponding extra-data: */ 384 setExtraDataStringList(GUI_LastSelectorWindowPosition, data); 385 } 386 387 QList<int> UIExtraDataManager::selectorWindowSplitterHints() const 388 { 389 /* Get corresponding extra-data: */ 390 const QStringList data = extraDataStringList(GUI_SplitterSizes); 391 392 /* Parse loaded data: */ 393 QList<int> hints; 394 hints << (data.size() > 0 ? data[0].toInt() : 0); 395 hints << (data.size() > 1 ? data[1].toInt() : 0); 396 397 /* Return hints: */ 398 return hints; 399 } 400 401 void UIExtraDataManager::setSelectorWindowSplitterHints(const QList<int> &hints) 402 { 403 /* Parse passed hints: */ 404 QStringList data; 405 data << (hints.size() > 0 ? QString::number(hints[0]) : QString()); 406 data << (hints.size() > 1 ? QString::number(hints[1]) : QString()); 407 408 /* Re-cache corresponding extra-data: */ 409 setExtraDataStringList(GUI_SplitterSizes, data); 410 } 411 412 bool UIExtraDataManager::selectorWindowToolBarVisible() const 413 { 414 /* 'True' unless feature restricted: */ 415 return !isFeatureRestricted(GUI_Toolbar); 416 } 417 418 void UIExtraDataManager::setSelectorWindowToolBarVisible(bool fVisible) 419 { 420 /* 'False' if feature restricted, null-string otherwise: */ 421 setExtraDataString(GUI_Toolbar, toFeatureRestricted(!fVisible)); 422 } 423 424 bool UIExtraDataManager::selectorWindowStatusBarVisible() const 425 { 426 /* 'True' unless feature restricted: */ 427 return !isFeatureRestricted(GUI_Statusbar); 428 } 429 430 void UIExtraDataManager::setSelectorWindowStatusBarVisible(bool fVisible) 431 { 432 /* 'False' if feature restricted, null-string otherwise: */ 433 setExtraDataString(GUI_Statusbar, toFeatureRestricted(!fVisible)); 434 } 435 436 void UIExtraDataManager::clearSelectorWindowGroupsDefinitions() 437 { 438 /* Read-only access global extra-data map: */ 439 const ExtraDataMap &data = m_data[m_sstrGlobalID]; 440 /* Wipe-out each the group definition record: */ 441 foreach (const QString &strKey, data.keys()) 442 if (strKey.startsWith(GUI_GroupDefinitions)) 443 setExtraDataString(strKey, QString()); 444 } 445 446 QStringList UIExtraDataManager::selectorWindowGroupsDefinitions(const QString &strGroupID) const 447 { 448 return extraDataStringList(GUI_GroupDefinitions + strGroupID); 449 } 450 451 void UIExtraDataManager::setSelectorWindowGroupsDefinitions(const QString &strGroupID, const QStringList &definitions) 452 { 453 setExtraDataStringList(GUI_GroupDefinitions + strGroupID, definitions); 454 } 455 456 QString UIExtraDataManager::selectorWindowLastItemChosen() const 457 { 458 return extraDataString(GUI_LastItemSelected); 459 } 460 461 void UIExtraDataManager::setSelectorWindowLastItemChosen(const QString &strItemID) 462 { 463 setExtraDataString(GUI_LastItemSelected, strItemID); 464 } 465 466 QMap<DetailsElementType, bool> UIExtraDataManager::selectorWindowDetailsElements() 467 { 468 /* Get corresponding extra-data: */ 469 const QStringList data = extraDataStringList(GUI_DetailsPageBoxes); 470 471 /* Desearialize passed elements: */ 472 QMap<DetailsElementType, bool> elements; 473 foreach (QString strItem, data) 474 { 475 bool fOpened = true; 476 if (strItem.endsWith("Closed", Qt::CaseInsensitive)) 477 { 478 fOpened = false; 479 strItem.remove("Closed"); 480 } 481 DetailsElementType type = gpConverter->fromInternalString<DetailsElementType>(strItem); 482 if (type != DetailsElementType_Invalid) 483 elements[type] = fOpened; 484 } 485 486 /* Return elements: */ 487 return elements; 488 } 489 490 void UIExtraDataManager::setSelectorWindowDetailsElements(const QMap<DetailsElementType, bool> &elements) 491 { 492 /* Prepare corresponding extra-data: */ 493 QStringList data; 494 495 /* Searialize passed elements: */ 496 foreach (DetailsElementType type, elements.keys()) 497 { 498 QString strValue = gpConverter->toInternalString(type); 499 if (!elements[type]) 500 strValue += "Closed"; 501 data << strValue; 502 } 503 504 /* Re-cache corresponding extra-data: */ 505 setExtraDataStringList(GUI_DetailsPageBoxes, data); 506 } 507 508 PreviewUpdateIntervalType UIExtraDataManager::selectorWindowPreviewUpdateInterval() const 509 { 510 return gpConverter->fromInternalString<PreviewUpdateIntervalType>(extraDataString(GUI_PreviewUpdate)); 511 } 512 513 void UIExtraDataManager::setSelectorWindowPreviewUpdateInterval(PreviewUpdateIntervalType interval) 514 { 515 setExtraDataString(GUI_PreviewUpdate, gpConverter->toInternalString(interval)); 516 } 517 518 WizardMode UIExtraDataManager::modeForWizardType(WizardType type) 289 519 { 290 520 /* Some wizard use only 'basic' mode: */ … … 296 526 } 297 527 298 void UIExtraDataManager::setModeForWizard (WizardType type, WizardMode mode)528 void UIExtraDataManager::setModeForWizardType(WizardType type, WizardMode mode) 299 529 { 300 530 /* Get wizard name: */ 301 531 const QString strWizardName = gpConverter->toInternalString(type); 302 532 /* Get current value: */ 303 QStringList oldValue = extraDataStringList(GUI_HideDescriptionForWizards);533 const QStringList oldValue = extraDataStringList(GUI_HideDescriptionForWizards); 304 534 QStringList newValue = oldValue; 305 535 /* Include wizard-name into expert-mode wizard list if necessary: */ … … 314 544 } 315 545 316 QRect UIExtraDataManager::selectorWindowGeometry(QWidget *pWidget) const 317 { 318 /* Load corresponding extra-data: */ 319 const QStringList data = extraDataStringList(GUI_LastSelectorWindowPosition); 546 bool UIExtraDataManager::showMachineInSelectorChooser(const QString &strID) const 547 { 548 /* 'True' unless 'restriction' feature allowed: */ 549 return !isFeatureAllowed(GUI_HideFromManager, strID); 550 } 551 552 bool UIExtraDataManager::showMachineInSelectorDetails(const QString &strID) const 553 { 554 /* 'True' unless 'restriction' feature allowed: */ 555 return !isFeatureAllowed(GUI_HideDetails, strID); 556 } 557 558 bool UIExtraDataManager::machineReconfigurationEnabled(const QString &strID) const 559 { 560 /* 'True' unless 'restriction' feature allowed: */ 561 return !isFeatureAllowed(GUI_PreventReconfiguration, strID); 562 } 563 564 bool UIExtraDataManager::machineSnapshotOperationsEnabled(const QString &strID) const 565 { 566 /* 'True' unless 'restriction' feature allowed: */ 567 return !isFeatureAllowed(GUI_PreventSnapshotOperations, strID); 568 } 569 570 bool UIExtraDataManager::machineFirstTimeStarted(const QString &strID) const 571 { 572 /* 'True' only if feature is allowed: */ 573 return isFeatureAllowed(GUI_FirstRun, strID); 574 } 575 576 void UIExtraDataManager::setMachineFirstTimeStarted(bool fFirstTimeStarted, const QString &strID) 577 { 578 /* 'True' if feature allowed, null-string otherwise: */ 579 setExtraDataString(GUI_FirstRun, toFeatureAllowed(fFirstTimeStarted), strID); 580 } 581 582 #ifndef Q_WS_MAC 583 QStringList UIExtraDataManager::machineWindowIconNames(const QString &strID) const 584 { 585 return extraDataStringList(GUI_MachineWindowIcons, strID); 586 } 587 588 QString UIExtraDataManager::machineWindowNamePostfix(const QString &strID) const 589 { 590 return extraDataString(GUI_MachineWindowNamePostfix, strID); 591 } 592 #endif /* !Q_WS_MAC */ 593 594 QRect UIExtraDataManager::machineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strID) const 595 { 596 /* Choose corresponding key: */ 597 QString strKey; 598 switch (visualStateType) 599 { 600 case UIVisualStateType_Normal: strKey = extraDataKeyPerScreen(GUI_LastNormalWindowPosition, uScreenIndex); break; 601 case UIVisualStateType_Scale: strKey = extraDataKeyPerScreen(GUI_LastScaleWindowPosition, uScreenIndex); break; 602 default: AssertFailedReturn(QRect()); 603 } 604 605 /* Get corresponding extra-data: */ 606 const QStringList data = extraDataStringList(strKey, strID); 320 607 321 608 /* Parse loaded data: */ … … 335 622 while (0); 336 623 337 /* Use geometry (loaded or default): */ 338 QRect geometry = fOk ? QRect(iX, iY, iW, iH) : QRect(0, 0, 770, 550); 339 340 /* Take widget into account: */ 341 if (pWidget) 342 geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint())); 343 344 /* Get screen-geometry [of screen with point (iX, iY) if possible]: */ 345 const QRect screenGeometry = fOk ? QApplication::desktop()->availableGeometry(QPoint(iX, iY)) : 346 QApplication::desktop()->availableGeometry(); 347 348 /* Make sure resulting geometry is within current bounds: */ 349 geometry = geometry.intersected(screenGeometry); 350 351 /* Move default-geometry to screen-geometry' center: */ 352 if (!fOk) 353 geometry.moveCenter(screenGeometry.center()); 354 355 /* Return result: */ 356 return geometry; 357 } 358 359 bool UIExtraDataManager::isSelectorWindowShouldBeMaximized() const 360 { 361 /* Load corresponding extra-data: */ 362 const QStringList data = extraDataStringList(GUI_LastSelectorWindowPosition); 624 /* Return geometry (loaded or null): */ 625 return fOk ? QRect(iX, iY, iW, iH) : QRect(); 626 } 627 628 bool UIExtraDataManager::machineWindowShouldBeMaximized(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strID) const 629 { 630 /* Choose corresponding key: */ 631 QString strKey; 632 switch (visualStateType) 633 { 634 case UIVisualStateType_Normal: strKey = extraDataKeyPerScreen(GUI_LastNormalWindowPosition, uScreenIndex); break; 635 case UIVisualStateType_Scale: strKey = extraDataKeyPerScreen(GUI_LastScaleWindowPosition, uScreenIndex); break; 636 default: AssertFailedReturn(false); 637 } 638 639 /* Get corresponding extra-data: */ 640 const QStringList data = extraDataStringList(strKey, strID); 363 641 364 642 /* Make sure 5th item has required value: */ … … 366 644 } 367 645 368 void UIExtraDataManager::setSelectorWindowGeometry(const QRect &geometry, bool fMaximized) 369 { 646 void UIExtraDataManager::setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QString &strID) 647 { 648 /* Choose corresponding key: */ 649 QString strKey; 650 switch (visualStateType) 651 { 652 case UIVisualStateType_Normal: strKey = extraDataKeyPerScreen(GUI_LastNormalWindowPosition, uScreenIndex); break; 653 case UIVisualStateType_Scale: strKey = extraDataKeyPerScreen(GUI_LastScaleWindowPosition, uScreenIndex); break; 654 default: AssertFailedReturnVoid(); 655 } 656 370 657 /* Serialize passed values: */ 371 658 QStringList data; … … 378 665 379 666 /* Re-cache corresponding extra-data: */ 380 setExtraDataStringList(GUI_LastSelectorWindowPosition, data); 381 } 382 383 QList<int> UIExtraDataManager::selectorWindowSplitterHints() const 384 { 385 /* Load corresponding extra-data list: */ 386 const QStringList data = extraDataStringList(GUI_SplitterSizes); 667 setExtraDataStringList(strKey, data, strID); 668 } 669 670 RuntimeMenuType UIExtraDataManager::restrictedRuntimeMenuTypes(const QString &strID) const 671 { 672 /* Prepare result: */ 673 RuntimeMenuType result = RuntimeMenuType_Invalid; 674 /* Get restricted runtime-menu-types: */ 675 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeMenus, strID)) 676 { 677 RuntimeMenuType value = gpConverter->fromInternalString<RuntimeMenuType>(strValue); 678 if (value != RuntimeMenuType_Invalid) 679 result = static_cast<RuntimeMenuType>(result | value); 680 } 681 /* Return result: */ 682 return result; 683 } 684 685 #ifdef Q_WS_MAC 686 RuntimeMenuApplicationActionType UIExtraDataManager::restrictedRuntimeMenuApplicationActionTypes(const QString &strID) const 687 { 688 /* Prepare result: */ 689 RuntimeMenuApplicationActionType result = RuntimeMenuApplicationActionType_Invalid; 690 /* Get restricted runtime-application-menu action-types: */ 691 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeApplicationMenuActions, strID)) 692 { 693 RuntimeMenuApplicationActionType value = gpConverter->fromInternalString<RuntimeMenuApplicationActionType>(strValue); 694 if (value != RuntimeMenuApplicationActionType_Invalid) 695 result = static_cast<RuntimeMenuApplicationActionType>(result | value); 696 } 697 /* Return result: */ 698 return result; 699 } 700 #endif /* Q_WS_MAC */ 701 702 RuntimeMenuMachineActionType UIExtraDataManager::restrictedRuntimeMenuMachineActionTypes(const QString &strID) const 703 { 704 /* Prepare result: */ 705 RuntimeMenuMachineActionType result = RuntimeMenuMachineActionType_Invalid; 706 /* Get restricted runtime-machine-menu action-types: */ 707 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeMachineMenuActions, strID)) 708 { 709 RuntimeMenuMachineActionType value = gpConverter->fromInternalString<RuntimeMenuMachineActionType>(strValue); 710 if (value != RuntimeMenuMachineActionType_Invalid) 711 result = static_cast<RuntimeMenuMachineActionType>(result | value); 712 } 713 /* Return result: */ 714 return result; 715 } 716 717 RuntimeMenuViewActionType UIExtraDataManager::restrictedRuntimeMenuViewActionTypes(const QString &strID) const 718 { 719 /* Prepare result: */ 720 RuntimeMenuViewActionType result = RuntimeMenuViewActionType_Invalid; 721 /* Get restricted runtime-view-menu action-types: */ 722 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeViewMenuActions, strID)) 723 { 724 RuntimeMenuViewActionType value = gpConverter->fromInternalString<RuntimeMenuViewActionType>(strValue); 725 if (value != RuntimeMenuViewActionType_Invalid) 726 result = static_cast<RuntimeMenuViewActionType>(result | value); 727 } 728 /* Return result: */ 729 return result; 730 } 731 732 RuntimeMenuDevicesActionType UIExtraDataManager::restrictedRuntimeMenuDevicesActionTypes(const QString &strID) const 733 { 734 /* Prepare result: */ 735 RuntimeMenuDevicesActionType result = RuntimeMenuDevicesActionType_Invalid; 736 /* Get restricted runtime-devices-menu action-types: */ 737 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeDevicesMenuActions, strID)) 738 { 739 RuntimeMenuDevicesActionType value = gpConverter->fromInternalString<RuntimeMenuDevicesActionType>(strValue); 740 if (value != RuntimeMenuDevicesActionType_Invalid) 741 result = static_cast<RuntimeMenuDevicesActionType>(result | value); 742 } 743 /* Return result: */ 744 return result; 745 } 746 747 #ifdef VBOX_WITH_DEBUGGER_GUI 748 RuntimeMenuDebuggerActionType UIExtraDataManager::restrictedRuntimeMenuDebuggerActionTypes(const QString &strID) const 749 { 750 /* Prepare result: */ 751 RuntimeMenuDebuggerActionType result = RuntimeMenuDebuggerActionType_Invalid; 752 /* Get restricted runtime-debugger-menu action-types: */ 753 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeDebuggerMenuActions, strID)) 754 { 755 RuntimeMenuDebuggerActionType value = gpConverter->fromInternalString<RuntimeMenuDebuggerActionType>(strValue); 756 if (value != RuntimeMenuDebuggerActionType_Invalid) 757 result = static_cast<RuntimeMenuDebuggerActionType>(result | value); 758 } 759 /* Return result: */ 760 return result; 761 } 762 #endif /* VBOX_WITH_DEBUGGER_GUI */ 763 764 RuntimeMenuHelpActionType UIExtraDataManager::restrictedRuntimeMenuHelpActionTypes(const QString &strID) const 765 { 766 /* Prepare result: */ 767 RuntimeMenuHelpActionType result = RuntimeMenuHelpActionType_Invalid; 768 /* Get restricted runtime-help-menu action-types: */ 769 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeHelpMenuActions, strID)) 770 { 771 RuntimeMenuHelpActionType value = gpConverter->fromInternalString<RuntimeMenuHelpActionType>(strValue); 772 if (value != RuntimeMenuHelpActionType_Invalid) 773 result = static_cast<RuntimeMenuHelpActionType>(result | value); 774 } 775 /* Return result: */ 776 return result; 777 } 778 779 UIVisualStateType UIExtraDataManager::restrictedVisualStates(const QString &strID) const 780 { 781 /* Prepare result: */ 782 UIVisualStateType result = UIVisualStateType_Invalid; 783 /* Get restricted visual-state-types: */ 784 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedVisualStates, strID)) 785 { 786 UIVisualStateType value = gpConverter->fromInternalString<UIVisualStateType>(strValue); 787 if (value != UIVisualStateType_Invalid) 788 result = static_cast<UIVisualStateType>(result | value); 789 } 790 /* Return result: */ 791 return result; 792 } 793 794 UIVisualStateType UIExtraDataManager::requestedVisualState(const QString &strID) const 795 { 796 if (isFeatureAllowed(GUI_Fullscreen, strID)) return UIVisualStateType_Fullscreen; 797 if (isFeatureAllowed(GUI_Seamless, strID)) return UIVisualStateType_Seamless; 798 if (isFeatureAllowed(GUI_Scale, strID)) return UIVisualStateType_Scale; 799 return UIVisualStateType_Normal; 800 } 801 802 void UIExtraDataManager::setRequestedVisualState(UIVisualStateType visualState, const QString &strID) 803 { 804 setExtraDataString(GUI_Fullscreen, toFeatureAllowed(visualState == UIVisualStateType_Fullscreen), strID); 805 setExtraDataString(GUI_Seamless, toFeatureAllowed(visualState == UIVisualStateType_Seamless), strID); 806 setExtraDataString(GUI_Scale, toFeatureAllowed(visualState == UIVisualStateType_Scale), strID); 807 } 808 809 bool UIExtraDataManager::guestScreenAutoResizeEnabled(const QString &strID) const 810 { 811 /* 'True' unless feature restricted: */ 812 return !isFeatureRestricted(GUI_AutoresizeGuest, strID); 813 } 814 815 void UIExtraDataManager::setGuestScreenAutoResizeEnabled(bool fEnabled, const QString &strID) 816 { 817 /* 'False' if feature restricted, null-string otherwise: */ 818 setExtraDataString(GUI_AutoresizeGuest, toFeatureRestricted(!fEnabled), strID); 819 } 820 821 QSize UIExtraDataManager::lastGuestSizeHint(ulong uScreenIndex, const QString &strID) const 822 { 823 /* Choose corresponding key: */ 824 const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHint, uScreenIndex); 825 826 /* Get corresponding extra-data: */ 827 const QStringList data = extraDataStringList(strKey, strID); 387 828 388 829 /* Parse loaded data: */ 389 QList<int> hints; 390 hints << (data.size() > 0 ? data[0].toInt() : 0); 391 hints << (data.size() > 1 ? data[1].toInt() : 0); 392 393 /* Return hints: */ 394 return hints; 395 } 396 397 void UIExtraDataManager::setSelectorWindowSplitterHints(const QList<int> &hints) 398 { 399 /* Parse passed hints: */ 830 int iW = 0, iH = 0; 831 bool fOk = data.size() == 2; 832 do 833 { 834 if (!fOk) break; 835 iW = data[0].toInt(&fOk); 836 if (!fOk) break; 837 iH = data[1].toInt(&fOk); 838 } 839 while (0); 840 841 /* Return size (loaded or invalid): */ 842 return fOk ? QSize(iW, iH) : QSize(); 843 } 844 845 void UIExtraDataManager::setLastGuestSizeHint(ulong uScreenIndex, const QSize &sizeHint, const QString &strID) 846 { 847 /* Choose corresponding key: */ 848 const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHint, uScreenIndex); 849 850 /* Serialize passed values: */ 400 851 QStringList data; 401 data << (hints.size() > 0 ? QString::number(hints[0]) : QString());402 data << (hints.size() > 1 ? QString::number(hints[1]) : QString());852 data << QString::number(sizeHint.width()); 853 data << QString::number(sizeHint.height()); 403 854 404 855 /* Re-cache corresponding extra-data: */ 405 setExtraDataStringList(GUI_SplitterSizes, data); 406 } 407 408 bool UIExtraDataManager::selectorWindowToolBarVisible() const 856 setExtraDataStringList(strKey, data, strID); 857 } 858 859 bool UIExtraDataManager::wasLastGuestSizeHintForFullScreen(ulong uScreenIndex, const QString &strID) const 860 { 861 /* Choose corresponding key: */ 862 const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHintWasFullscreen, uScreenIndex); 863 864 /* 'True' only if feature is allowed: */ 865 return isFeatureAllowed(strKey, strID); 866 } 867 868 void UIExtraDataManager::markLastGuestSizeHintAsFullScreen(ulong uScreenIndex, bool fWas, const QString &strID) 869 { 870 /* Choose corresponding key: */ 871 const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHintWasFullscreen, uScreenIndex); 872 873 /* 'True' if feature allowed, null-string otherwise: */ 874 return setExtraDataString(strKey, toFeatureAllowed(fWas), strID); 875 } 876 877 int UIExtraDataManager::hostScreenForPassedGuestScreen(int iGuestScreenIndex, const QString &strID) 878 { 879 /* Choose corresponding key: */ 880 const QString strKey = extraDataKeyPerScreen(GUI_VirtualScreenToHostScreen, iGuestScreenIndex, true); 881 882 /* Get value and convert it to index: */ 883 const QString strValue = extraDataString(strKey, strID); 884 bool fOk = false; 885 const int iHostScreenIndex = strValue.toULong(&fOk); 886 887 /* Return corresponding index: */ 888 return fOk ? iHostScreenIndex : -1; 889 } 890 891 void UIExtraDataManager::setHostScreenForPassedGuestScreen(int iGuestScreenIndex, int iHostScreenIndex, const QString &strID) 892 { 893 /* Choose corresponding key: */ 894 const QString strKey = extraDataKeyPerScreen(GUI_VirtualScreenToHostScreen, iGuestScreenIndex, true); 895 896 /* Save passed index under corresponding value: */ 897 setExtraDataString(strKey, iHostScreenIndex != -1 ? QString::number(iHostScreenIndex) : QString(), strID); 898 } 899 900 bool UIExtraDataManager::autoMountGuestScreensEnabled(const QString &strID) const 901 { 902 /* Show only if 'allowed' flag is set: */ 903 return isFeatureAllowed(GUI_AutomountGuestScreens, strID); 904 } 905 906 #ifdef VBOX_WITH_VIDEOHWACCEL 907 bool UIExtraDataManager::useLinearStretch(const QString &strID) const 409 908 { 410 909 /* 'True' unless feature restricted: */ 411 return !isFeatureRestricted(GUI_Toolbar); 412 } 413 414 void UIExtraDataManager::setSelectorWindowToolBarVisible(bool fVisible) 415 { 416 /* Remember if feature restricted: */ 417 setExtraDataString(GUI_Toolbar, toFeatureRestricted(!fVisible)); 418 } 419 420 bool UIExtraDataManager::selectorWindowStatusBarVisible() const 910 return !isFeatureRestricted(GUI_Accelerate2D_StretchLinear, strID); 911 } 912 913 bool UIExtraDataManager::usePixelFormatYV12(const QString &strID) const 421 914 { 422 915 /* 'True' unless feature restricted: */ 423 return !isFeatureRestricted(GUI_Statusbar); 424 } 425 426 void UIExtraDataManager::setSelectorWindowStatusBarVisible(bool fVisible) 427 { 428 /* Remember if feature restricted: */ 429 setExtraDataString(GUI_Statusbar, toFeatureRestricted(!fVisible)); 430 } 431 432 void UIExtraDataManager::clearSelectorWindowGroupsDefinitions() 433 { 434 /* Read-only access global extra-data map: */ 435 const ExtraDataMap &data = m_data[m_sstrGlobalID]; 436 /* Wipe-out each the group definition record: */ 437 foreach (const QString &strKey, data.keys()) 438 if (strKey.startsWith(GUI_GroupDefinitions)) 439 setExtraDataString(strKey, QString()); 440 } 441 442 QStringList UIExtraDataManager::selectorWindowGroupsDefinitions(const QString &strGroupID) const 443 { 444 return extraDataStringList(GUI_GroupDefinitions + strGroupID); 445 } 446 447 void UIExtraDataManager::setSelectorWindowGroupsDefinitions(const QString &strGroupID, const QStringList &definitions) 448 { 449 setExtraDataStringList(GUI_GroupDefinitions + strGroupID, definitions); 450 } 451 452 QString UIExtraDataManager::selectorWindowLastItemChosen() const 453 { 454 return extraDataString(GUI_LastItemSelected); 455 } 456 457 void UIExtraDataManager::setSelectorWindowLastItemChosen(const QString &strItemID) 458 { 459 setExtraDataString(GUI_LastItemSelected, strItemID); 460 } 461 462 QMap<DetailsElementType, bool> UIExtraDataManager::selectorWindowDetailsElements() 463 { 464 /* Load corresponding extra-data: */ 465 const QStringList data = extraDataStringList(GUI_DetailsPageBoxes); 466 467 /* Prepare elements: */ 468 QMap<DetailsElementType, bool> elements; 469 /* Enumerate all the data items: */ 470 foreach (QString strItem, data) 471 { 472 bool fOpened = true; 473 if (strItem.endsWith("Closed", Qt::CaseInsensitive)) 474 { 475 fOpened = false; 476 strItem.remove("Closed"); 477 } 478 DetailsElementType type = gpConverter->fromInternalString<DetailsElementType>(strItem); 479 if (type != DetailsElementType_Invalid) 480 elements[type] = fOpened; 481 } 482 483 /* Return elements: */ 484 return elements; 485 } 486 487 void UIExtraDataManager::setSelectorWindowDetailsElements(const QMap<DetailsElementType, bool> &elements) 488 { 489 /* Prepare corresponding extra-data: */ 490 QStringList data; 491 492 /* Searialize passed elements: */ 493 foreach (DetailsElementType type, elements.keys()) 494 { 495 QString strValue = gpConverter->toInternalString(type); 496 if (!elements[type]) 497 strValue += "Closed"; 498 data << strValue; 499 } 500 501 /* Save corresponding extra-data: */ 502 setExtraDataStringList(GUI_DetailsPageBoxes, data); 503 } 504 505 PreviewUpdateIntervalType UIExtraDataManager::selectorWindowPreviewUpdateInterval() const 506 { 507 return gpConverter->fromInternalString<PreviewUpdateIntervalType>(extraDataString(GUI_PreviewUpdate)); 508 } 509 510 void UIExtraDataManager::setSelectorWindowPreviewUpdateInterval(PreviewUpdateIntervalType interval) 511 { 512 setExtraDataString(GUI_PreviewUpdate, gpConverter->toInternalString(interval)); 513 } 514 515 #ifdef VBOX_WITH_DEBUGGER_GUI 516 QString UIExtraDataManager::debugFlagValue(const QString &strDebugFlagKey) const 517 { 518 return extraDataString(strDebugFlagKey).toLower().trimmed(); 519 } 520 #endif /* VBOX_WITH_DEBUGGER_GUI */ 521 522 QRect UIExtraDataManager::machineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strId) const 523 { 524 /* Choose corresponding key: */ 525 QString strKey; 526 switch (visualStateType) 527 { 528 case UIVisualStateType_Normal: strKey = extraDataKeyPerScreen(GUI_LastNormalWindowPosition, uScreenIndex); break; 529 case UIVisualStateType_Scale: strKey = extraDataKeyPerScreen(GUI_LastScaleWindowPosition, uScreenIndex); break; 530 default: AssertFailedReturn(QRect()); 531 } 532 533 /* Load corresponding extra-data: */ 534 const QStringList data = extraDataStringList(strKey, strId); 916 return !isFeatureRestricted(GUI_Accelerate2D_PixformatYV12, strID); 917 } 918 919 bool UIExtraDataManager::usePixelFormatUYVY(const QString &strID) const 920 { 921 /* 'True' unless feature restricted: */ 922 return !isFeatureRestricted(GUI_Accelerate2D_PixformatUYVY, strID); 923 } 924 925 bool UIExtraDataManager::usePixelFormatYUY2(const QString &strID) const 926 { 927 /* 'True' unless feature restricted: */ 928 return !isFeatureRestricted(GUI_Accelerate2D_PixformatYUY2, strID); 929 } 930 931 bool UIExtraDataManager::usePixelFormatAYUV(const QString &strID) const 932 { 933 /* 'True' unless feature restricted: */ 934 return !isFeatureRestricted(GUI_Accelerate2D_PixformatAYUV, strID); 935 } 936 #endif /* VBOX_WITH_VIDEOHWACCEL */ 937 938 HiDPIOptimizationType UIExtraDataManager::hiDPIOptimizationType(const QString &strID) const 939 { 940 return gpConverter->fromInternalString<HiDPIOptimizationType>(extraDataString(GUI_HiDPI_Optimization, strID)); 941 } 942 943 bool UIExtraDataManager::miniToolbarEnabled(const QString &strID) const 944 { 945 /* 'True' unless feature restricted: */ 946 return !isFeatureRestricted(GUI_ShowMiniToolBar, strID); 947 } 948 949 void UIExtraDataManager::setMiniToolbarEnabled(bool fEnabled, const QString &strID) 950 { 951 /* 'False' if feature restricted, null-string otherwise: */ 952 setExtraDataString(GUI_ShowMiniToolBar, toFeatureRestricted(!fEnabled), strID); 953 } 954 955 bool UIExtraDataManager::autoHideMiniToolbar(const QString &strID) const 956 { 957 /* 'True' unless feature restricted: */ 958 return !isFeatureRestricted(GUI_MiniToolBarAutoHide, strID); 959 } 960 961 void UIExtraDataManager::setAutoHideMiniToolbar(bool fAutoHide, const QString &strID) 962 { 963 /* 'False' if feature restricted, null-string otherwise: */ 964 setExtraDataString(GUI_MiniToolBarAutoHide, toFeatureRestricted(!fAutoHide), strID); 965 } 966 967 Qt::AlignmentFlag UIExtraDataManager::miniToolbarAlignment(const QString &strID) const 968 { 969 /* Return Qt::AlignBottom unless MiniToolbarAlignment_Top specified separately: */ 970 switch (gpConverter->fromInternalString<MiniToolbarAlignment>(extraDataString(GUI_MiniToolBarAlignment, strID))) 971 { 972 case MiniToolbarAlignment_Top: return Qt::AlignTop; 973 default: break; 974 } 975 return Qt::AlignBottom; 976 } 977 978 void UIExtraDataManager::setMiniToolbarAlignment(Qt::AlignmentFlag alignment, const QString &strID) 979 { 980 /* Remove record unless Qt::AlignTop specified separately: */ 981 switch (alignment) 982 { 983 case Qt::AlignTop: setExtraDataString(GUI_MiniToolBarAlignment, gpConverter->toInternalString(MiniToolbarAlignment_Top), strID); return; 984 default: break; 985 } 986 setExtraDataString(GUI_MiniToolBarAlignment, QString(), strID); 987 } 988 989 QList<IndicatorType> UIExtraDataManager::restrictedStatusBarIndicators(const QString &strID) const 990 { 991 /* Prepare result: */ 992 QList<IndicatorType> result; 993 /* Get restricted status-bar-indicators: */ 994 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedStatusBarIndicators, strID)) 995 { 996 IndicatorType value = gpConverter->fromInternalString<IndicatorType>(strValue); 997 if (value != IndicatorType_Invalid) 998 result << value; 999 } 1000 /* Return result: */ 1001 return result; 1002 } 1003 1004 #ifdef Q_WS_MAC 1005 bool UIExtraDataManager::presentationModeEnabled(const QString &strID) const 1006 { 1007 /* 'False' unless feature allowed: */ 1008 return isFeatureAllowed(GUI_PresentationModeEnabled, strID); 1009 } 1010 1011 bool UIExtraDataManager::realtimeDockIconUpdateEnabled(const QString &strID) const 1012 { 1013 /* 'True' unless feature restricted: */ 1014 return !isFeatureRestricted(GUI_RealtimeDockIconUpdateEnabled, strID); 1015 } 1016 1017 void UIExtraDataManager::setRealtimeDockIconUpdateEnabled(bool fEnabled, const QString &strID) 1018 { 1019 /* 'False' if feature restricted, null-string otherwise: */ 1020 setExtraDataString(GUI_RealtimeDockIconUpdateEnabled, toFeatureRestricted(!fEnabled), strID); 1021 } 1022 1023 int UIExtraDataManager::realtimeDockIconUpdateMonitor(const QString &strID) const 1024 { 1025 return extraDataString(GUI_RealtimeDockIconUpdateMonitor, strID).toInt(); 1026 } 1027 1028 void UIExtraDataManager::setRealtimeDockIconUpdateMonitor(int iIndex, const QString &strID) 1029 { 1030 setExtraDataString(GUI_RealtimeDockIconUpdateMonitor, iIndex ? QString::number(iIndex) : QString(), strID); 1031 } 1032 #endif /* Q_WS_MAC */ 1033 1034 bool UIExtraDataManager::passCADtoGuest(const QString &strID) const 1035 { 1036 /* 'False' unless feature allowed: */ 1037 return isFeatureAllowed(GUI_PassCAD, strID); 1038 } 1039 1040 GuruMeditationHandlerType UIExtraDataManager::guruMeditationHandlerType(const QString &strID) const 1041 { 1042 return gpConverter->fromInternalString<GuruMeditationHandlerType>(extraDataString(GUI_GuruMeditationHandler, strID)); 1043 } 1044 1045 bool UIExtraDataManager::hidLedsSyncState(const QString &strID) const 1046 { 1047 /* 'True' unless feature restricted: */ 1048 return !isFeatureRestricted(GUI_HidLedsSync, strID); 1049 } 1050 1051 QRect UIExtraDataManager::informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QString &strID) const 1052 { 1053 /* Get corresponding extra-data: */ 1054 const QStringList data = extraDataStringList(GUI_InformationWindowGeometry, strID); 535 1055 536 1056 /* Parse loaded data: */ … … 550 1070 while (0); 551 1071 552 /* Return geometry (loaded or null): */ 553 return fOk ? QRect(iX, iY, iW, iH) : QRect(); 554 } 555 556 bool UIExtraDataManager::isMachineWindowShouldBeMaximized(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strId) const 557 { 558 /* Choose corresponding key: */ 559 QString strKey; 560 switch (visualStateType) 561 { 562 case UIVisualStateType_Normal: strKey = extraDataKeyPerScreen(GUI_LastNormalWindowPosition, uScreenIndex); break; 563 case UIVisualStateType_Scale: strKey = extraDataKeyPerScreen(GUI_LastScaleWindowPosition, uScreenIndex); break; 564 default: AssertFailedReturn(false); 565 } 566 567 /* Load corresponding extra-data: */ 568 const QStringList data = extraDataStringList(strKey, strId); 1072 /* Use geometry (loaded or default): */ 1073 QRect geometry = fOk ? QRect(iX, iY, iW, iH) : QRect(0, 0, 600, 450); 1074 1075 /* Take hint-widget into account: */ 1076 if (pWidget) 1077 geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint())); 1078 1079 /* Get screen-geometry [of screen with point (iX, iY) if possible]: */ 1080 const QRect screenGeometry = fOk ? QApplication::desktop()->availableGeometry(QPoint(iX, iY)) : 1081 QApplication::desktop()->availableGeometry(); 1082 1083 /* Make sure resulting geometry is within current bounds: */ 1084 geometry = geometry.intersected(screenGeometry); 1085 1086 /* Move default-geometry to pParentWidget' geometry center: */ 1087 if (!fOk && pParentWidget) 1088 geometry.moveCenter(pParentWidget->geometry().center()); 1089 1090 /* Return result: */ 1091 return geometry; 1092 } 1093 1094 bool UIExtraDataManager::informationWindowShouldBeMaximized(const QString &strID) const 1095 { 1096 /* Get corresponding extra-data: */ 1097 const QStringList data = extraDataStringList(GUI_InformationWindowGeometry, strID); 569 1098 570 1099 /* Make sure 5th item has required value: */ … … 572 1101 } 573 1102 574 void UIExtraDataManager::setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QString &strId) 575 { 576 /* Choose corresponding key: */ 577 QString strKey; 578 switch (visualStateType) 579 { 580 case UIVisualStateType_Normal: strKey = extraDataKeyPerScreen(GUI_LastNormalWindowPosition, uScreenIndex); break; 581 case UIVisualStateType_Scale: strKey = extraDataKeyPerScreen(GUI_LastScaleWindowPosition, uScreenIndex); break; 582 default: AssertFailedReturnVoid(); 583 } 584 1103 void UIExtraDataManager::setInformationWindowGeometry(const QRect &geometry, bool fMaximized, const QString &strID) 1104 { 585 1105 /* Serialize passed values: */ 586 1106 QStringList data; … … 593 1113 594 1114 /* Re-cache corresponding extra-data: */ 595 setExtraDataStringList(strKey, data, strId); 596 } 597 598 QSize UIExtraDataManager::lastGuestSizeHint(ulong uScreenIndex, const QString &strId) const 599 { 600 /* Choose corresponding key: */ 601 QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHint, uScreenIndex); 602 603 /* Load corresponding extra-data: */ 604 const QStringList data = extraDataStringList(strKey, strId); 605 606 /* Parse loaded data: */ 607 int iW = 0, iH = 0; 608 bool fOk = data.size() == 2; 609 do 610 { 611 if (!fOk) break; 612 iW = data[0].toInt(&fOk); 613 if (!fOk) break; 614 iH = data[1].toInt(&fOk); 615 } 616 while (0); 617 618 /* Return size (loaded or invalid): */ 619 return fOk ? QSize(iW, iH) : QSize(); 620 } 621 622 void UIExtraDataManager::setLastGuestSizeHint(ulong uScreenIndex, const QSize &size, const QString &strId) 623 { 624 /* Choose corresponding key: */ 625 QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHint, uScreenIndex); 626 627 /* Serialize passed values: */ 628 QStringList data; 629 data << QString::number(size.width()); 630 data << QString::number(size.height()); 631 632 /* Re-cache corresponding extra-data: */ 633 setExtraDataStringList(strKey, data, strId); 634 } 635 636 bool UIExtraDataManager::wasLastGuestSizeHintForFullScreen(ulong uScreenIndex, const QString &strId) const 637 { 638 /* Choose corresponding key: */ 639 const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHintWasFullscreen, uScreenIndex); 640 641 /* True only if was stated directly: */ 642 return isFeatureAllowed(strKey, strId); 643 } 644 645 void UIExtraDataManager::markLastGuestSizeHintAsFullScreen(ulong uScreenIndex, bool fWas, const QString &strId) 646 { 647 /* Choose corresponding key: */ 648 const QString strKey = extraDataKeyPerScreen(GUI_LastGuestSizeHintWasFullscreen, uScreenIndex); 649 650 /* State directly only if was true: */ 651 return setExtraDataString(strKey, toFeatureAllowed(fWas), strId); 652 } 653 654 bool UIExtraDataManager::isFirstRun(const QString &strId) const 655 { 656 return isFeatureAllowed(GUI_FirstRun, strId); 657 } 658 659 void UIExtraDataManager::setFirstRun(bool fIsFirstRun, const QString &strId) 660 { 661 setExtraDataString(GUI_FirstRun, toFeatureAllowed(fIsFirstRun), strId); 662 } 663 664 bool UIExtraDataManager::shouldWeShowMachine(const QString &strID) const 665 { 666 /* Show unless 'forbidden' flag is set: */ 667 return !isFeatureAllowed(GUI_HideFromManager, strID); 668 } 669 670 bool UIExtraDataManager::shouldWeShowMachineDetails(const QString &strID) const 671 { 672 /* Show unless 'forbidden' flag is set: */ 673 return !isFeatureAllowed(GUI_HideDetails, strID); 674 } 675 676 bool UIExtraDataManager::shouldWeAllowMachineReconfiguration(const QString &strID) const 677 { 678 /* Show unless 'forbidden' flag is set: */ 679 return !isFeatureAllowed(GUI_PreventReconfiguration, strID); 680 } 681 682 bool UIExtraDataManager::shouldWeAllowMachineSnapshotOperations(const QString &strID) const 683 { 684 /* Show unless 'forbidden' flag is set: */ 685 return !isFeatureAllowed(GUI_PreventSnapshotOperations, strID); 686 } 687 688 bool UIExtraDataManager::shouldWeAutoMountGuestScreens(const QString &strID) const 689 { 690 /* Show only if 'allowed' flag is set: */ 691 return isFeatureAllowed(GUI_AutomountGuestScreens, strID); 692 } 693 694 RuntimeMenuType UIExtraDataManager::restrictedRuntimeMenuTypes(const QString &strID) const 695 { 696 /* Prepare result: */ 697 RuntimeMenuType result = RuntimeMenuType_Invalid; 698 /* Load restricted runtime-menu-types: */ 699 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeMenus, strID)) 700 { 701 RuntimeMenuType value = gpConverter->fromInternalString<RuntimeMenuType>(strValue); 702 if (value != RuntimeMenuType_Invalid) 703 result = static_cast<RuntimeMenuType>(result | value); 704 } 705 /* Return result: */ 706 return result; 707 } 708 709 #ifdef Q_WS_MAC 710 RuntimeMenuApplicationActionType UIExtraDataManager::restrictedRuntimeMenuApplicationActionTypes(const QString &strID) const 711 { 712 /* Prepare result: */ 713 RuntimeMenuApplicationActionType result = RuntimeMenuApplicationActionType_Invalid; 714 /* Load restricted runtime-application-menu action-types: */ 715 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeApplicationMenuActions, strID)) 716 { 717 RuntimeMenuApplicationActionType value = gpConverter->fromInternalString<RuntimeMenuApplicationActionType>(strValue); 718 if (value != RuntimeMenuApplicationActionType_Invalid) 719 result = static_cast<RuntimeMenuApplicationActionType>(result | value); 720 } 721 /* Return result: */ 722 return result; 723 } 724 #endif /* Q_WS_MAC */ 725 726 RuntimeMenuMachineActionType UIExtraDataManager::restrictedRuntimeMenuMachineActionTypes(const QString &strID) const 727 { 728 /* Prepare result: */ 729 RuntimeMenuMachineActionType result = RuntimeMenuMachineActionType_Invalid; 730 /* Load restricted runtime-machine-menu action-types: */ 731 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeMachineMenuActions, strID)) 732 { 733 RuntimeMenuMachineActionType value = gpConverter->fromInternalString<RuntimeMenuMachineActionType>(strValue); 734 if (value != RuntimeMenuMachineActionType_Invalid) 735 result = static_cast<RuntimeMenuMachineActionType>(result | value); 736 } 737 /* Return result: */ 738 return result; 739 } 740 741 RuntimeMenuViewActionType UIExtraDataManager::restrictedRuntimeMenuViewActionTypes(const QString &strID) const 742 { 743 /* Prepare result: */ 744 RuntimeMenuViewActionType result = RuntimeMenuViewActionType_Invalid; 745 /* Load restricted runtime-view-menu action-types: */ 746 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeViewMenuActions, strID)) 747 { 748 RuntimeMenuViewActionType value = gpConverter->fromInternalString<RuntimeMenuViewActionType>(strValue); 749 if (value != RuntimeMenuViewActionType_Invalid) 750 result = static_cast<RuntimeMenuViewActionType>(result | value); 751 } 752 /* Return result: */ 753 return result; 754 } 755 756 RuntimeMenuDevicesActionType UIExtraDataManager::restrictedRuntimeMenuDevicesActionTypes(const QString &strID) const 757 { 758 /* Prepare result: */ 759 RuntimeMenuDevicesActionType result = RuntimeMenuDevicesActionType_Invalid; 760 /* Load restricted runtime-devices-menu action-types: */ 761 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeDevicesMenuActions, strID)) 762 { 763 RuntimeMenuDevicesActionType value = gpConverter->fromInternalString<RuntimeMenuDevicesActionType>(strValue); 764 if (value != RuntimeMenuDevicesActionType_Invalid) 765 result = static_cast<RuntimeMenuDevicesActionType>(result | value); 766 } 767 /* Return result: */ 768 return result; 769 } 770 771 #ifdef VBOX_WITH_DEBUGGER_GUI 772 RuntimeMenuDebuggerActionType UIExtraDataManager::restrictedRuntimeMenuDebuggerActionTypes(const QString &strID) const 773 { 774 /* Prepare result: */ 775 RuntimeMenuDebuggerActionType result = RuntimeMenuDebuggerActionType_Invalid; 776 /* Load restricted runtime-debugger-menu action-types: */ 777 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeDebuggerMenuActions, strID)) 778 { 779 RuntimeMenuDebuggerActionType value = gpConverter->fromInternalString<RuntimeMenuDebuggerActionType>(strValue); 780 if (value != RuntimeMenuDebuggerActionType_Invalid) 781 result = static_cast<RuntimeMenuDebuggerActionType>(result | value); 782 } 783 /* Return result: */ 784 return result; 785 } 786 #endif /* VBOX_WITH_DEBUGGER_GUI */ 787 788 RuntimeMenuHelpActionType UIExtraDataManager::restrictedRuntimeMenuHelpActionTypes(const QString &strID) const 789 { 790 /* Prepare result: */ 791 RuntimeMenuHelpActionType result = RuntimeMenuHelpActionType_Invalid; 792 /* Load restricted runtime-help-menu action-types: */ 793 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedRuntimeHelpMenuActions, strID)) 794 { 795 RuntimeMenuHelpActionType value = gpConverter->fromInternalString<RuntimeMenuHelpActionType>(strValue); 796 if (value != RuntimeMenuHelpActionType_Invalid) 797 result = static_cast<RuntimeMenuHelpActionType>(result | value); 798 } 799 /* Return result: */ 800 return result; 801 } 802 803 UIVisualStateType UIExtraDataManager::restrictedVisualStates(const QString &strID) const 804 { 805 /* Prepare result: */ 806 UIVisualStateType result = UIVisualStateType_Invalid; 807 /* Load restricted visual-state-types: */ 808 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedVisualStates, strID)) 809 { 810 UIVisualStateType value = gpConverter->fromInternalString<UIVisualStateType>(strValue); 811 if (value != UIVisualStateType_Invalid) 812 result = static_cast<UIVisualStateType>(result | value); 813 } 814 /* Return result: */ 815 return result; 816 } 817 818 UIVisualStateType UIExtraDataManager::requestedVisualState(const QString &strID) const 819 { 820 if (isFeatureAllowed(GUI_Fullscreen, strID)) return UIVisualStateType_Fullscreen; 821 if (isFeatureAllowed(GUI_Seamless, strID)) return UIVisualStateType_Seamless; 822 if (isFeatureAllowed(GUI_Scale, strID)) return UIVisualStateType_Scale; 823 return UIVisualStateType_Normal; 824 } 825 826 void UIExtraDataManager::setRequestedVisualState(UIVisualStateType visualState, const QString &strID) 827 { 828 setExtraDataString(GUI_Fullscreen, toFeatureAllowed(visualState == UIVisualStateType_Fullscreen), strID); 829 setExtraDataString(GUI_Seamless, toFeatureAllowed(visualState == UIVisualStateType_Seamless), strID); 830 setExtraDataString(GUI_Scale, toFeatureAllowed(visualState == UIVisualStateType_Scale), strID); 831 } 832 833 bool UIExtraDataManager::guestScreenAutoResize(const QString &strID) const 834 { 835 /* 'True' unless feature restricted: */ 836 return !isFeatureRestricted(GUI_AutoresizeGuest, strID); 837 } 838 839 void UIExtraDataManager::setGuestScreenAutoResize(bool fEnabled, const QString &strID) 840 { 841 /* 'False' if feature restricted, null-string otherwise: */ 842 setExtraDataString(GUI_AutoresizeGuest, toFeatureRestricted(!fEnabled), strID); 843 } 844 845 #ifdef VBOX_WITH_VIDEOHWACCEL 846 bool UIExtraDataManager::useLinearStretch(const QString &strID) const 847 { 848 /* 'True' unless feature restricted: */ 849 return !isFeatureRestricted(GUI_Accelerate2D_StretchLinear, strID); 850 } 851 852 bool UIExtraDataManager::usePixelFormatYV12(const QString &strID) const 853 { 854 /* 'True' unless feature restricted: */ 855 return !isFeatureRestricted(GUI_Accelerate2D_PixformatYV12, strID); 856 } 857 858 bool UIExtraDataManager::usePixelFormatUYVY(const QString &strID) const 859 { 860 /* 'True' unless feature restricted: */ 861 return !isFeatureRestricted(GUI_Accelerate2D_PixformatUYVY, strID); 862 } 863 864 bool UIExtraDataManager::usePixelFormatYUY2(const QString &strID) const 865 { 866 /* 'True' unless feature restricted: */ 867 return !isFeatureRestricted(GUI_Accelerate2D_PixformatYUY2, strID); 868 } 869 870 bool UIExtraDataManager::usePixelFormatAYUV(const QString &strID) const 871 { 872 /* 'True' unless feature restricted: */ 873 return !isFeatureRestricted(GUI_Accelerate2D_PixformatAYUV, strID); 874 } 875 #endif /* VBOX_WITH_VIDEOHWACCEL */ 876 877 int UIExtraDataManager::hostScreenForPassedGuestScreen(int iGuestScreenIndex, const QString &strID) 878 { 879 /* Choose corresponding key: */ 880 const QString strKey = extraDataKeyPerScreen(GUI_VirtualScreenToHostScreen, iGuestScreenIndex, true); 881 882 /* Load value and convert it to index: */ 883 const QString strValue = extraDataString(strKey, strID); 884 bool fOk = false; 885 const int iHostScreenIndex = strValue.toULong(&fOk); 886 887 /* Return corresponding index: */ 888 return fOk ? iHostScreenIndex : -1; 889 } 890 891 void UIExtraDataManager::setHostScreenForPassedGuestScreen(int iGuestScreenIndex, int iHostScreenIndex, const QString &strID) 892 { 893 /* Choose corresponding key: */ 894 const QString strKey = extraDataKeyPerScreen(GUI_VirtualScreenToHostScreen, iGuestScreenIndex, true); 895 896 /* Save passed index under corresponding value: */ 897 setExtraDataString(strKey, iHostScreenIndex != -1 ? QString::number(iHostScreenIndex) : QString(), strID); 898 } 899 900 QList<IndicatorType> UIExtraDataManager::restrictedStatusBarIndicators(const QString &strID) const 901 { 902 /* Prepare result: */ 903 QList<IndicatorType> result; 904 /* Load restricted status-bar-indicators: */ 905 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedStatusBarIndicators, strID)) 906 { 907 IndicatorType value = gpConverter->fromInternalString<IndicatorType>(strValue); 908 if (value != IndicatorType_Invalid) 909 result << value; 910 } 911 /* Return result: */ 912 return result; 913 } 914 915 QList<GlobalSettingsPageType> UIExtraDataManager::restrictedGlobalSettingsPages() const 916 { 917 /* Prepare result: */ 918 QList<GlobalSettingsPageType> result; 919 /* Load restricted global-settings-pages: */ 920 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedGlobalSettingsPages)) 921 { 922 GlobalSettingsPageType value = gpConverter->fromInternalString<GlobalSettingsPageType>(strValue); 923 if (value != GlobalSettingsPageType_Invalid) 924 result << value; 925 } 926 /* Return result: */ 927 return result; 928 } 929 930 QList<MachineSettingsPageType> UIExtraDataManager::restrictedMachineSettingsPages(const QString &strID) const 931 { 932 /* Prepare result: */ 933 QList<MachineSettingsPageType> result; 934 /* Load restricted machine-settings-pages: */ 935 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedMachineSettingsPages, strID)) 936 { 937 MachineSettingsPageType value = gpConverter->fromInternalString<MachineSettingsPageType>(strValue); 938 if (value != MachineSettingsPageType_Invalid) 939 result << value; 940 } 941 /* Return result: */ 942 return result; 943 } 944 945 #ifndef Q_WS_MAC 946 QStringList UIExtraDataManager::machineWindowIconNames(const QString &strID) const 947 { 948 return extraDataStringList(GUI_MachineWindowIcons, strID); 949 } 950 951 QString UIExtraDataManager::machineWindowNamePostfix(const QString &strID) const 952 { 953 return extraDataString(GUI_MachineWindowNamePostfix, strID); 954 } 955 #endif /* !Q_WS_MAC */ 956 957 QRect UIExtraDataManager::informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QString &strID) const 958 { 959 /* Load corresponding extra-data: */ 960 const QStringList data = extraDataStringList(GUI_Geometry_InformationWindow, strID); 961 962 /* Parse loaded data: */ 963 int iX = 0, iY = 0, iW = 0, iH = 0; 964 bool fOk = data.size() >= 4; 965 do 966 { 967 if (!fOk) break; 968 iX = data[0].toInt(&fOk); 969 if (!fOk) break; 970 iY = data[1].toInt(&fOk); 971 if (!fOk) break; 972 iW = data[2].toInt(&fOk); 973 if (!fOk) break; 974 iH = data[3].toInt(&fOk); 975 } 976 while (0); 977 978 /* Use geometry (loaded or default): */ 979 QRect geometry = fOk ? QRect(iX, iY, iW, iH) : QRect(0, 0, 600, 450); 980 981 /* Take hint-widget into account: */ 982 if (pWidget) 983 geometry.setSize(geometry.size().expandedTo(pWidget->minimumSizeHint())); 984 985 /* Get screen-geometry [of screen with point (iX, iY) if possible]: */ 986 const QRect screenGeometry = fOk ? QApplication::desktop()->availableGeometry(QPoint(iX, iY)) : 987 QApplication::desktop()->availableGeometry(); 988 989 /* Make sure resulting geometry is within current bounds: */ 990 geometry = geometry.intersected(screenGeometry); 991 992 /* Move default-geometry to pParentWidget' geometry center: */ 993 if (!fOk && pParentWidget) 994 geometry.moveCenter(pParentWidget->geometry().center()); 995 996 /* Return result: */ 997 return geometry; 998 } 999 1000 bool UIExtraDataManager::isInformationWindowShouldBeMaximized(const QString &strID) const 1001 { 1002 /* Load corresponding extra-data: */ 1003 const QStringList data = extraDataStringList(GUI_Geometry_InformationWindow, strID); 1004 1005 /* Make sure 5th item has required value: */ 1006 return data.size() == 5 && data[4] == GUI_Geometry_State_Max; 1007 } 1008 1009 void UIExtraDataManager::setInformationWindowGeometry(const QRect &geometry, bool fMaximized, const QString &strID) 1010 { 1011 /* Serialize passed values: */ 1012 QStringList data; 1013 data << QString::number(geometry.x()); 1014 data << QString::number(geometry.y()); 1015 data << QString::number(geometry.width()); 1016 data << QString::number(geometry.height()); 1017 if (fMaximized) 1018 data << GUI_Geometry_State_Max; 1019 1020 /* Re-cache corresponding extra-data: */ 1021 setExtraDataStringList(GUI_Geometry_InformationWindow, data, strID); 1022 } 1023 1024 GuruMeditationHandlerType UIExtraDataManager::guruMeditationHandlerType(const QString &strID) const 1025 { 1026 return gpConverter->fromInternalString<GuruMeditationHandlerType>(extraDataString(GUI_GuruMeditationHandler, strID)); 1027 } 1028 1029 HiDPIOptimizationType UIExtraDataManager::hiDPIOptimizationType(const QString &strID) const 1030 { 1031 return gpConverter->fromInternalString<HiDPIOptimizationType>(extraDataString(GUI_HiDPI_Optimization, strID)); 1032 } 1033 1034 bool UIExtraDataManager::passCADtoGuest(const QString &strID) const 1035 { 1036 /* 'False' unless feature allowed: */ 1037 return isFeatureAllowed(GUI_PassCAD, strID); 1038 } 1039 1040 bool UIExtraDataManager::hidLedsSyncState(const QString &strID) const 1041 { 1042 /* 'True' unless feature restricted: */ 1043 return !isFeatureRestricted(GUI_HidLedsSync, strID); 1044 } 1045 1046 bool UIExtraDataManager::showMiniToolbar(const QString &strID) const 1047 { 1048 /* 'True' unless feature restricted: */ 1049 return !isFeatureRestricted(GUI_ShowMiniToolBar, strID); 1050 } 1051 1052 void UIExtraDataManager::setShowMiniToolbar(bool fShown, const QString &strID) 1053 { 1054 /* 'False' if feature restricted, null-string otherwise: */ 1055 setExtraDataString(GUI_ShowMiniToolBar, toFeatureRestricted(!fShown), strID); 1056 } 1057 1058 bool UIExtraDataManager::autoHideMiniToolbar(const QString &strID) const 1059 { 1060 /* 'True' unless feature restricted: */ 1061 return !isFeatureRestricted(GUI_MiniToolBarAutoHide, strID); 1062 } 1063 1064 void UIExtraDataManager::setAutoHideMiniToolbar(bool fAutoHide, const QString &strID) 1065 { 1066 /* 'False' if feature restricted, null-string otherwise: */ 1067 setExtraDataString(GUI_MiniToolBarAutoHide, toFeatureRestricted(!fAutoHide), strID); 1068 } 1069 1070 Qt::AlignmentFlag UIExtraDataManager::miniToolbarAlignment(const QString &strID) const 1071 { 1072 /* Return Qt::AlignBottom unless MiniToolbarAlignment_Top specified separately: */ 1073 switch (gpConverter->fromInternalString<MiniToolbarAlignment>(extraDataString(GUI_MiniToolBarAlignment, strID))) 1074 { 1075 case MiniToolbarAlignment_Top: return Qt::AlignTop; 1076 default: break; 1077 } 1078 return Qt::AlignBottom; 1079 } 1080 1081 void UIExtraDataManager::setMiniToolbarAlignment(Qt::AlignmentFlag alignment, const QString &strID) 1082 { 1083 /* Remove record unless Qt::AlignTop specified separately: */ 1084 switch (alignment) 1085 { 1086 case Qt::AlignTop: setExtraDataString(GUI_MiniToolBarAlignment, gpConverter->toInternalString(MiniToolbarAlignment_Top), strID); return; 1087 default: break; 1088 } 1089 setExtraDataString(GUI_MiniToolBarAlignment, QString(), strID); 1090 } 1091 1092 #ifdef Q_WS_MAC 1093 bool UIExtraDataManager::presentationModeEnabled(const QString &strID) const 1094 { 1095 /* 'False' unless feature allowed: */ 1096 return isFeatureAllowed(GUI_PresentationModeEnabled, strID); 1097 } 1098 1099 bool UIExtraDataManager::realtimeDockIconUpdateEnabled(const QString &strID) const 1100 { 1101 /* 'True' unless feature restricted: */ 1102 return !isFeatureRestricted(GUI_RealtimeDockIconUpdateEnabled, strID); 1103 } 1104 1105 void UIExtraDataManager::setRealtimeDockIconUpdateEnabled(bool fEnabled, const QString &strID) 1106 { 1107 /* 'False' if feature restricted, null-string otherwise: */ 1108 setExtraDataString(GUI_RealtimeDockIconUpdateEnabled, toFeatureRestricted(!fEnabled), strID); 1109 } 1110 1111 int UIExtraDataManager::realtimeDockIconUpdateMonitor(const QString &strID) const 1112 { 1113 return extraDataString(GUI_RealtimeDockIconUpdateMonitor, strID).toInt(); 1114 } 1115 1116 void UIExtraDataManager::setRealtimeDockIconUpdateMonitor(int iIndex, const QString &strID) 1117 { 1118 setExtraDataString(GUI_RealtimeDockIconUpdateMonitor, iIndex ? QString::number(iIndex) : QString(), strID); 1119 } 1120 #endif /* Q_WS_MAC */ 1115 setExtraDataStringList(GUI_InformationWindowGeometry, data, strID); 1116 } 1121 1117 1122 1118 MachineCloseAction UIExtraDataManager::defaultMachineCloseAction(const QString &strID) const … … 1129 1125 /* Prepare result: */ 1130 1126 MachineCloseAction result = MachineCloseAction_Invalid; 1131 /* Loadrestricted machine-close-actions: */1127 /* Get restricted machine-close-actions: */ 1132 1128 foreach (const QString &strValue, extraDataStringList(GUI_RestrictedCloseActions, strID)) 1133 1129 { … … 1154 1150 return extraDataString(GUI_CloseActionHook, strID); 1155 1151 } 1152 1153 #ifdef VBOX_WITH_DEBUGGER_GUI 1154 QString UIExtraDataManager::debugFlagValue(const QString &strDebugFlagKey) const 1155 { 1156 return extraDataString(strDebugFlagKey).toLower().trimmed(); 1157 } 1158 #endif /* VBOX_WITH_DEBUGGER_GUI */ 1156 1159 1157 1160 void UIExtraDataManager::sltExtraDataChange(QString strMachineID, QString strKey, QString strValue) -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r51671 r51679 73 73 static void destroy(); 74 74 75 /** Returns version for which user wants to prevent BETA warning. */ 76 QString preventBETAwarningForVersion() const; 75 /** @name Messaging 76 * @{ */ 77 /** Returns the list of supressed messages for the Message/Popup center frameworks. */ 78 QStringList suppressedMessages() const; 79 /** Defines the @a list of supressed messages for the Message/Popup center frameworks. */ 80 void setSuppressedMessages(const QStringList &list); 81 82 /** Returns the list of messages for the Message/Popup center frameworks with inverted check-box state. */ 83 QStringList messagesWithInvertedOption() const; 84 85 #if !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) 86 /** Returns version for which user wants to prevent BETA build warning. */ 87 QString preventBetaBuildWarningForVersion() const; 88 #endif /* !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) */ 89 /** @} */ 77 90 78 91 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 79 /** Returns whether we should allow Application Update. */ 80 bool shouldWeAllowApplicationUpdate() const; 81 /** Returns last Application Update date. */ 82 QString applicationUpdateData() const; 83 /** Defines last Application Update date as @a strValue. */ 84 void setApplicationUpdateData(const QString &strValue); 85 /** Returns Application Update check counter. */ 86 qulonglong applicationUpdateCheckCounter() const; 87 /** Increments Application Update check counter. */ 88 void incrementApplicationUpdateCheckCounter(); 92 /** @name Application Update 93 * @{ */ 94 /** Returns whether Application Update functionality enabled. */ 95 bool applicationUpdateEnabled() const; 96 97 /** Returns Application Update data. */ 98 QString applicationUpdateData() const; 99 /** Defines Application Update data as @a strValue. */ 100 void setApplicationUpdateData(const QString &strValue); 101 102 /** Returns Application Update check counter. */ 103 qulonglong applicationUpdateCheckCounter() const; 104 /** Increments Application Update check counter. */ 105 void incrementApplicationUpdateCheckCounter(); 106 /** @} */ 89 107 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 90 108 91 /** Returns shortcut overrides for shortcut-pool with @a strPoolExtraDataID. */ 92 QStringList shortcutOverrides(const QString &strPoolExtraDataID) const; 93 94 /** Returns recent hard-drive folder. */ 95 QString recentFolderForHardDrives() const; 96 /** Returns recent optical-disk folder. */ 97 QString recentFolderForOpticalDisks() const; 98 /** Returns recent floppy-disk folder. */ 99 QString recentFolderForFloppyDisks() const; 100 /** Defines recent hard-drive folder as @a strValue. */ 101 void setRecentFolderForHardDrives(const QString &strValue); 102 /** Defines recent optical-disk folder as @a strValue. */ 103 void setRecentFolderForOpticalDisks(const QString &strValue); 104 /** Defines recent floppy-disk folder as @a strValue. */ 105 void setRecentFolderForFloppyDisks(const QString &strValue); 106 107 /** Returns recent hard-drive list. */ 108 QStringList recentListOfHardDrives() const; 109 /** Returns recent optical-disk list. */ 110 QStringList recentListOfOpticalDisks() const; 111 /** Returns recent floppy-disk list. */ 112 QStringList recentListOfFloppyDisks() const; 113 /** Defines recent hard-drive list as @a value. */ 114 void setRecentListOfHardDrives(const QStringList &value); 115 /** Defines recent optical-disk list as @a value. */ 116 void setRecentListOfOpticalDisks(const QStringList &value); 117 /** Defines recent floppy-disk list as @a value. */ 118 void setRecentListOfFloppyDisks(const QStringList &value); 119 120 /** Returns list of the supressed messages for the Message/Popup center frameworks. */ 121 QStringList suppressedMessages() const; 122 /** Defines list of the supressed messages for the Message/Popup center frameworks as @a value. */ 123 void setSuppressedMessages(const QStringList &value); 124 125 /** Returns list of the messages for the Message/Popup center frameworks with inverted check-box state. */ 126 QStringList messagesWithInvertedOption() const; 127 128 /** Returns mode (basic/expert) for wizard of @a type. */ 129 WizardMode modeForWizard(WizardType type); 130 /** Defines @a mode (basic/expert) for wizard of @a type. */ 131 void setModeForWizard(WizardType type, WizardMode mode); 132 133 /** Returns selector-window geometry using @a pWidget as the hint. */ 134 QRect selectorWindowGeometry(QWidget *pWidget) const; 135 /** Returns whether selector-window should be maximized or not. */ 136 bool isSelectorWindowShouldBeMaximized() const; 137 /** Defines selector-window geometry to passed @a geometry which is @a fMaximized. */ 138 void setSelectorWindowGeometry(const QRect &geometry, bool fMaximized); 139 140 /** Returns selector-window splitter hints. */ 141 QList<int> selectorWindowSplitterHints() const; 142 /** Defines selector-window splitter @a hints. */ 143 void setSelectorWindowSplitterHints(const QList<int> &hints); 144 145 /** Returns whether selector-window tool-bar visible. */ 146 bool selectorWindowToolBarVisible() const; 147 /** Defines whether selector-window tool-bar @a fVisible. */ 148 void setSelectorWindowToolBarVisible(bool fVisible); 149 /** Returns whether selector-window status-bar visible. */ 150 bool selectorWindowStatusBarVisible() const; 151 /** Defines whether selector-window status-bar @a fVisible. */ 152 void setSelectorWindowStatusBarVisible(bool fVisible); 153 154 /** Clears all the existing selector-window chooser-pane' group definitions. */ 155 void clearSelectorWindowGroupsDefinitions(); 156 /** Returns selector-window chooser-pane' groups definitions for passed @a strGroupID. */ 157 QStringList selectorWindowGroupsDefinitions(const QString &strGroupID) const; 158 /** Defines selector-window chooser-pane' groups definitions for passed @a strGroupID as @a definitions. */ 159 void setSelectorWindowGroupsDefinitions(const QString &strGroupID, const QStringList &definitions); 160 161 /** Returns last item chosen in selector-window chooser-pane. */ 162 QString selectorWindowLastItemChosen() const; 163 /** Defines last item chosen in selector-window chooser-pane as @a strItemID. */ 164 void setSelectorWindowLastItemChosen(const QString &strItemID); 165 166 /** Returns selector-window details-pane elements. */ 167 QMap<DetailsElementType, bool> selectorWindowDetailsElements(); 168 /** Defines selector-window details-pane @a elements. */ 169 void setSelectorWindowDetailsElements(const QMap<DetailsElementType, bool> &elements); 170 171 /** Returns selector-window preview update interval. */ 172 PreviewUpdateIntervalType selectorWindowPreviewUpdateInterval() const; 173 /** Defines selector-window preview update @a interval. */ 174 void setSelectorWindowPreviewUpdateInterval(PreviewUpdateIntervalType interval); 109 /** @name Settings 110 * @{ */ 111 /** Returns restricted global settings pages. */ 112 QList<GlobalSettingsPageType> restrictedGlobalSettingsPages() const; 113 /** Returns restricted machine settings pages. */ 114 QList<MachineSettingsPageType> restrictedMachineSettingsPages(const QString &strID) const; 115 /** @} */ 116 117 /** @name Settings: Keyboard 118 * @{ */ 119 /** Returns shortcut overrides for shortcut-pool with @a strPoolExtraDataID. */ 120 QStringList shortcutOverrides(const QString &strPoolExtraDataID) const; 121 /** @} */ 122 123 /** @name Settings: Storage 124 * @{ */ 125 /** Returns recent folder for hard-drives. */ 126 QString recentFolderForHardDrives() const; 127 /** Returns recent folder for optical-disks. */ 128 QString recentFolderForOpticalDisks() const; 129 /** Returns recent folder for floppy-disks. */ 130 QString recentFolderForFloppyDisks() const; 131 /** Defines recent folder for hard-drives as @a strValue. */ 132 void setRecentFolderForHardDrives(const QString &strValue); 133 /** Defines recent folder for optical-disk as @a strValue. */ 134 void setRecentFolderForOpticalDisks(const QString &strValue); 135 /** Defines recent folder for floppy-disk as @a strValue. */ 136 void setRecentFolderForFloppyDisks(const QString &strValue); 137 138 /** Returns the list of recently used hard-drives. */ 139 QStringList recentListOfHardDrives() const; 140 /** Returns the list of recently used optical-disk. */ 141 QStringList recentListOfOpticalDisks() const; 142 /** Returns the list of recently used floppy-disk. */ 143 QStringList recentListOfFloppyDisks() const; 144 /** Defines the list of recently used hard-drives as @a value. */ 145 void setRecentListOfHardDrives(const QStringList &value); 146 /** Defines the list of recently used optical-disks as @a value. */ 147 void setRecentListOfOpticalDisks(const QStringList &value); 148 /** Defines the list of recently used floppy-disks as @a value. */ 149 void setRecentListOfFloppyDisks(const QStringList &value); 150 /** @} */ 151 152 /** @name VirtualBox Manager 153 * @{ */ 154 /** Returns selector-window geometry using @a pWidget as the hint. */ 155 QRect selectorWindowGeometry(QWidget *pWidget) const; 156 /** Returns whether selector-window should be maximized. */ 157 bool selectorWindowShouldBeMaximized() const; 158 /** Defines selector-window @a geometry and @a fMaximized state. */ 159 void setSelectorWindowGeometry(const QRect &geometry, bool fMaximized); 160 161 /** Returns selector-window splitter hints. */ 162 QList<int> selectorWindowSplitterHints() const; 163 /** Defines selector-window splitter @a hints. */ 164 void setSelectorWindowSplitterHints(const QList<int> &hints); 165 166 /** Returns whether selector-window tool-bar visible. */ 167 bool selectorWindowToolBarVisible() const; 168 /** Defines whether selector-window tool-bar @a fVisible. */ 169 void setSelectorWindowToolBarVisible(bool fVisible); 170 171 /** Returns whether selector-window status-bar visible. */ 172 bool selectorWindowStatusBarVisible() const; 173 /** Defines whether selector-window status-bar @a fVisible. */ 174 void setSelectorWindowStatusBarVisible(bool fVisible); 175 176 /** Clears all the existing selector-window chooser-pane' group definitions. */ 177 void clearSelectorWindowGroupsDefinitions(); 178 /** Returns selector-window chooser-pane' groups definitions for passed @a strGroupID. */ 179 QStringList selectorWindowGroupsDefinitions(const QString &strGroupID) const; 180 /** Defines selector-window chooser-pane' groups @a definitions for passed @a strGroupID. */ 181 void setSelectorWindowGroupsDefinitions(const QString &strGroupID, const QStringList &definitions); 182 183 /** Returns last-item ID of the item chosen in selector-window chooser-pane. */ 184 QString selectorWindowLastItemChosen() const; 185 /** Defines @a lastItemID of the item chosen in selector-window chooser-pane. */ 186 void setSelectorWindowLastItemChosen(const QString &strItemID); 187 188 /** Returns selector-window details-pane' elements. */ 189 QMap<DetailsElementType, bool> selectorWindowDetailsElements(); 190 /** Defines selector-window details-pane' @a elements. */ 191 void setSelectorWindowDetailsElements(const QMap<DetailsElementType, bool> &elements); 192 193 /** Returns selector-window details-pane' preview update interval. */ 194 PreviewUpdateIntervalType selectorWindowPreviewUpdateInterval() const; 195 /** Defines selector-window details-pane' preview update @a interval. */ 196 void setSelectorWindowPreviewUpdateInterval(PreviewUpdateIntervalType interval); 197 /** @} */ 198 199 /** @name Wizards 200 * @{ */ 201 /** Returns mode for wizard of passed @a type. */ 202 WizardMode modeForWizardType(WizardType type); 203 /** Defines @a mode for wizard of passed @a type. */ 204 void setModeForWizardType(WizardType type, WizardMode mode); 205 /** @} */ 206 207 /** @name Virtual Machine 208 * @{ */ 209 /** Returns whether machine should be shown in selector-window chooser-pane. */ 210 bool showMachineInSelectorChooser(const QString &strID) const; 211 /** Returns whether machine should be shown in selector-window details-pane. */ 212 bool showMachineInSelectorDetails(const QString &strID) const; 213 214 /** Returns whether machine reconfiguration enabled. */ 215 bool machineReconfigurationEnabled(const QString &strID) const; 216 /** Returns whether machine snapshot operations enabled. */ 217 bool machineSnapshotOperationsEnabled(const QString &strID) const; 218 219 /** Returns whether this machine is first time started. */ 220 bool machineFirstTimeStarted(const QString &strID) const; 221 /** Returns whether this machine is fFirstTimeStarted. */ 222 void setMachineFirstTimeStarted(bool fFirstTimeStarted, const QString &strID); 223 224 #ifndef Q_WS_MAC 225 /** Except Mac OS X: Returns redefined machine-window icon names. */ 226 QStringList machineWindowIconNames(const QString &strID) const; 227 /** Except Mac OS X: Returns redefined machine-window name postfix. */ 228 QString machineWindowNamePostfix(const QString &strID) const; 229 #endif /* !Q_WS_MAC */ 230 231 /** Returns geometry for machine-window with @a uScreenIndex in @a visualStateType. */ 232 QRect machineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strID) const; 233 /** Returns whether machine-window with @a uScreenIndex in @a visualStateType should be maximized. */ 234 bool machineWindowShouldBeMaximized(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strID) const; 235 /** Defines @a geometry and @a fMaximized state for machine-window with @a uScreenIndex in @a visualStateType. */ 236 void setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QString &strID); 237 238 /** Returns restricted Runtime UI menu types. */ 239 RuntimeMenuType restrictedRuntimeMenuTypes(const QString &strID) const; 240 #ifdef Q_WS_MAC 241 /** Mac OS X: Returns restricted Runtime UI action types for Application menu. */ 242 RuntimeMenuApplicationActionType restrictedRuntimeMenuApplicationActionTypes(const QString &strID) const; 243 #endif /* Q_WS_MAC */ 244 /** Returns restricted Runtime UI action types for Machine menu. */ 245 RuntimeMenuMachineActionType restrictedRuntimeMenuMachineActionTypes(const QString &strID) const; 246 /** Returns restricted Runtime UI action types for View menu. */ 247 RuntimeMenuViewActionType restrictedRuntimeMenuViewActionTypes(const QString &strID) const; 248 /** Returns restricted Runtime UI action types for Devices menu. */ 249 RuntimeMenuDevicesActionType restrictedRuntimeMenuDevicesActionTypes(const QString &strID) const; 250 #ifdef VBOX_WITH_DEBUGGER_GUI 251 /** Returns restricted Runtime UI action types for Debugger menu. */ 252 RuntimeMenuDebuggerActionType restrictedRuntimeMenuDebuggerActionTypes(const QString &strID) const; 253 #endif /* VBOX_WITH_DEBUGGER_GUI */ 254 /** Returns restricted Runtime UI action types for Help menu. */ 255 RuntimeMenuHelpActionType restrictedRuntimeMenuHelpActionTypes(const QString &strID) const; 256 257 /** Returns restricted Runtime UI visual-states. */ 258 UIVisualStateType restrictedVisualStates(const QString &strID) const; 259 260 /** Returns requested Runtime UI visual-state. */ 261 UIVisualStateType requestedVisualState(const QString &strID) const; 262 /** Defines requested Runtime UI visual-state as @a visualState. */ 263 void setRequestedVisualState(UIVisualStateType visualState, const QString &strID); 264 265 /** Returns whether guest-screen auto-resize according machine-window size is enabled. */ 266 bool guestScreenAutoResizeEnabled(const QString &strID) const; 267 /** Defines whether guest-screen auto-resize according machine-window size is @a fEnabled. */ 268 void setGuestScreenAutoResizeEnabled(bool fEnabled, const QString &strID); 269 270 /** Returns last guest-screen size-hint for screen with @a uScreenIndex. */ 271 QSize lastGuestSizeHint(ulong uScreenIndex, const QString &strID) const; 272 /** Defines last guest-screen @a sizeHint for screen with @a uScreenIndex. */ 273 void setLastGuestSizeHint(ulong uScreenIndex, const QSize &sizeHint, const QString &strID); 274 /** Returns whether guest size-hint was for full or seamless screen with @a uScreenIndex. */ 275 bool wasLastGuestSizeHintForFullScreen(ulong uScreenIndex, const QString &strID) const; 276 /** Defines whether guest size-hint @a fWas for full or seamless screen with @a uScreenIndex. */ 277 void markLastGuestSizeHintAsFullScreen(ulong uScreenIndex, bool fWas, const QString &strID); 278 279 /** Returns host-screen index corresponding to passed guest-screen @a iGuestScreenIndex. */ 280 int hostScreenForPassedGuestScreen(int iGuestScreenIndex, const QString &strID); 281 /** Defines @a iHostScreenIndex corresponding to passed guest-screen @a iGuestScreenIndex. */ 282 void setHostScreenForPassedGuestScreen(int iGuestScreenIndex, int iHostScreenIndex, const QString &strID); 283 284 /** Returns whether automatic mounting/unmounting of guest-screens enabled. */ 285 bool autoMountGuestScreensEnabled(const QString &strID) const; 286 287 #ifdef VBOX_WITH_VIDEOHWACCEL 288 /** Returns whether 2D acceleration should use linear sretch. */ 289 bool useLinearStretch(const QString &strID) const; 290 /** Returns whether 2D acceleration should use YV12 pixel format. */ 291 bool usePixelFormatYV12(const QString &strID) const; 292 /** Returns whether 2D acceleration should use UYVY pixel format. */ 293 bool usePixelFormatUYVY(const QString &strID) const; 294 /** Returns whether 2D acceleration should use YUY2 pixel format. */ 295 bool usePixelFormatYUY2(const QString &strID) const; 296 /** Returns whether 2D acceleration should use AYUV pixel format. */ 297 bool usePixelFormatAYUV(const QString &strID) const; 298 #endif /* VBOX_WITH_VIDEOHWACCEL */ 299 300 /** Returns Runtime UI HiDPI optimization type. */ 301 HiDPIOptimizationType hiDPIOptimizationType(const QString &strID) const; 302 303 /** Returns whether mini-toolbar is enabled for full and seamless screens. */ 304 bool miniToolbarEnabled(const QString &strID) const; 305 /** Defines whether mini-toolbar is @a fEnabled for full and seamless screens. */ 306 void setMiniToolbarEnabled(bool fEnabled, const QString &strID); 307 308 /** Returns whether mini-toolbar should auto-hide itself. */ 309 bool autoHideMiniToolbar(const QString &strID) const; 310 /** Defines whether mini-toolbar should @a fAutoHide itself. */ 311 void setAutoHideMiniToolbar(bool fAutoHide, const QString &strID); 312 313 /** Returns mini-toolbar alignment. */ 314 Qt::AlignmentFlag miniToolbarAlignment(const QString &strID) const; 315 /** Returns mini-toolbar @a alignment. */ 316 void setMiniToolbarAlignment(Qt::AlignmentFlag alignment, const QString &strID); 317 318 /** Returns restricted Runtime UI status-bar indicators. */ 319 QList<IndicatorType> restrictedStatusBarIndicators(const QString &strID) const; 320 321 #ifdef Q_WS_MAC 322 /** Mac OS X: Returns whether 'presentation mode' enabled. */ 323 bool presentationModeEnabled(const QString &strID) const; 324 325 /** Mac OS X: Returns whether Dock icon should be updated at runtime. */ 326 bool realtimeDockIconUpdateEnabled(const QString &strID) const; 327 /** Mac OS X: Defines whether Dock icon update should be fEnabled at runtime. */ 328 void setRealtimeDockIconUpdateEnabled(bool fEnabled, const QString &strID); 329 330 /** Mac OS X: Returns guest-screen which Dock icon should reflect at runtime. */ 331 int realtimeDockIconUpdateMonitor(const QString &strID) const; 332 /** Mac OS X: Defines guest-screen @a iIndex which Dock icon should reflect at runtime. */ 333 void setRealtimeDockIconUpdateMonitor(int iIndex, const QString &strID); 334 #endif /* Q_WS_MAC */ 335 336 /** Returns whether machine should pass CAD to guest. */ 337 bool passCADtoGuest(const QString &strID) const; 338 339 /** Returns redefined guru-meditation handler type. */ 340 GuruMeditationHandlerType guruMeditationHandlerType(const QString &strID) const; 341 342 /** Returns whether machine should perform HID LEDs synchronization. */ 343 bool hidLedsSyncState(const QString &strID) const; 344 /** @} */ 345 346 /** @name Virtual Machine: Information dialog 347 * @{ */ 348 /** Returns information-window geometry using @a pWidget and @a pParentWidget as hints. */ 349 QRect informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QString &strID) const; 350 /** Returns whether information-window should be maximized or not. */ 351 bool informationWindowShouldBeMaximized(const QString &strID) const; 352 /** Defines information-window @a geometry and @a fMaximized state. */ 353 void setInformationWindowGeometry(const QRect &geometry, bool fMaximized, const QString &strID); 354 /** @} */ 355 356 /** @name Virtual Machine: Close dialog 357 * @{ */ 358 /** Returns default machine close action. */ 359 MachineCloseAction defaultMachineCloseAction(const QString &strID) const; 360 /** Returns restricted machine close actions. */ 361 MachineCloseAction restrictedMachineCloseActions(const QString &strID) const; 362 363 /** Returns last machine close action. */ 364 MachineCloseAction lastMachineCloseAction(const QString &strID) const; 365 /** Defines last @a machineCloseAction. */ 366 void setLastMachineCloseAction(MachineCloseAction machineCloseAction, const QString &strID); 367 368 /** Returns machine close hook script name as simple string. */ 369 QString machineCloseHookScript(const QString &strID) const; 370 /** @} */ 175 371 176 372 #ifdef VBOX_WITH_DEBUGGER_GUI 177 /** Returns debug flag value for passed @a strDebugFlagKey. */ 178 QString debugFlagValue(const QString &strDebugFlagKey) const; 373 /** @name Virtual Machine: Debug UI 374 * @{ */ 375 /** Returns debug flag value for passed @a strDebugFlagKey. */ 376 QString debugFlagValue(const QString &strDebugFlagKey) const; 377 /** @} */ 179 378 #endif /* VBOX_WITH_DEBUGGER_GUI */ 180 181 /** Returns geometry for machine-window with @a uScreenIndex in @a visualStateType. */182 QRect machineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strId) const;183 /** Returns whether machine-window with @a uScreenIndex in @a visualStateType should be maximized or not. */184 bool isMachineWindowShouldBeMaximized(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strId) const;185 /** Defines geometry for machine-window with @a uScreenIndex in @a visualStateType as @a geometry and @a fMaximized. */186 void setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QString &strId);187 188 /** Returns last guest-screen size-hint for screen with @a uScreenIndex. */189 QSize lastGuestSizeHint(ulong uScreenIndex, const QString &strId) const;190 /** Defines last guest-screen size-hint for screen with @a uScreenIndex as @a size. */191 void setLastGuestSizeHint(ulong uScreenIndex, const QSize &size, const QString &strId);192 /** Returns whether guest size hint was for full or seamless screen with @a uScreenIndex. */193 bool wasLastGuestSizeHintForFullScreen(ulong uScreenIndex, const QString &strId) const;194 /** Defines whether guest size hint @a fWas for full or seamless screen with @a uScreenIndex. */195 void markLastGuestSizeHintAsFullScreen(ulong uScreenIndex, bool fWas, const QString &strId);196 197 /** Returns whether this machine started for the first time. */198 bool isFirstRun(const QString &strId) const;199 /** Defines whether this machine started for the first time. */200 void setFirstRun(bool fIsFirstRun, const QString &strId);201 202 /** Returns whether we should show machine. */203 bool shouldWeShowMachine(const QString &strID) const;204 /** Returns whether we should show machine details. */205 bool shouldWeShowMachineDetails(const QString &strID) const;206 207 /** Returns whether we should allow machine reconfiguration. */208 bool shouldWeAllowMachineReconfiguration(const QString &strID) const;209 /** Returns whether we should allow machine snapshot operations. */210 bool shouldWeAllowMachineSnapshotOperations(const QString &strID) const;211 212 /** Returns whether we should automatically mount/unmount guest-screens. */213 bool shouldWeAutoMountGuestScreens(const QString &strID) const;214 215 /** Returns restricted Runtime UI menu types. */216 RuntimeMenuType restrictedRuntimeMenuTypes(const QString &strID) const;217 #ifdef Q_WS_MAC218 /** Mac OS X: Returns restricted Runtime UI action types for Application menu. */219 RuntimeMenuApplicationActionType restrictedRuntimeMenuApplicationActionTypes(const QString &strID) const;220 #endif /* Q_WS_MAC */221 /** Returns restricted Runtime UI action types for Machine menu. */222 RuntimeMenuMachineActionType restrictedRuntimeMenuMachineActionTypes(const QString &strID) const;223 /** Returns restricted Runtime UI action types for View menu. */224 RuntimeMenuViewActionType restrictedRuntimeMenuViewActionTypes(const QString &strID) const;225 /** Returns restricted Runtime UI action types for Devices menu. */226 RuntimeMenuDevicesActionType restrictedRuntimeMenuDevicesActionTypes(const QString &strID) const;227 #ifdef VBOX_WITH_DEBUGGER_GUI228 /** Returns restricted Runtime UI action types for Debugger menu. */229 RuntimeMenuDebuggerActionType restrictedRuntimeMenuDebuggerActionTypes(const QString &strID) const;230 #endif /* VBOX_WITH_DEBUGGER_GUI */231 /** Returns restricted Runtime UI action types for Help menu. */232 RuntimeMenuHelpActionType restrictedRuntimeMenuHelpActionTypes(const QString &strID) const;233 234 /** Returns restricted Runtime UI visual-states. */235 UIVisualStateType restrictedVisualStates(const QString &strID) const;236 237 /** Returns requested Runtime UI visual-state. */238 UIVisualStateType requestedVisualState(const QString &strID) const;239 /** Defines requested Runtime UI visual-state as @a visualState. */240 void setRequestedVisualState(UIVisualStateType visualState, const QString &strID);241 242 /** Returns host-screen index corresponding to passed guest-screen @a iGuestScreenIndex. */243 int hostScreenForPassedGuestScreen(int iGuestScreenIndex, const QString &strID);244 /** Defines host-screen index corresponding to passed guest-screen @a iGuestScreenIndex as @a iHostScreenIndex. */245 void setHostScreenForPassedGuestScreen(int iGuestScreenIndex, int iHostScreenIndex, const QString &strID);246 247 /** Returns whether guest-screen should auto-resize according machine-window size. */248 bool guestScreenAutoResize(const QString &strID) const;249 /** Defines whether guest-screen auto-resize according machine-window size is @a fEnabled. */250 void setGuestScreenAutoResize(bool fEnabled, const QString &strID);251 252 #ifdef VBOX_WITH_VIDEOHWACCEL253 /** Returns whether 2D acceleration should use linear sretch. */254 bool useLinearStretch(const QString &strID) const;255 /** Returns whether 2D acceleration should use YV12 pixel format. */256 bool usePixelFormatYV12(const QString &strID) const;257 /** Returns whether 2D acceleration should use UYVY pixel format. */258 bool usePixelFormatUYVY(const QString &strID) const;259 /** Returns whether 2D acceleration should use YUY2 pixel format. */260 bool usePixelFormatYUY2(const QString &strID) const;261 /** Returns whether 2D acceleration should use AYUV pixel format. */262 bool usePixelFormatAYUV(const QString &strID) const;263 #endif /* VBOX_WITH_VIDEOHWACCEL */264 265 /** Returns restricted Runtime UI status-bar indicators. */266 QList<IndicatorType> restrictedStatusBarIndicators(const QString &strID) const;267 268 /** Returns global settings pages. */269 QList<GlobalSettingsPageType> restrictedGlobalSettingsPages() const;270 /** Returns machine settings pages. */271 QList<MachineSettingsPageType> restrictedMachineSettingsPages(const QString &strID) const;272 273 #ifndef Q_WS_MAC274 /** Except Mac OS X: Returns redefined machine-window icon names. */275 QStringList machineWindowIconNames(const QString &strID) const;276 /** Except Mac OS X: Returns redefined machine-window name postfix. */277 QString machineWindowNamePostfix(const QString &strID) const;278 #endif /* !Q_WS_MAC */279 280 /** Returns information-window geometry using @a pWidget and @a pParentWidget as hints. */281 QRect informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QString &strID) const;282 /** Returns whether information-window should be maximized or not. */283 bool isInformationWindowShouldBeMaximized(const QString &strID) const;284 /** Defines information-window geometry to passed @a geometry which is @a fMaximized. */285 void setInformationWindowGeometry(const QRect &geometry, bool fMaximized, const QString &strID);286 287 /** Returns redefined guru-meditation handler type. */288 GuruMeditationHandlerType guruMeditationHandlerType(const QString &strID) const;289 290 /** Returns Runtime UI HiDPI optimization type. */291 HiDPIOptimizationType hiDPIOptimizationType(const QString &strID) const;292 293 /** Returns whether VM should pass CAD to guest. */294 bool passCADtoGuest(const QString &strID) const;295 296 /** Returns whether VM should perform HID LEDs synchronization. */297 bool hidLedsSyncState(const QString &strID) const;298 299 /** Returns whether mini-toolbar should be shown for full and seamless screens. */300 bool showMiniToolbar(const QString &strID) const;301 /** Defines whether mini-toolbar should be @a fShown for full and seamless screens. */302 void setShowMiniToolbar(bool fShown, const QString &strID);303 304 /** Returns whether mini-toolbar should auto-hide itself. */305 bool autoHideMiniToolbar(const QString &strID) const;306 /** Defines whether mini-toolbar should @a fAutoHide itself. */307 void setAutoHideMiniToolbar(bool fAutoHide, const QString &strID);308 309 /** Returns mini-toolbar alignment. */310 Qt::AlignmentFlag miniToolbarAlignment(const QString &strID) const;311 /** Returns mini-toolbar @a alignment. */312 void setMiniToolbarAlignment(Qt::AlignmentFlag alignment, const QString &strID);313 314 #ifdef Q_WS_MAC315 /** Mac OS X: Returns whether 'presentation mode' should be enabled. */316 bool presentationModeEnabled(const QString &strID) const;317 318 /** Mac OS X: Returns whether Dock icon should be updated at runtime. */319 bool realtimeDockIconUpdateEnabled(const QString &strID) const;320 /** Mac OS X: Defines whether Dock icon update should be fEnabled at runtime. */321 void setRealtimeDockIconUpdateEnabled(bool fEnabled, const QString &strID);322 323 /** Mac OS X: Returns guest-screen which Dock icon should reflect at runtime. */324 int realtimeDockIconUpdateMonitor(const QString &strID) const;325 /** Mac OS X: Defines guest-screen @a iIndex which Dock icon should reflect at runtime. */326 void setRealtimeDockIconUpdateMonitor(int iIndex, const QString &strID);327 #endif /* Q_WS_MAC */328 329 /** Returns default machine close action. */330 MachineCloseAction defaultMachineCloseAction(const QString &strID) const;331 /** Returns restricted machine close actions. */332 MachineCloseAction restrictedMachineCloseActions(const QString &strID) const;333 334 /** Returns last machine close action. */335 MachineCloseAction lastMachineCloseAction(const QString &strID) const;336 /** Defines last @a machineCloseAction. */337 void setLastMachineCloseAction(MachineCloseAction machineCloseAction, const QString &strID);338 339 /** Returns machine close hook script name as simple string. */340 QString machineCloseHookScript(const QString &strID) const;341 379 342 380 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r51207 r51679 374 374 } 375 375 376 void UIMessageCenter::showB ETAWarning() const376 void UIMessageCenter::showBetaBuildWarning() const 377 377 { 378 378 alert(0, MessageType_Warning, … … 381 381 } 382 382 383 void UIMessageCenter::show BEBWarning() const383 void UIMessageCenter::showExperimentalBuildWarning() const 384 384 { 385 385 alert(0, MessageType_Warning, -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r50719 r51679 153 153 #endif /* RT_OS_LINUX */ 154 154 void cannotStartSelector() const; 155 void showB ETAWarning() const;156 void show BEBWarning() const;155 void showBetaBuildWarning() const; 156 void showExperimentalBuildWarning() const; 157 157 158 158 /* API: COM startup warnings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r51404 r51679 502 502 503 503 #ifdef VBOX_BLEEDING_EDGE 504 msgCenter().show BEBWarning();504 msgCenter().showExperimentalBuildWarning(); 505 505 #else /* VBOX_BLEEDING_EDGE */ 506 506 # ifndef DEBUG 507 507 /* Check for BETA version: */ 508 QString vboxVersion(vboxGlobal().virtualBox().GetVersion()); 509 if (vboxVersion.contains("BETA")) 510 { 511 /* Allow to prevent this message: */ 512 if (gEDataManager->preventBETAwarningForVersion() != vboxVersion) 513 msgCenter().showBETAWarning(); 514 } 508 const QString vboxVersion(vboxGlobal().virtualBox().GetVersion()); 509 if ( vboxVersion.contains("BETA") 510 && gEDataManager->preventBetaBuildWarningForVersion() != vboxVersion) 511 msgCenter().showBetaBuildWarning(); 515 512 # endif /* !DEBUG */ 516 513 #endif /* !VBOX_BLEEDING_EDGE*/ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r51289 r51679 278 278 279 279 /* Finally, we are checking if current machine overrides this flag: */ 280 if (m_fAttachedToHiddenMachinesOnly && gEDataManager->sho uldWeShowMachine(strMachineID))280 if (m_fAttachedToHiddenMachinesOnly && gEDataManager->showMachineInSelectorChooser(strMachineID)) 281 281 m_fAttachedToHiddenMachinesOnly = false; 282 282 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
r51216 r51679 442 442 #ifdef VBOX_WITH_UPDATE_REQUEST 443 443 /* Ask updater to check for the first time: */ 444 if (gEDataManager->shouldWeAllowApplicationUpdate() && 445 !vboxGlobal().isVMConsoleProcess()) 444 if (gEDataManager->applicationUpdateEnabled() && !vboxGlobal().isVMConsoleProcess()) 446 445 QTimer::singleShot(0, this, SLOT(sltCheckIfUpdateIsNecessary())); 447 446 #endif /* VBOX_WITH_UPDATE_REQUEST */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r51621 r51679 80 80 * and all guests screens need there own host screen. */ 81 81 CDisplay display = m_pMachineLogic->session().GetConsole().GetDisplay(); 82 bool fShouldWeAutoMountGuestScreens = gEDataManager-> shouldWeAutoMountGuestScreens(vboxGlobal().managedVMUuid());82 bool fShouldWeAutoMountGuestScreens = gEDataManager->autoMountGuestScreensEnabled(vboxGlobal().managedVMUuid()); 83 83 LogRelFlow(("UIMultiScreenLayout::update: GUI/AutomountGuestScreens is %s.\n", fShouldWeAutoMountGuestScreens ? "enabled" : "disabled")); 84 84 QDesktopWidget *pDW = QApplication::desktop(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r51666 r51679 1136 1136 1137 1137 /* Is there should be First RUN Wizard? */ 1138 m_fIsFirstTimeStarted = gEDataManager-> isFirstRun(vboxGlobal().managedVMUuid());1138 m_fIsFirstTimeStarted = gEDataManager->machineFirstTimeStarted(vboxGlobal().managedVMUuid()); 1139 1139 1140 1140 /* Should guest autoresize? */ 1141 1141 QAction *pGuestAutoresizeSwitch = gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize); 1142 pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResize (vboxGlobal().managedVMUuid()));1142 pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResizeEnabled(vboxGlobal().managedVMUuid())); 1143 1143 1144 1144 /* Should we allow reconfiguration? */ 1145 m_fReconfigurable = gEDataManager-> shouldWeAllowMachineReconfiguration(vboxGlobal().managedVMUuid());1145 m_fReconfigurable = gEDataManager->machineReconfigurationEnabled(vboxGlobal().managedVMUuid()); 1146 1146 /* Should we allow snapshot operations? */ 1147 m_fSnapshotOperationsAllowed = gEDataManager-> shouldWeAllowMachineSnapshotOperations(vboxGlobal().managedVMUuid());1147 m_fSnapshotOperationsAllowed = gEDataManager->machineSnapshotOperationsEnabled(vboxGlobal().managedVMUuid()); 1148 1148 1149 1149 /* What is the default close action and the restricted are? */ … … 1174 1174 { 1175 1175 /* Disable First RUN Wizard: */ 1176 gEDataManager->set FirstRun(false, vboxGlobal().managedVMUuid());1176 gEDataManager->setMachineFirstTimeStarted(false, vboxGlobal().managedVMUuid()); 1177 1177 1178 1178 /* Remember if guest should autoresize: */ 1179 gEDataManager->setGuestScreenAutoResize (gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid());1179 gEDataManager->setGuestScreenAutoResizeEnabled(gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid()); 1180 1180 1181 1181 #if 0 /* Disabled for now! */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r51654 r51679 235 235 { 236 236 /* Make sure mini-toolbar is not restricted: */ 237 if (!gEDataManager-> showMiniToolbar(vboxGlobal().managedVMUuid()))237 if (!gEDataManager->miniToolbarEnabled(vboxGlobal().managedVMUuid())) 238 238 return; 239 239 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r51550 r51679 492 492 493 493 /* Maximize (if necessary): */ 494 if (gEDataManager-> isMachineWindowShouldBeMaximized(machineLogic()->visualStateType(),495 494 if (gEDataManager->machineWindowShouldBeMaximized(machineLogic()->visualStateType(), 495 m_uScreenId, vboxGlobal().managedVMUuid())) 496 496 setWindowState(windowState() | Qt::WindowMaximized); 497 497 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r51549 r51679 117 117 118 118 /* Maximize (if necessary): */ 119 if (gEDataManager-> isMachineWindowShouldBeMaximized(machineLogic()->visualStateType(),120 119 if (gEDataManager->machineWindowShouldBeMaximized(machineLogic()->visualStateType(), 120 m_uScreenId, vboxGlobal().managedVMUuid())) 121 121 setWindowState(windowState() | Qt::WindowMaximized); 122 122 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r51654 r51679 129 129 { 130 130 /* Make sure mini-toolbar is not restricted: */ 131 if (!gEDataManager-> showMiniToolbar(vboxGlobal().managedVMUuid()))131 if (!gEDataManager->miniToolbarEnabled(vboxGlobal().managedVMUuid())) 132 132 return; 133 133 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r51665 r51679 1320 1320 pMenu->addAction(m_pNetworkAccessManager); 1321 1321 m_pUpdateAction = gActionPool->action(UIActionIndex_Simple_CheckForUpdates); 1322 if (gEDataManager-> shouldWeAllowApplicationUpdate())1322 if (gEDataManager->applicationUpdateEnabled()) 1323 1323 pMenu->addAction(m_pUpdateAction); 1324 1324 else … … 1513 1513 1514 1514 /* Maximize (if necessary): */ 1515 if (gEDataManager-> isSelectorWindowShouldBeMaximized())1515 if (gEDataManager->selectorWindowShouldBeMaximized()) 1516 1516 showMaximized(); 1517 1517 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
r51579 r51679 262 262 /* Also take restrictions into account: */ 263 263 if ( m_configurationAccessLevel != ConfigurationAccessLevel_Null 264 && !gEDataManager-> shouldWeAllowMachineReconfiguration(m_strId))264 && !gEDataManager->machineReconfigurationEnabled(m_strId)) 265 265 m_configurationAccessLevel = ConfigurationAccessLevel_Null; 266 266 267 267 /* Should we show details for this item? */ 268 m_fHasDetails = gEDataManager->sho uldWeShowMachineDetails(m_strId);268 m_fHasDetails = gEDataManager->showMachineInSelectorDetails(m_strId); 269 269 } 270 270 else -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
r51579 r51679 456 456 mMachineId = aMachine.GetId(); 457 457 mSessionState = aMachine.GetSessionState(); 458 m_fShapshotOperationsAllowed = gEDataManager-> shouldWeAllowMachineSnapshotOperations(mMachineId);458 m_fShapshotOperationsAllowed = gEDataManager->machineSnapshotOperationsEnabled(mMachineId); 459 459 } 460 460 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r51590 r51679 598 598 CMachine machine = vboxGlobal().virtualBox().FindMachine(strId); 599 599 /* Should we show this machine? */ 600 if (gEDataManager->sho uldWeShowMachine(strId))600 if (gEDataManager->showMachineInSelectorChooser(strId)) 601 601 { 602 602 /* Add new machine-item: */ … … 884 884 /* Show machine if we should: */ 885 885 CMachine machine = vboxGlobal().virtualBox().FindMachine(strId); 886 if (gEDataManager->sho uldWeShowMachine(strId))886 if (gEDataManager->showMachineInSelectorChooser(strId)) 887 887 addMachineIntoTheTree(machine); 888 888 … … 1613 1613 { 1614 1614 const QString strMachineID = machine.GetId(); 1615 if (!strMachineID.isEmpty() && gEDataManager->sho uldWeShowMachine(strMachineID))1615 if (!strMachineID.isEmpty() && gEDataManager->showMachineInSelectorChooser(strMachineID)) 1616 1616 addMachineIntoTheTree(machine); 1617 1617 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r51470 r51679 859 859 /* Disable First RUN Wizard: */ 860 860 if (m_fResetFirstRunFlag) 861 gEDataManager->set FirstRun(false, m_strMachineId);861 gEDataManager->setMachineFirstTimeStarted(false, m_strMachineId); 862 862 863 863 /* Save settings finally: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r51654 r51679 107 107 generalData.m_strName = m_machine.GetName(); 108 108 generalData.m_strGuestOsTypeId = m_machine.GetOSTypeId(); 109 generalData.m_fShowMiniToolBar = gEDataManager-> showMiniToolbar(m_machine.GetId());109 generalData.m_fShowMiniToolBar = gEDataManager->miniToolbarEnabled(m_machine.GetId()); 110 110 generalData.m_fMiniToolBarAtTop = gEDataManager->miniToolbarAlignment(m_machine.GetId()) == Qt::AlignTop; 111 111 generalData.m_strSnapshotsFolder = m_machine.GetSnapshotFolder(); … … 188 188 m_machine.SetClipboardMode(generalData.m_clipboardMode); 189 189 m_machine.SetDnDMode(generalData.m_dndMode); 190 gEDataManager->set ShowMiniToolbar(generalData.m_fShowMiniToolBar, m_machine.GetId());190 gEDataManager->setMiniToolbarEnabled(generalData.m_fShowMiniToolBar, m_machine.GetId()); 191 191 gEDataManager->setMiniToolbarAlignment(generalData.m_fMiniToolBarAtTop ? Qt::AlignTop : Qt::AlignBottom, m_machine.GetId()); 192 192 /* Description tab: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
r51215 r51679 52 52 cleanup(); 53 53 54 /* Switchmode: */54 /* Toggle mode: */ 55 55 switch (m_mode) 56 56 { … … 59 59 default: AssertMsgFailed(("Invalid mode: %d", m_mode)); break; 60 60 } 61 62 /* Save mode settings: */ 63 gEDataManager->setModeForWizard(m_type, m_mode); 61 /* Save mode: */ 62 gEDataManager->setModeForWizardType(m_type, m_mode); 64 63 65 64 /* Prepare: */ … … 71 70 : QIWithRetranslateUI<QWizard>(pParent) 72 71 , m_type(type) 73 , m_mode(mode == WizardMode_Auto ? gEDataManager->modeForWizard (m_type) : mode)72 , m_mode(mode == WizardMode_Auto ? gEDataManager->modeForWizardType(m_type) : mode) 74 73 { 75 74 #ifdef Q_WS_WIN
Note:
See TracChangeset
for help on using the changeset viewer.