Changeset 41695 in vbox
- Timestamp:
- Jun 14, 2012 9:03:50 AM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp
r41689 r41695 1 1 /* $Id$ */ 2 /// @file 3 /// 4 /// VBox frontends: Qt GUI ("VirtualBox"): 5 /// Global definitions and function implementations 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * Global definitions and function implementations 6 */ 6 7 7 // Copyright (C) 2006-2012 Oracle Corporation 8 // 9 // This file is part of VirtualBox Open Source Edition (OSE), as 10 // available from http://www.virtualbox.org. This file is free software; 11 // you can redistribute it and/or modify it under the terms of the GNU 12 // General Public License (GPL) as published by the Free Software 13 // Foundation, in version 2 as it comes in the "COPYING" file of the 14 // VirtualBox OSE distribution. VirtualBox OSE is distributed in the 15 // hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 8 /* 9 * Copyright (C) 2006-2012 Oracle Corporation 10 * 11 * This file is part of VirtualBox Open Source Edition (OSE), as 12 * available from http://www.virtualbox.org. This file is free software; 13 * you can redistribute it and/or modify it under the terms of the GNU 14 * General Public License (GPL) as published by the Free Software 15 * Foundation, in version 2 as it comes in the "COPYING" file of the 16 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 17 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 18 */ 16 19 17 / / GUI includes:20 /* GUI includes: */ 18 21 #include "UIDefs.h" 19 22 20 / / Global definitions:23 /* Global definitions: */ 21 24 const char* UIDefs::GUI_RenderMode = "GUI/RenderMode"; 22 25 const char* UIDefs::GUI_LanguageId = "GUI/LanguageID"; … … 30 33 const char* UIDefs::GUI_RecentListFD = "GUI/RecentListFD"; 31 34 32 / / Selector-window definitions:35 /* Selector-window definitions: */ 33 36 const char* UIDefs::GUI_Input_SelectorShortcuts = "GUI/Input/SelectorShortcuts"; 34 37 const char* UIDefs::GUI_LastSelectorWindowPosition = "GUI/LastWindowPosition"; … … 41 44 const char* UIDefs::GUI_LastVMSelected = "GUI/LastVMSelected"; 42 45 43 / / Machine-window definitions:46 /* Machine-window definitions: */ 44 47 const char* UIDefs::GUI_Input_MachineShortcuts = "GUI/Input/MachineShortcuts"; 45 48 const char* UIDefs::GUI_LastNormalWindowPosition = "GUI/LastNormalWindowPosition"; … … 56 59 const char* UIDefs::GUI_PassCAD = "GUI/PassCAD"; 57 60 58 / / Mini tool-bar definitions:61 /* Mini tool-bar definitions: */ 59 62 const char* UIDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar"; 60 63 const char* UIDefs::GUI_MiniToolBarAlignment = "GUI/MiniToolBarAlignment"; 61 64 const char* UIDefs::GUI_MiniToolBarAutoHide = "GUI/MiniToolBarAutoHide"; 62 65 63 / / Close-dialog declarations:66 /* Close-dialog definitions: */ 64 67 const char* UIDefs::GUI_RestrictedCloseActions = "GUI/RestrictedCloseActions"; 65 68 const char* UIDefs::GUI_LastCloseAction = "GUI/LastCloseAction"; 66 69 const char* UIDefs::GUI_CloseActionHook = "GUI/CloseActionHook"; 67 70 68 / / Wizards declarations:71 /* Wizards definitions: */ 69 72 const char* UIDefs::GUI_FirstRun = "GUI/FirstRun"; 70 73 const char* UIDefs::GUI_HideDescriptionForWizards = "GUI/HideDescriptionForWizards"; … … 74 77 const char* UIDefs::GUI_Export_Bucket = "GUI/Export/Bucket"; 75 78 76 / / Message-center declarations:79 /* Message-center definitions: */ 77 80 const char* UIDefs::GUI_SuppressMessages = "GUI/SuppressMessages"; 78 81 const char* UIDefs::GUI_InvertMessageOption = "GUI/InvertMessageOption"; 79 82 80 / / Registration dialog declarations:83 /* Registration dialog definitions: */ 81 84 const char* UIDefs::GUI_RegistrationDlgWinID = "GUI/RegistrationDlgWinID"; 82 85 const char* UIDefs::GUI_RegistrationData = "GUI/SUNOnlineData"; 83 86 84 / / Update manager declarations:87 /* Update manager definitions: */ 85 88 const char* UIDefs::GUI_UpdateDate = "GUI/UpdateDate"; 86 89 const char* UIDefs::GUI_UpdateCheckCount = "GUI/UpdateCheckCount"; 87 90 88 / / Information dialog declarations:91 /* Information dialog definitions: */ 89 92 const char* UIDefs::GUI_InfoDlgState = "GUI/InfoDlgState"; 90 93 91 94 #ifdef VBOX_WITH_DEBUGGER_GUI 95 /* Debugger GUI declarations: */ 92 96 const char* UIDefs::GUI_DbgEnabled = "GUI/Dbg/Enabled"; 93 97 const char* UIDefs::GUI_DbgAutoShow = "GUI/Dbg/AutoShow"; 94 #endif / / VBOX_WITH_DEBUGGER_GUI98 #endif /* VBOX_WITH_DEBUGGER_GUI */ 95 99 96 100 #ifdef Q_WS_X11 101 /* License GUI declarations: */ 97 102 const char* UIDefs::GUI_LicenseKey = "GUI/LicenseAgreed"; 98 #endif // Q_WS_X11 99 100 #ifdef VBOX_GUI_WITH_SYSTRAY 101 const char* UIDefs::GUI_TrayIconWinID = "GUI/TrayIcon/WinID"; 102 const char* UIDefs::GUI_TrayIconEnabled = "GUI/TrayIcon/Enabled"; 103 const char* UIDefs::GUI_MainWindowCount = "GUI/MainWindowCount"; 104 #endif // VBOX_GUI_WITH_SYSTRAY 103 #endif /* Q_WS_X11 */ 105 104 106 105 #ifdef Q_WS_MAC 106 /* Mac dock declarations: */ 107 107 const char* UIDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled"; 108 108 const char* UIDefs::GUI_RealtimeDockIconUpdateMonitor = "GUI/RealtimeDockIconUpdateMonitor"; 109 109 const char* UIDefs::GUI_PresentationModeEnabled = "GUI/PresentationModeEnabled"; 110 #endif / / Q_WS_MAC110 #endif /* Q_WS_MAC */ 111 111 112 112 #ifdef VBOX_WITH_VIDEOHWACCEL 113 /* Video-acceleration declarations: */ 113 114 const char* UIDefs::GUI_Accelerate2D_StretchLinear = "GUI/Accelerate2D/StretchLinear"; 114 115 const char* UIDefs::GUI_Accelerate2D_PixformatYV12 = "GUI/Accelerate2D/PixformatYV12"; … … 116 117 const char* UIDefs::GUI_Accelerate2D_PixformatYUY2 = "GUI/Accelerate2D/PixformatYUY2"; 117 118 const char* UIDefs::GUI_Accelerate2D_PixformatAYUV = "GUI/Accelerate2D/PixformatAYUV"; 118 #endif / / VBOX_WITH_VIDEOHWACCEL119 #endif /* VBOX_WITH_VIDEOHWACCEL */ 119 120 121 #ifdef VBOX_GUI_WITH_SYSTRAY 122 /* Tray icon declarations: */ 123 const char* UIDefs::GUI_TrayIconWinID = "GUI/TrayIcon/WinID"; 124 const char* UIDefs::GUI_TrayIconEnabled = "GUI/TrayIcon/Enabled"; 125 const char* UIDefs::GUI_MainWindowCount = "GUI/MainWindowCount"; 126 #endif /* VBOX_GUI_WITH_SYSTRAY */ 127 128 /* File extensions definitions: */ 120 129 QStringList UIDefs::VBoxFileExts = QStringList() << "xml" << "vbox"; 121 130 QStringList UIDefs::VBoxExtPackFileExts = QStringList() << "vbox-extpack"; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
r41689 r41695 1 /// @file 2 /// 3 /// VBox frontends: Qt GUI ("VirtualBox"): 4 /// Global declarations and functions 5 6 // Copyright (C) 2006-2012 Oracle Corporation 7 // 8 // This file is part of VirtualBox Open Source Edition (OSE), as 9 // available from http://www.virtualbox.org. This file is free software; 10 // you can redistribute it and/or modify it under the terms of the GNU 11 // General Public License (GPL) as published by the Free Software 12 // Foundation, in version 2 as it comes in the "COPYING" file of the 13 // VirtualBox OSE distribution. VirtualBox OSE is distributed in the 14 // hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * Global declarations and functions 5 */ 6 7 /* 8 * Copyright (C) 2006-2012 Oracle Corporation 9 * 10 * This file is part of VirtualBox Open Source Edition (OSE), as 11 * available from http://www.virtualbox.org. This file is free software; 12 * you can redistribute it and/or modify it under the terms of the GNU 13 * General Public License (GPL) as published by the Free Software 14 * Foundation, in version 2 as it comes in the "COPYING" file of the 15 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the 16 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. 17 */ 15 18 16 19 #ifndef __UIDefs_h__ 17 20 #define __UIDefs_h__ 18 21 19 / / QT includes:22 /* Qt includes: */ 20 23 #include <QEvent> 21 24 #include <QStringList> 22 25 23 / / Other VBox defines:26 /* Other VBox defines: */ 24 27 #define LOG_GROUP LOG_GROUP_GUI 25 28 26 / / Other VBox includes:29 /* Other VBox includes: */ 27 30 #include <VBox/log.h> 28 31 #include <iprt/assert.h> 29 32 #include <iprt/alloc.h> 30 33 31 / / Defines:34 /* Defines: */ 32 35 #define MAC_LEOPARD_STYLE defined(Q_WS_MAC) && (QT_VERSION >= 0x040300) 33 36 … … 37 40 # define AssertWrapperOkMsg(w, m) \ 38 41 AssertMsg (w.isOk(), (#w ": " m " (RC=0x%08X)", w.lastRC())) 39 #else / / !DEBUG42 #else /* !DEBUG */ 40 43 # define AssertWrapperOk(w) do {} while (0) 41 44 # define AssertWrapperOkMsg(w, m) do {} while (0) 42 #endif / / DEBUG45 #endif /* DEBUG */ 43 46 44 47 #ifndef SIZEOF_ARRAY 45 48 # define SIZEOF_ARRAY(a) (sizeof(a) / sizeof(a[0])) 46 #endif / / SIZEOF_ARRAY47 48 / / Global UI namespace:49 #endif /* SIZEOF_ARRAY */ 50 51 /* Global UI namespace: */ 49 52 namespace UIDefs 50 53 { 51 / / VM display rendering mode:54 /* VM display rendering mode: */ 52 55 enum RenderMode 53 56 { … … 60 63 #ifdef VBOX_GUI_USE_QGLFB 61 64 , QGLMode 62 #endif / / VBOX_GUI_USE_QGLFB65 #endif /* VBOX_GUI_USE_QGLFB */ 63 66 }; 64 67 65 / / Additional Qt event types:68 /* Additional Qt event types: */ 66 69 enum UIEventType 67 70 { … … 73 76 #ifdef Q_WS_WIN 74 77 , ShellExecuteEventType 75 #endif / / Q_WS_WIN78 #endif /* Q_WS_WIN */ 76 79 , ActivateActionEventType 77 80 #ifdef Q_WS_MAC 78 81 , ShowWindowEventType 79 #endif / / Q_WS_MAC82 #endif /* Q_WS_MAC */ 80 83 , AddVDMUrlsEventType 81 84 #ifdef VBOX_GUI_USE_QGL 82 85 , VHWACommandProcessType 83 #endif / / VBOX_GUI_USE_QGL86 #endif /* VBOX_GUI_USE_QGL */ 84 87 }; 85 88 86 / / Size formatting types:89 /* Size formatting types: */ 87 90 enum FormatSize 88 91 { … … 92 95 }; 93 96 94 / / Global declarations:97 /* Global declarations: */ 95 98 extern const char* GUI_RenderMode; 96 99 extern const char* GUI_LanguageId; … … 104 107 extern const char* GUI_RecentListFD; 105 108 106 / / Selector-window declarations:109 /* Selector-window declarations: */ 107 110 extern const char* GUI_Input_SelectorShortcuts; 108 111 extern const char* GUI_LastSelectorWindowPosition; … … 115 118 extern const char* GUI_LastVMSelected; 116 119 117 / / Machine-window declarations:120 /* Machine-window declarations: */ 118 121 extern const char* GUI_Input_MachineShortcuts; 119 122 extern const char* GUI_LastNormalWindowPosition; … … 130 133 extern const char* GUI_PassCAD; 131 134 132 / / Mini tool-bar declarations:135 /* Mini tool-bar declarations: */ 133 136 extern const char* GUI_ShowMiniToolBar; 134 137 extern const char* GUI_MiniToolBarAlignment; 135 138 extern const char* GUI_MiniToolBarAutoHide; 136 139 137 / / Close-dialog declarations:140 /* Close-dialog declarations: */ 138 141 extern const char* GUI_RestrictedCloseActions; 139 142 extern const char* GUI_LastCloseAction; 140 143 extern const char* GUI_CloseActionHook; 141 144 142 / / Wizards declarations:145 /* Wizards declarations: */ 143 146 extern const char* GUI_FirstRun; 144 147 extern const char* GUI_HideDescriptionForWizards; … … 148 151 extern const char* GUI_Export_Bucket; 149 152 150 / / Message-center declarations:153 /* Message-center declarations: */ 151 154 extern const char* GUI_SuppressMessages; 152 155 extern const char* GUI_InvertMessageOption; 153 156 154 / / Registration dialog declarations:157 /* Registration dialog declarations: */ 155 158 extern const char* GUI_RegistrationDlgWinID; 156 159 extern const char* GUI_RegistrationData; 157 160 158 / / Update manager declarations:161 /* Update manager declarations: */ 159 162 extern const char* GUI_UpdateDate; 160 163 extern const char* GUI_UpdateCheckCount; 161 164 162 / / Information dialog declarations:165 /* Information dialog declarations: */ 163 166 extern const char* GUI_InfoDlgState; 164 167 165 168 #ifdef VBOX_WITH_DEBUGGER_GUI 169 /* Debugger GUI declarations: */ 166 170 extern const char* GUI_DbgEnabled; 167 171 extern const char* GUI_DbgAutoShow; 168 #endif / / VBOX_WITH_DEBUGGER_GUI172 #endif /* VBOX_WITH_DEBUGGER_GUI */ 169 173 170 174 #ifdef Q_WS_X11 175 /* License GUI declarations: */ 171 176 extern const char* GUI_LicenseKey; 172 #endif / / Q_WS_X11177 #endif /* Q_WS_X11 */ 173 178 174 179 #ifdef Q_WS_MAC 180 /* Mac dock declarations: */ 175 181 extern const char* GUI_RealtimeDockIconUpdateEnabled; 176 182 extern const char* GUI_RealtimeDockIconUpdateMonitor; 177 183 extern const char* GUI_PresentationModeEnabled; 178 #endif / / Q_WS_MAC184 #endif /* Q_WS_MAC */ 179 185 180 186 #ifdef VBOX_WITH_VIDEOHWACCEL 187 /* Video-acceleration declarations: */ 181 188 extern const char* GUI_Accelerate2D_StretchLinear; 182 189 extern const char* GUI_Accelerate2D_PixformatYV12; … … 184 191 extern const char* GUI_Accelerate2D_PixformatYUY2; 185 192 extern const char* GUI_Accelerate2D_PixformatAYUV; 186 #endif / / VBOX_WITH_VIDEOHWACCEL193 #endif /* VBOX_WITH_VIDEOHWACCEL */ 187 194 188 195 #ifdef VBOX_GUI_WITH_SYSTRAY 196 /* Tray icon declarations: */ 189 197 extern const char* GUI_TrayIconWinID; 190 198 extern const char* GUI_TrayIconEnabled; 191 199 extern const char* GUI_MainWindowCount; 192 #endif // VBOX_GUI_WITH_SYSTRAY 193 200 #endif /* VBOX_GUI_WITH_SYSTRAY */ 201 202 /* File extensions declarations: */ 194 203 extern QStringList VBoxFileExts; 195 204 extern QStringList VBoxExtPackFileExts; 196 205 extern QStringList OVFFileExts; 197 206 } 198 199 using namespace UIDefs; // globally 207 using namespace UIDefs /* globally */; 200 208 201 209 #endif // __UIDefs_h__
Note:
See TracChangeset
for help on using the changeset viewer.