Changeset 41689 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jun 13, 2012 5:13:36 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 67 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r41632 r41689 470 470 src/extensions/QITreeWidget.cpp \ 471 471 src/extensions/QIWidgetValidator.cpp \ 472 src/globals/UIDefs.cpp \ 472 473 src/globals/COMDefs.cpp \ 473 474 src/globals/UIActionPool.cpp \ … … 477 478 src/globals/UIMainEventListener.cpp \ 478 479 src/globals/UIMessageCenter.cpp \ 479 src/globals/VBoxDefs.cpp \480 480 src/globals/VBoxGlobal.cpp \ 481 481 src/globals/COMEnumsWrapper.cpp \ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r41611 r41689 210 210 public: 211 211 VBoxVHWACommandProcessEvent () 212 : QEvent ((QEvent::Type) V BoxDefs::VHWACommandProcessType)212 : QEvent ((QEvent::Type) VHWACommandProcessType) 213 213 { 214 214 #ifdef DEBUG_misha … … 5774 5774 CMachine machine = session.GetMachine(); 5775 5775 5776 QString str = machine.GetExtraData ( VBoxDefs::GUI_Accelerate2D_StretchLinear);5776 QString str = machine.GetExtraData (GUI_Accelerate2D_StretchLinear); 5777 5777 mStretchLinearEnabled = str != "off"; 5778 5778 5779 5779 uint32_t aFourccs[VBOXVHWA_NUMFOURCC]; 5780 5780 int num = 0; 5781 str = machine.GetExtraData ( VBoxDefs::GUI_Accelerate2D_PixformatAYUV);5781 str = machine.GetExtraData (GUI_Accelerate2D_PixformatAYUV); 5782 5782 if (str != "off") 5783 5783 aFourccs[num++] = FOURCC_AYUV; 5784 str = machine.GetExtraData ( VBoxDefs::GUI_Accelerate2D_PixformatUYVY);5784 str = machine.GetExtraData (GUI_Accelerate2D_PixformatUYVY); 5785 5785 if (str != "off") 5786 5786 aFourccs[num++] = FOURCC_UYVY; 5787 str = machine.GetExtraData ( VBoxDefs::GUI_Accelerate2D_PixformatYUY2);5787 str = machine.GetExtraData (GUI_Accelerate2D_PixformatYUY2); 5788 5788 if (str != "off") 5789 5789 aFourccs[num++] = FOURCC_YUY2; 5790 str = machine.GetExtraData ( VBoxDefs::GUI_Accelerate2D_PixformatYV12);5790 str = machine.GetExtraData (GUI_Accelerate2D_PixformatYV12); 5791 5791 if (str != "off") 5792 5792 aFourccs[num++] = FOURCC_YV12; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.h
r41611 r41689 30 30 31 31 /* GUI includes: */ 32 #include "UIDefs.h" 32 33 #include "VBoxFBOverlayCommon.h" 33 34 -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp
r41587 r41689 28 28 29 29 /* GUI includes: */ 30 #include "UIDefs.h" 30 31 #include "VBoxGlobalSettings.h" 31 32 #include "UIHotKeyEditor.h" … … 127 128 { "GUI/TrayIcon/Enabled", "trayIconEnabled", "true|false", true }, 128 129 #ifdef Q_WS_MAC 129 { VBoxDefs::GUI_PresentationModeEnabled,"presentationModeEnabled", "true|false", true },130 { GUI_PresentationModeEnabled, "presentationModeEnabled", "true|false", true }, 130 131 #endif /* Q_WS_MAC */ 131 132 { "GUI/HostScreenSaverDisabled", "hostScreenSaverDisabled", "true|false", true } -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
r41591 r41689 129 129 130 130 /* Preload dialog attributes for this vm */ 131 QString dlgsize = mSession.GetMachine().GetExtraData (VBoxDefs::GUI_InfoDlgState);131 QString dlgsize = mSession.GetMachine().GetExtraData(GUI_InfoDlgState); 132 132 if (dlgsize.isEmpty()) 133 133 { … … 151 151 /* Save dialog attributes for this vm */ 152 152 QString dlgsize ("%1,%2,%3"); 153 mSession.GetMachine().SetExtraData (VBoxDefs::GUI_InfoDlgState,154 dlgsize.arg (mWidth).arg (mHeight).arg(isMaximized() ? "max" : "normal"));153 mSession.GetMachine().SetExtraData(GUI_InfoDlgState, 154 dlgsize.arg(mWidth).arg(mHeight).arg(isMaximized() ? "max" : "normal")); 155 155 156 156 if (!mSession.isNull() && !mSession.GetMachine().isNull()) -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIListView.cpp
r34064 r41689 18 18 */ 19 19 20 #include "QIListView.h"21 #include "VBoxDefs.h"22 23 20 #if MAC_LEOPARD_STYLE 24 /* Qt includes */21 /* Qt includes: */ 25 22 # include <QPainter> 26 23 # include <QApplication> … … 28 25 #endif /* MAC_LEOPARD_STYLE */ 29 26 30 31 /* QIListView class */ 27 /* GUI includes: */ 28 #include "QIListView.h" 32 29 33 30 QIListView::QIListView (QWidget *aParent /* = 0 */) -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r41175 r41689 18 18 */ 19 19 20 /* VBox includes */ 21 #include "VBoxDefs.h" 22 #include "VBoxGlobal.h" 23 #include "QIArrowSplitter.h" 24 #include "QIMessageBox.h" 25 #include "QILabel.h" 26 #include "QIDialogButtonBox.h" 27 #include "UIIconPool.h" 28 29 /* Qt includes */ 20 /* Qt includes: */ 30 21 #include <QHBoxLayout> 31 22 #include <QLabel> … … 37 28 #include <QClipboard> 38 29 30 /* GUI includes: */ 31 #include "VBoxGlobal.h" 32 #include "QIArrowSplitter.h" 33 #include "QIMessageBox.h" 34 #include "QILabel.h" 35 #include "QIDialogButtonBox.h" 36 #include "UIIconPool.h" 39 37 #ifdef Q_WS_MAC 40 38 # include "UIMachineWindowFullscreen.h" -
trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.cpp
r41587 r41689 18 18 */ 19 19 20 /* COM includes: */21 #include "COMDefs.h"22 #include "CVirtualBoxErrorInfo.h"23 24 #if !defined (VBOX_WITH_XPCOM)25 26 27 #else /* !defined (VBOX_WITH_XPCOM) */28 29 20 /* Qt includes: */ 30 21 #include <QObject> 31 22 #include <QSocketNotifier> 23 24 /* COM includes: */ 25 #include "COMDefs.h" 26 #include "UIDefs.h" 27 #include "CVirtualBoxErrorInfo.h" 28 29 #if !defined (VBOX_WITH_XPCOM) 30 31 #else /* !defined (VBOX_WITH_XPCOM) */ 32 32 33 33 /* Other VBox includes: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/COMDefs.h
r41587 r41689 108 108 #endif /* !defined (VBOX_WITH_XPCOM) */ 109 109 110 #include "VBoxDefs.h"111 112 113 110 ///////////////////////////////////////////////////////////////////////////// 114 111 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/COMEnumsWrapper.cpp
r41685 r41689 25 25 /* GUI includes: */ 26 26 #include "COMEnumsWrapper.h" 27 #include "UIDefs.h" 27 28 28 29 /* static */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r41047 r41689 35 35 36 36 ActivateActionEvent(QAction *pAction) 37 : QEvent((QEvent::Type) VBoxDefs::ActivateActionEventType)37 : QEvent((QEvent::Type)ActivateActionEventType) 38 38 , m_pAction(pAction) {} 39 39 QAction* action() const { return m_pAction; } … … 383 383 { 384 384 setEnabled(vboxGlobal().virtualBox(). 385 GetExtraData( VBoxDefs::GUI_RegistrationDlgWinID).isEmpty());385 GetExtraData(GUI_RegistrationDlgWinID).isEmpty()); 386 386 switch (gActionPool->type()) 387 387 { … … 616 616 switch (pEvent->type()) 617 617 { 618 case VBoxDefs::ActivateActionEventType:618 case ActivateActionEventType: 619 619 { 620 620 /* Process specific event: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.cpp
r41679 r41689 1 1 /* $Id$ */ 2 /** @file 3 * 4 * VBox frontends: Qt GUI ("VirtualBox"): 5 * VBoxDefs implementation 6 */ 2 /// @file 3 /// 4 /// VBox frontends: Qt GUI ("VirtualBox"): 5 /// Global definitions and function implementations 7 6 8 /* 9 * Copyright (C) 2006-2010 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 */ 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. 19 16 20 / * Local includes */21 #include <VBoxDefs.h>17 // GUI includes: 18 #include "UIDefs.h" 22 19 23 /* Global includes */ 24 #include <QStringList> 20 // Global definitions: 21 const char* UIDefs::GUI_RenderMode = "GUI/RenderMode"; 22 const char* UIDefs::GUI_LanguageId = "GUI/LanguageID"; 23 const char* UIDefs::GUI_ExtPackName = "Oracle VM VirtualBox Extension Pack"; 24 const char* UIDefs::GUI_PreventBetaWarning = "GUI/PreventBetaWarning"; 25 const char* UIDefs::GUI_RecentFolderHD = "GUI/RecentFolderHD"; 26 const char* UIDefs::GUI_RecentFolderCD = "GUI/RecentFolderCD"; 27 const char* UIDefs::GUI_RecentFolderFD = "GUI/RecentFolderFD"; 28 const char* UIDefs::GUI_RecentListHD = "GUI/RecentListHD"; 29 const char* UIDefs::GUI_RecentListCD = "GUI/RecentListCD"; 30 const char* UIDefs::GUI_RecentListFD = "GUI/RecentListFD"; 25 31 26 /* VBoxGlobalDefs stuff: */ 27 const char* VBoxGlobalDefs::UI_ExtPackName = "Oracle VM VirtualBox Extension Pack"; 32 // Selector-window definitions: 33 const char* UIDefs::GUI_Input_SelectorShortcuts = "GUI/Input/SelectorShortcuts"; 34 const char* UIDefs::GUI_LastSelectorWindowPosition = "GUI/LastWindowPosition"; 35 const char* UIDefs::GUI_SplitterSizes = "GUI/SplitterSizes"; 36 const char* UIDefs::GUI_Toolbar = "GUI/Toolbar"; 37 const char* UIDefs::GUI_Statusbar = "GUI/Statusbar"; 38 const char* UIDefs::GUI_PreviewUpdate = "GUI/PreviewUpdate"; 39 const char* UIDefs::GUI_DetailsPageBoxes = "GUI/DetailsPageBoxes"; 40 const char* UIDefs::GUI_SelectorVMPositions = "GUI/SelectorVMPositions"; 41 const char* UIDefs::GUI_LastVMSelected = "GUI/LastVMSelected"; 28 42 29 /* VBoxDefs stuff: */ 30 const char* VBoxDefs::GUI_LastWindowPosition = "GUI/LastWindowPosition"; 31 const char* VBoxDefs::GUI_LastNormalWindowPosition = "GUI/LastNormalWindowPosition"; 32 const char* VBoxDefs::GUI_LastScaleWindowPosition = "GUI/LastScaleWindowPosition"; 33 const char* VBoxDefs::GUI_LastWindowState_Max = "max"; 34 const char* VBoxDefs::GUI_LastGuestSizeHint = "GUI/LastGuestSizeHint"; 35 const char* VBoxDefs::GUI_LastGuestSizeHintWasFullscreen = "GUI/LastGuestSizeHintWasFullscreen"; 36 const char* VBoxDefs::GUI_Toolbar = "GUI/Toolbar"; 37 const char* VBoxDefs::GUI_Statusbar = "GUI/Statusbar"; 38 const char* VBoxDefs::GUI_SplitterSizes = "GUI/SplitterSizes"; 39 const char* VBoxDefs::GUI_Fullscreen = "GUI/Fullscreen"; 40 const char* VBoxDefs::GUI_Seamless = "GUI/Seamless"; 41 const char* VBoxDefs::GUI_Scale = "GUI/Scale"; 42 const char* VBoxDefs::GUI_VirtualScreenToHostScreen = "GUI/VirtualScreenToHostScreen"; 43 const char* VBoxDefs::GUI_AutoresizeGuest = "GUI/AutoresizeGuest"; 44 const char* VBoxDefs::GUI_FirstRun = "GUI/FirstRun"; 45 const char* VBoxDefs::GUI_HideDescriptionForWizards = "GUI/HideDescriptionForWizards"; 46 const char* VBoxDefs::GUI_SaveMountedAtRuntime = "GUI/SaveMountedAtRuntime"; 47 const char* VBoxDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar"; 48 const char* VBoxDefs::GUI_MiniToolBarAlignment = "GUI/MiniToolBarAlignment"; 49 const char* VBoxDefs::GUI_MiniToolBarAutoHide = "GUI/MiniToolBarAutoHide"; 50 const char* VBoxDefs::GUI_LastCloseAction = "GUI/LastCloseAction"; 51 const char* VBoxDefs::GUI_RestrictedCloseActions = "GUI/RestrictedCloseActions"; 52 const char* VBoxDefs::GUI_CloseActionHook = "GUI/CloseActionHook"; 53 const char* VBoxDefs::GUI_SuppressMessages = "GUI/SuppressMessages"; 54 const char* VBoxDefs::GUI_InvertMessageOption = "GUI/InvertMessageOption"; 55 const char* VBoxDefs::GUI_PermanentSharedFoldersAtRuntime = "GUI/PermanentSharedFoldersAtRuntime"; 56 const char* VBoxDefs::GUI_LanguageId = "GUI/LanguageID"; 57 const char* VBoxDefs::GUI_PreviewUpdate = "GUI/PreviewUpdate"; 58 const char* VBoxDefs::GUI_DetailsPageBoxes = "GUI/DetailsPageBoxes"; 59 const char* VBoxDefs::GUI_SelectorVMPositions = "GUI/SelectorVMPositions"; 60 const char* VBoxDefs::GUI_Input_MachineShortcuts = "GUI/Input/MachineShortcuts"; 61 const char* VBoxDefs::GUI_Input_SelectorShortcuts = "GUI/Input/SelectorShortcuts"; 43 // Machine-window definitions: 44 const char* UIDefs::GUI_Input_MachineShortcuts = "GUI/Input/MachineShortcuts"; 45 const char* UIDefs::GUI_LastNormalWindowPosition = "GUI/LastNormalWindowPosition"; 46 const char* UIDefs::GUI_LastScaleWindowPosition = "GUI/LastScaleWindowPosition"; 47 const char* UIDefs::GUI_LastWindowState_Max = "max"; 48 const char* UIDefs::GUI_LastGuestSizeHint = "GUI/LastGuestSizeHint"; 49 const char* UIDefs::GUI_LastGuestSizeHintWasFullscreen = "GUI/LastGuestSizeHintWasFullscreen"; 50 const char* UIDefs::GUI_Fullscreen = "GUI/Fullscreen"; 51 const char* UIDefs::GUI_Seamless = "GUI/Seamless"; 52 const char* UIDefs::GUI_Scale = "GUI/Scale"; 53 const char* UIDefs::GUI_VirtualScreenToHostScreen = "GUI/VirtualScreenToHostScreen"; 54 const char* UIDefs::GUI_AutoresizeGuest = "GUI/AutoresizeGuest"; 55 const char* UIDefs::GUI_SaveMountedAtRuntime = "GUI/SaveMountedAtRuntime"; 56 const char* UIDefs::GUI_PassCAD = "GUI/PassCAD"; 57 58 // Mini tool-bar definitions: 59 const char* UIDefs::GUI_ShowMiniToolBar = "GUI/ShowMiniToolBar"; 60 const char* UIDefs::GUI_MiniToolBarAlignment = "GUI/MiniToolBarAlignment"; 61 const char* UIDefs::GUI_MiniToolBarAutoHide = "GUI/MiniToolBarAutoHide"; 62 63 // Close-dialog declarations: 64 const char* UIDefs::GUI_RestrictedCloseActions = "GUI/RestrictedCloseActions"; 65 const char* UIDefs::GUI_LastCloseAction = "GUI/LastCloseAction"; 66 const char* UIDefs::GUI_CloseActionHook = "GUI/CloseActionHook"; 67 68 // Wizards declarations: 69 const char* UIDefs::GUI_FirstRun = "GUI/FirstRun"; 70 const char* UIDefs::GUI_HideDescriptionForWizards = "GUI/HideDescriptionForWizards"; 71 const char* UIDefs::GUI_Export_StorageType = "GUI/Export/StorageType"; 72 const char* UIDefs::GUI_Export_Username = "GUI/Export/Username"; 73 const char* UIDefs::GUI_Export_Hostname = "GUI/Export/Hostname"; 74 const char* UIDefs::GUI_Export_Bucket = "GUI/Export/Bucket"; 75 76 // Message-center declarations: 77 const char* UIDefs::GUI_SuppressMessages = "GUI/SuppressMessages"; 78 const char* UIDefs::GUI_InvertMessageOption = "GUI/InvertMessageOption"; 79 80 // Registration dialog declarations: 81 const char* UIDefs::GUI_RegistrationDlgWinID = "GUI/RegistrationDlgWinID"; 82 const char* UIDefs::GUI_RegistrationData = "GUI/SUNOnlineData"; 83 84 // Update manager declarations: 85 const char* UIDefs::GUI_UpdateDate = "GUI/UpdateDate"; 86 const char* UIDefs::GUI_UpdateCheckCount = "GUI/UpdateCheckCount"; 87 88 // Information dialog declarations: 89 const char* UIDefs::GUI_InfoDlgState = "GUI/InfoDlgState"; 90 91 #ifdef VBOX_WITH_DEBUGGER_GUI 92 const char* UIDefs::GUI_DbgEnabled = "GUI/Dbg/Enabled"; 93 const char* UIDefs::GUI_DbgAutoShow = "GUI/Dbg/AutoShow"; 94 #endif // VBOX_WITH_DEBUGGER_GUI 95 62 96 #ifdef Q_WS_X11 63 const char* VBoxDefs::GUI_LicenseKey = "GUI/LicenseAgreed"; 64 #endif 65 const char* VBoxDefs::GUI_RegistrationDlgWinID = "GUI/RegistrationDlgWinID"; 66 const char* VBoxDefs::GUI_RegistrationData = "GUI/SUNOnlineData"; 67 const char* VBoxDefs::GUI_UpdateDate = "GUI/UpdateDate"; 68 const char* VBoxDefs::GUI_UpdateCheckCount = "GUI/UpdateCheckCount"; 69 const char* VBoxDefs::GUI_LastVMSelected = "GUI/LastVMSelected"; 70 const char* VBoxDefs::GUI_InfoDlgState = "GUI/InfoDlgState"; 71 const char* VBoxDefs::GUI_RenderMode = "GUI/RenderMode"; 97 const char* UIDefs::GUI_LicenseKey = "GUI/LicenseAgreed"; 98 #endif // Q_WS_X11 99 72 100 #ifdef VBOX_GUI_WITH_SYSTRAY 73 const char* VBoxDefs::GUI_TrayIconWinID = "GUI/TrayIcon/WinID"; 74 const char* VBoxDefs::GUI_TrayIconEnabled = "GUI/TrayIcon/Enabled"; 75 const char* VBoxDefs::GUI_MainWindowCount = "GUI/MainWindowCount"; 76 #endif 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 105 77 106 #ifdef Q_WS_MAC 78 const char* VBoxDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled"; 79 const char* VBoxDefs::GUI_RealtimeDockIconUpdateMonitor = "GUI/RealtimeDockIconUpdateMonitor"; 80 const char* VBoxDefs::GUI_PresentationModeEnabled = "GUI/PresentationModeEnabled"; 81 #endif /* Q_WS_MAC */ 82 const char* VBoxDefs::GUI_PassCAD = "GUI/PassCAD"; 83 const char* VBoxDefs::GUI_Export_StorageType = "GUI/Export/StorageType"; 84 const char* VBoxDefs::GUI_Export_Username = "GUI/Export/Username"; 85 const char* VBoxDefs::GUI_Export_Hostname = "GUI/Export/Hostname"; 86 const char* VBoxDefs::GUI_Export_Bucket = "GUI/Export/Bucket"; 87 const char* VBoxDefs::GUI_PreventBetaWarning = "GUI/PreventBetaWarning"; 88 const char* VBoxDefs::GUI_RecentFolderHD = "GUI/RecentFolderHD"; 89 const char* VBoxDefs::GUI_RecentFolderCD = "GUI/RecentFolderCD"; 90 const char* VBoxDefs::GUI_RecentFolderFD = "GUI/RecentFolderFD"; 91 const char* VBoxDefs::GUI_RecentListHD = "GUI/RecentListHD"; 92 const char* VBoxDefs::GUI_RecentListCD = "GUI/RecentListCD"; 93 const char* VBoxDefs::GUI_RecentListFD = "GUI/RecentListFD"; 107 const char* UIDefs::GUI_RealtimeDockIconUpdateEnabled = "GUI/RealtimeDockIconUpdateEnabled"; 108 const char* UIDefs::GUI_RealtimeDockIconUpdateMonitor = "GUI/RealtimeDockIconUpdateMonitor"; 109 const char* UIDefs::GUI_PresentationModeEnabled = "GUI/PresentationModeEnabled"; 110 #endif // Q_WS_MAC 111 94 112 #ifdef VBOX_WITH_VIDEOHWACCEL 95 const char* VBoxDefs::GUI_Accelerate2D_StretchLinear = "GUI/Accelerate2D/StretchLinear"; 96 const char* VBoxDefs::GUI_Accelerate2D_PixformatYV12 = "GUI/Accelerate2D/PixformatYV12"; 97 const char* VBoxDefs::GUI_Accelerate2D_PixformatUYVY = "GUI/Accelerate2D/PixformatUYVY"; 98 const char* VBoxDefs::GUI_Accelerate2D_PixformatYUY2 = "GUI/Accelerate2D/PixformatYUY2"; 99 const char* VBoxDefs::GUI_Accelerate2D_PixformatAYUV = "GUI/Accelerate2D/PixformatAYUV"; 100 #endif 101 #ifdef VBOX_WITH_DEBUGGER_GUI 102 const char* VBoxDefs::GUI_DbgEnabled = "GUI/Dbg/Enabled"; 103 const char* VBoxDefs::GUI_DbgAutoShow = "GUI/Dbg/AutoShow"; 104 #endif 113 const char* UIDefs::GUI_Accelerate2D_StretchLinear = "GUI/Accelerate2D/StretchLinear"; 114 const char* UIDefs::GUI_Accelerate2D_PixformatYV12 = "GUI/Accelerate2D/PixformatYV12"; 115 const char* UIDefs::GUI_Accelerate2D_PixformatUYVY = "GUI/Accelerate2D/PixformatUYVY"; 116 const char* UIDefs::GUI_Accelerate2D_PixformatYUY2 = "GUI/Accelerate2D/PixformatYUY2"; 117 const char* UIDefs::GUI_Accelerate2D_PixformatAYUV = "GUI/Accelerate2D/PixformatAYUV"; 118 #endif // VBOX_WITH_VIDEOHWACCEL 105 119 106 QStringList VBoxDefs::VBoxFileExts = QStringList() << "xml" << "vbox";107 QStringList VBoxDefs::VBoxExtPackFileExts = QStringList() << "vbox-extpack";108 QStringList VBoxDefs::OVFFileExts = QStringList() << "ovf" << "ova";120 QStringList UIDefs::VBoxFileExts = QStringList() << "xml" << "vbox"; 121 QStringList UIDefs::VBoxExtPackFileExts = QStringList() << "vbox-extpack"; 122 QStringList UIDefs::OVFFileExts = QStringList() << "ovf" << "ova"; 109 123 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDefs.h
r41679 r41689 1 /** @file 2 * 3 * VBox frontends: Qt GUI ("VirtualBox"): 4 * Header with common definitions and global functions 5 */ 6 7 /* 8 * Copyright (C) 2006-2011 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 */ 18 19 #ifndef __VBoxDefs_h__ 20 #define __VBoxDefs_h__ 21 22 /* Qt includes */ 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. 15 16 #ifndef __UIDefs_h__ 17 #define __UIDefs_h__ 18 19 // QT includes: 23 20 #include <QEvent> 24 #include <Q Uuid>25 #include <QMetaType> 26 21 #include <QStringList> 22 23 // Other VBox defines: 27 24 #define LOG_GROUP LOG_GROUP_GUI 25 26 // Other VBox includes: 28 27 #include <VBox/log.h> 29 28 #include <iprt/assert.h> 30 29 #include <iprt/alloc.h> 31 30 31 // Defines: 32 #define MAC_LEOPARD_STYLE defined(Q_WS_MAC) && (QT_VERSION >= 0x040300) 33 32 34 #ifdef DEBUG 33 34 #define AssertWrapperOk(w) \ 35 # define AssertWrapperOk(w) \ 35 36 AssertMsg (w.isOk(), (#w " is not okay (RC=0x%08X)", w.lastRC())) 36 # define AssertWrapperOkMsg(w, m) \37 # define AssertWrapperOkMsg(w, m) \ 37 38 AssertMsg (w.isOk(), (#w ": " m " (RC=0x%08X)", w.lastRC())) 38 39 #else /* #ifdef DEBUG */ 40 41 #define AssertWrapperOk(w) do {} while (0) 42 #define AssertWrapperOkMsg(w, m) do {} while (0) 43 44 #endif /* #ifdef DEBUG */ 39 #else // !DEBUG 40 # define AssertWrapperOk(w) do {} while (0) 41 # define AssertWrapperOkMsg(w, m) do {} while (0) 42 #endif // DEBUG 45 43 46 44 #ifndef SIZEOF_ARRAY 47 #define SIZEOF_ARRAY(a) (sizeof(a) / sizeof(a[0])) 48 #endif 49 50 /** 51 * Common global VBox namespace. 52 * Later it will replace VBoxDefs struct used as global VBox namespace. 53 */ 54 namespace VBoxGlobalDefs 45 # define SIZEOF_ARRAY(a) (sizeof(a) / sizeof(a[0])) 46 #endif // SIZEOF_ARRAY 47 48 // Global UI namespace: 49 namespace UIDefs 55 50 { 56 extern const char *UI_ExtPackName; 57 } 58 59 /** Common namespace for all enums */ 60 struct VBoxDefs 61 { 62 /** VM display rendering mode. */ 51 // VM display rendering mode: 63 52 enum RenderMode 64 53 { 65 InvalidRenderMode, TimerMode, QImageMode, SDLMode, DDRAWMode, Quartz2DMode 54 InvalidRenderMode 55 , TimerMode 56 , QImageMode 57 , SDLMode 58 , DDRAWMode 59 , Quartz2DMode 66 60 #ifdef VBOX_GUI_USE_QGLFB 67 61 , QGLMode 68 #endif 62 #endif // VBOX_GUI_USE_QGLFB 69 63 }; 70 64 71 / ** Additional Qt event types. */72 enum 65 // Additional Qt event types: 66 enum UIEventType 73 67 { 74 68 ResizeEventType = QEvent::User + 101 … … 77 71 , ModifierKeyChangeEventType 78 72 , MediaEnumEventType 79 #if defined (Q_WS_WIN)73 #ifdef Q_WS_WIN 80 74 , ShellExecuteEventType 81 #endif 75 #endif // Q_WS_WIN 82 76 , ActivateActionEventType 83 #if defined (Q_WS_MAC)77 #ifdef Q_WS_MAC 84 78 , ShowWindowEventType 85 #endif 79 #endif // Q_WS_MAC 86 80 , AddVDMUrlsEventType 87 81 #ifdef VBOX_GUI_USE_QGL 88 82 , VHWACommandProcessType 89 #endif 83 #endif // VBOX_GUI_USE_QGL 90 84 }; 91 85 92 / ** Size formatting types. */86 // Size formatting types: 93 87 enum FormatSize 94 88 { … … 98 92 }; 99 93 100 static const char* GUI_LastWindowPosition; 101 static const char* GUI_LastNormalWindowPosition; 102 static const char* GUI_LastScaleWindowPosition; 103 static const char* GUI_LastWindowState_Max; 104 static const char* GUI_SplitterSizes; 105 static const char* GUI_Toolbar; 106 static const char* GUI_Statusbar; 107 static const char* GUI_LastGuestSizeHint; 108 static const char* GUI_LastGuestSizeHintWasFullscreen; 109 static const char* GUI_Fullscreen; 110 static const char* GUI_Seamless; 111 static const char* GUI_Scale; 112 static const char* GUI_VirtualScreenToHostScreen; 113 static const char* GUI_AutoresizeGuest; 114 static const char* GUI_FirstRun; 115 static const char* GUI_HideDescriptionForWizards; 116 static const char* GUI_SaveMountedAtRuntime; 117 static const char* GUI_ShowMiniToolBar; 118 static const char* GUI_MiniToolBarAlignment; 119 static const char* GUI_MiniToolBarAutoHide; 120 static const char* GUI_LastCloseAction; 121 static const char* GUI_RestrictedCloseActions; 122 static const char* GUI_CloseActionHook; 123 static const char* GUI_SuppressMessages; 124 static const char* GUI_InvertMessageOption; 125 static const char* GUI_PermanentSharedFoldersAtRuntime; 126 static const char* GUI_LanguageId; 127 static const char* GUI_PreviewUpdate; 128 static const char* GUI_DetailsPageBoxes; 129 static const char* GUI_SelectorVMPositions; 130 static const char* GUI_Input_MachineShortcuts; 131 static const char* GUI_Input_SelectorShortcuts; 94 // Global declarations: 95 extern const char* GUI_RenderMode; 96 extern const char* GUI_LanguageId; 97 extern const char* GUI_ExtPackName; 98 extern const char* GUI_PreventBetaWarning; 99 extern const char* GUI_RecentFolderHD; 100 extern const char* GUI_RecentFolderCD; 101 extern const char* GUI_RecentFolderFD; 102 extern const char* GUI_RecentListHD; 103 extern const char* GUI_RecentListCD; 104 extern const char* GUI_RecentListFD; 105 106 // Selector-window declarations: 107 extern const char* GUI_Input_SelectorShortcuts; 108 extern const char* GUI_LastSelectorWindowPosition; 109 extern const char* GUI_SplitterSizes; 110 extern const char* GUI_Toolbar; 111 extern const char* GUI_Statusbar; 112 extern const char* GUI_PreviewUpdate; 113 extern const char* GUI_DetailsPageBoxes; 114 extern const char* GUI_SelectorVMPositions; 115 extern const char* GUI_LastVMSelected; 116 117 // Machine-window declarations: 118 extern const char* GUI_Input_MachineShortcuts; 119 extern const char* GUI_LastNormalWindowPosition; 120 extern const char* GUI_LastScaleWindowPosition; 121 extern const char* GUI_LastWindowState_Max; 122 extern const char* GUI_LastGuestSizeHint; 123 extern const char* GUI_LastGuestSizeHintWasFullscreen; 124 extern const char* GUI_Fullscreen; 125 extern const char* GUI_Seamless; 126 extern const char* GUI_Scale; 127 extern const char* GUI_VirtualScreenToHostScreen; 128 extern const char* GUI_AutoresizeGuest; 129 extern const char* GUI_SaveMountedAtRuntime; 130 extern const char* GUI_PassCAD; 131 132 // Mini tool-bar declarations: 133 extern const char* GUI_ShowMiniToolBar; 134 extern const char* GUI_MiniToolBarAlignment; 135 extern const char* GUI_MiniToolBarAutoHide; 136 137 // Close-dialog declarations: 138 extern const char* GUI_RestrictedCloseActions; 139 extern const char* GUI_LastCloseAction; 140 extern const char* GUI_CloseActionHook; 141 142 // Wizards declarations: 143 extern const char* GUI_FirstRun; 144 extern const char* GUI_HideDescriptionForWizards; 145 extern const char* GUI_Export_StorageType; 146 extern const char* GUI_Export_Username; 147 extern const char* GUI_Export_Hostname; 148 extern const char* GUI_Export_Bucket; 149 150 // Message-center declarations: 151 extern const char* GUI_SuppressMessages; 152 extern const char* GUI_InvertMessageOption; 153 154 // Registration dialog declarations: 155 extern const char* GUI_RegistrationDlgWinID; 156 extern const char* GUI_RegistrationData; 157 158 // Update manager declarations: 159 extern const char* GUI_UpdateDate; 160 extern const char* GUI_UpdateCheckCount; 161 162 // Information dialog declarations: 163 extern const char* GUI_InfoDlgState; 164 165 #ifdef VBOX_WITH_DEBUGGER_GUI 166 extern const char* GUI_DbgEnabled; 167 extern const char* GUI_DbgAutoShow; 168 #endif // VBOX_WITH_DEBUGGER_GUI 169 132 170 #ifdef Q_WS_X11 133 static const char* GUI_LicenseKey; 134 #endif 135 static const char* GUI_RegistrationDlgWinID; 136 static const char* GUI_RegistrationData; 137 static const char* GUI_UpdateDate; 138 static const char* GUI_UpdateCheckCount; 139 static const char* GUI_LastVMSelected; 140 static const char* GUI_InfoDlgState; 141 static const char* GUI_RenderMode; 171 extern const char* GUI_LicenseKey; 172 #endif // Q_WS_X11 173 174 #ifdef Q_WS_MAC 175 extern const char* GUI_RealtimeDockIconUpdateEnabled; 176 extern const char* GUI_RealtimeDockIconUpdateMonitor; 177 extern const char* GUI_PresentationModeEnabled; 178 #endif // Q_WS_MAC 179 180 #ifdef VBOX_WITH_VIDEOHWACCEL 181 extern const char* GUI_Accelerate2D_StretchLinear; 182 extern const char* GUI_Accelerate2D_PixformatYV12; 183 extern const char* GUI_Accelerate2D_PixformatUYVY; 184 extern const char* GUI_Accelerate2D_PixformatYUY2; 185 extern const char* GUI_Accelerate2D_PixformatAYUV; 186 #endif // VBOX_WITH_VIDEOHWACCEL 187 142 188 #ifdef VBOX_GUI_WITH_SYSTRAY 143 static const char* GUI_TrayIconWinID; 144 static const char* GUI_TrayIconEnabled; 145 static const char* GUI_MainWindowCount; 146 #endif 147 #ifdef Q_WS_MAC 148 static const char* GUI_RealtimeDockIconUpdateEnabled; 149 static const char* GUI_RealtimeDockIconUpdateMonitor; 150 static const char* GUI_PresentationModeEnabled; 151 #endif /* Q_WS_MAC */ 152 static const char* GUI_PassCAD; 153 static const char* GUI_Export_StorageType; 154 static const char* GUI_Export_Username; 155 static const char* GUI_Export_Hostname; 156 static const char* GUI_Export_Bucket; 157 static const char* GUI_PreventBetaWarning; 158 159 static const char* GUI_RecentFolderHD; 160 static const char* GUI_RecentFolderCD; 161 static const char* GUI_RecentFolderFD; 162 static const char* GUI_RecentListHD; 163 static const char* GUI_RecentListCD; 164 static const char* GUI_RecentListFD; 165 166 #ifdef VBOX_WITH_VIDEOHWACCEL 167 static const char* GUI_Accelerate2D_StretchLinear; 168 static const char* GUI_Accelerate2D_PixformatYV12; 169 static const char* GUI_Accelerate2D_PixformatUYVY; 170 static const char* GUI_Accelerate2D_PixformatYUY2; 171 static const char* GUI_Accelerate2D_PixformatAYUV; 172 #endif 173 174 #ifdef VBOX_WITH_DEBUGGER_GUI 175 static const char* GUI_DbgEnabled; 176 static const char* GUI_DbgAutoShow; 177 #endif 178 179 static QStringList VBoxFileExts; 180 static QStringList VBoxExtPackFileExts; 181 static QStringList OVFFileExts; 182 }; 183 184 #define MAC_LEOPARD_STYLE defined(Q_WS_MAC) && (QT_VERSION >= 0x040300) 185 186 #endif /* __VBoxDefs_h__ */ 187 189 extern const char* GUI_TrayIconWinID; 190 extern const char* GUI_TrayIconEnabled; 191 extern const char* GUI_MainWindowCount; 192 #endif // VBOX_GUI_WITH_SYSTRAY 193 194 extern QStringList VBoxFileExts; 195 extern QStringList VBoxExtPackFileExts; 196 extern QStringList OVFFileExts; 197 } 198 199 using namespace UIDefs; // globally 200 201 #endif // __UIDefs_h__ 202 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtraDataEventHandler.cpp
r41587 r41689 54 54 if (strKey.startsWith("GUI/")) 55 55 { 56 if (strKey == VBoxDefs::GUI_RegistrationDlgWinID)56 if (strKey == GUI_RegistrationDlgWinID) 57 57 { 58 58 if (m_fIsRegDlgOwner) … … 67 67 68 68 #ifdef VBOX_GUI_WITH_SYSTRAY 69 if (strKey == VBoxDefs::GUI_TrayIconWinID)69 if (strKey == GUI_TrayIconWinID) 70 70 { 71 71 if (m_fIsTrayIconOwner) … … 102 102 if (strKey.startsWith ("GUI/")) 103 103 { 104 if (strKey == VBoxDefs::GUI_RegistrationDlgWinID)104 if (strKey == GUI_RegistrationDlgWinID) 105 105 { 106 106 if (strValue.isEmpty()) … … 118 118 emit sigCanShowRegistrationDlg(false); 119 119 } 120 if (strKey == VBoxDefs::GUI_LanguageId)120 if (strKey == GUI_LanguageId) 121 121 emit sigGUILanguageChange(strValue); 122 122 #ifdef VBOX_GUI_WITH_SYSTRAY 123 if (strKey == VBoxDefs::GUI_MainWindowCount)123 if (strKey == GUI_MainWindowCount) 124 124 emit sigMainWindowCountChange(strValue.toInt()); 125 if (strKey == VBoxDefs::GUI_TrayIconWinID)125 if (strKey == GUI_TrayIconWinID) 126 126 { 127 127 if (strValue.isEmpty()) … … 139 139 emit sigCanShowTrayIcon(false); 140 140 } 141 if (strKey == VBoxDefs::GUI_TrayIconEnabled)141 if (strKey == GUI_TrayIconEnabled) 142 142 emit sigTrayIconChange((strValue.toLower() == "true") ? true : false); 143 143 #endif /* VBOX_GUI_WITH_SYSTRAY */ 144 144 #ifdef Q_WS_MAC 145 if (strKey == VBoxDefs::GUI_PresentationModeEnabled)145 if (strKey == GUI_PresentationModeEnabled) 146 146 { 147 147 /* Default to true if it is an empty value */ … … 164 164 if (strId == vboxGlobal().managedVMUuid()) 165 165 { 166 if ( strKey == VBoxDefs::GUI_RealtimeDockIconUpdateEnabled167 || strKey == VBoxDefs::GUI_RealtimeDockIconUpdateMonitor)166 if ( strKey == GUI_RealtimeDockIconUpdateEnabled 167 || strKey == GUI_RealtimeDockIconUpdateMonitor) 168 168 { 169 169 bool f = strValue.toLower() == "false" ? false : true; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r41615 r41689 173 173 { 174 174 vbox = vboxGlobal().virtualBox(); 175 msgs = vbox.GetExtraData( VBoxDefs::GUI_SuppressMessages).split(',');175 msgs = vbox.GetExtraData(GUI_SuppressMessages).split(','); 176 176 if (msgs.contains(pcszAutoConfirmId)) 177 177 { … … 249 249 { 250 250 msgs << pcszAutoConfirmId; 251 vbox.SetExtraData( VBoxDefs::GUI_SuppressMessages, msgs.join(","));251 vbox.SetExtraData(GUI_SuppressMessages, msgs.join(",")); 252 252 } 253 253 } … … 1056 1056 .arg(strSnapshotName), 1057 1057 tr("Create a snapshot of the current machine state"), 1058 !vboxGlobal().virtualBox().GetExtraDataStringList( VBoxDefs::GUI_InvertMessageOption).contains("askAboutSnapshotRestoring"),1058 !vboxGlobal().virtualBox().GetExtraDataStringList(GUI_InvertMessageOption).contains("askAboutSnapshotRestoring"), 1059 1059 QString::null /* details */, 1060 1060 QIMessageBox::Ok, QIMessageBox::Cancel, 0 /* 3rd button */, … … 1285 1285 /* Get VM name: */ 1286 1286 QFileInfo fi(machine.GetSettingsFilePath()); 1287 strMachineName = VBoxGlobal::hasAllowedExtension(fi.completeSuffix(), VBox Defs::VBoxFileExts) ? fi.completeBaseName() : fi.fileName();1287 strMachineName = VBoxGlobal::hasAllowedExtension(fi.completeSuffix(), VBoxFileExts) ? fi.completeBaseName() : fi.fileName(); 1288 1288 /* Increment inacessible VM count: */ 1289 1289 ++cInacessibleVMCount; … … 3020 3020 { 3021 3021 CVirtualBox vbox = vboxGlobal().virtualBox(); 3022 vbox.SetExtraData( VBoxDefs::GUI_SuppressMessages, QString::null);3022 vbox.SetExtraData(GUI_SuppressMessages, QString::null); 3023 3023 } 3024 3024 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r41615 r41689 52 52 #include "VBoxGlobal.h" 53 53 #include "VBoxUtils.h" 54 #include "VBoxDefs.h"55 54 #include "UISelectorWindow.h" 56 55 #include "UIMessageCenter.h" … … 178 177 VBoxMediaEnumEvent (const UIMedium &aMedium, 179 178 VBoxMediaList::iterator &aIterator) 180 : QEvent ((QEvent::Type) VBoxDefs::MediaEnumEventType)179 : QEvent ((QEvent::Type) MediaEnumEventType) 181 180 , mMedium (aMedium), mIterator (aIterator), mLast (false) 182 181 {} 183 182 /** Constructs the last enum event */ 184 183 VBoxMediaEnumEvent (VBoxMediaList::iterator &aIterator) 185 : QEvent ((QEvent::Type) VBoxDefs::MediaEnumEventType)184 : QEvent ((QEvent::Type) MediaEnumEventType) 186 185 , mIterator (aIterator), mLast (true) 187 186 {} … … 221 220 * default rendering mode if the argument is NULL. 222 221 */ 223 static VBoxDefs::RenderMode vboxGetRenderMode (const char *aModeStr)224 { 225 VBoxDefs::RenderMode mode = VBoxDefs::InvalidRenderMode;222 static RenderMode vboxGetRenderMode (const char *aModeStr) 223 { 224 RenderMode mode = InvalidRenderMode; 226 225 227 226 #if defined (Q_WS_MAC) && defined (VBOX_GUI_USE_QUARTZ2D) 228 mode = VBoxDefs::Quartz2DMode;227 mode = Quartz2DMode; 229 228 # ifdef RT_ARCH_X86 230 229 /* Quartz2DMode doesn't refresh correctly on 32-bit Snow Leopard, use image mode. */ … … 232 231 // if ( RT_SUCCESS (RTSystemQueryOSInfo (RTSYSOSINFO_RELEASE, szRelease, sizeof (szRelease))) 233 232 // && !strncmp (szRelease, "10.", 3)) 234 // mode = VBoxDefs::QImageMode;233 // mode = QImageMode; 235 234 # endif 236 235 #elif (defined (Q_WS_WIN32) || defined (Q_WS_PM) || defined (Q_WS_X11)) && defined (VBOX_GUI_USE_QIMAGE) 237 mode = VBoxDefs::QImageMode;236 mode = QImageMode; 238 237 #elif defined (Q_WS_X11) && defined (VBOX_GUI_USE_SDL) 239 mode = VBoxDefs::SDLMode;238 mode = SDLMode; 240 239 #elif defined (VBOX_GUI_USE_QIMAGE) 241 mode = VBoxDefs::QImageMode;240 mode = QImageMode; 242 241 #else 243 242 # error "Cannot determine the default render mode!" … … 249 248 #if defined (VBOX_GUI_USE_QIMAGE) 250 249 else if (::strcmp (aModeStr, "image") == 0) 251 mode = VBoxDefs::QImageMode;250 mode = QImageMode; 252 251 #endif 253 252 #if defined (VBOX_GUI_USE_SDL) 254 253 else if (::strcmp (aModeStr, "sdl") == 0) 255 mode = VBoxDefs::SDLMode;254 mode = SDLMode; 256 255 #endif 257 256 #if defined (VBOX_GUI_USE_DDRAW) 258 257 else if (::strcmp (aModeStr, "ddraw") == 0) 259 mode = VBoxDefs::DDRAWMode;258 mode = DDRAWMode; 260 259 #endif 261 260 #if defined (VBOX_GUI_USE_QUARTZ2D) 262 261 else if (::strcmp (aModeStr, "quartz2d") == 0) 263 mode = VBoxDefs::Quartz2DMode;262 mode = Quartz2DMode; 264 263 #endif 265 264 #if defined (VBOX_GUI_USE_QGLFB) 266 265 else if (::strcmp (aModeStr, "qgl") == 0) 267 mode = VBoxDefs::QGLMode;266 mode = QGLMode; 268 267 #endif 269 268 //#if defined (VBOX_GUI_USE_QGL) 270 269 // else if (::strcmp (aModeStr, "qgloverlay") == 0) 271 // mode = VBoxDefs::QGLOverlayMode;270 // mode = QGLOverlayMode; 272 271 //#endif 273 272 … … 585 584 { 586 585 int rc = 0; 587 QString strTrayWinID = mVBox.GetExtraData( VBoxDefs::GUI_TrayIconWinID);586 QString strTrayWinID = mVBox.GetExtraData(GUI_TrayIconWinID); 588 587 if (false == strTrayWinID.isEmpty()) 589 588 { 590 589 /* Check if current tray icon is alive by writing some bogus value. */ 591 mVBox.SetExtraData( VBoxDefs::GUI_TrayIconWinID, "0");590 mVBox.SetExtraData(GUI_TrayIconWinID, "0"); 592 591 if (mVBox.isOk()) 593 592 { 594 593 /* Current tray icon died - clean up. */ 595 mVBox.SetExtraData( VBoxDefs::GUI_TrayIconWinID, NULL);594 mVBox.SetExtraData(GUI_TrayIconWinID, NULL); 596 595 strTrayWinID.clear(); 597 596 } … … 628 627 { 629 628 // Use this selector for displaying the tray icon 630 mVBox.SetExtraData( VBoxDefs::GUI_TrayIconWinID,629 mVBox.SetExtraData(GUI_TrayIconWinID, 631 630 QString("%1").arg((qulonglong)vboxGlobal().mainWindow()->winId())); 632 631 … … 1933 1932 1934 1933 /* check for the agreed license version */ 1935 QStringList strList = virtualBox().GetExtraData ( VBoxDefs::GUI_LicenseKey).split(",");1934 QStringList strList = virtualBox().GetExtraData (GUI_LicenseKey).split(","); 1936 1935 for (int i=0; i < strList.size(); ++i) 1937 1936 if (strList.at(i) == latestVersion) … … 1941 1940 bool result = licenseDialog.showLicenseFromFile(latestFilePath) == QDialog::Accepted; 1942 1941 if (result) 1943 virtualBox().SetExtraData ( VBoxDefs::GUI_LicenseKey, (strList << latestVersion).join(","));1942 virtualBox().SetExtraData (GUI_LicenseKey, (strList << latestVersion).join(",")); 1944 1943 return result; 1945 1944 } … … 2386 2385 strTitle = tr("Please choose a virtual hard drive file"); 2387 2386 allType = tr("All virtual hard drive files (%1)"); 2388 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderHD);2387 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderHD); 2389 2388 if (strLastFolder.isEmpty()) 2390 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderCD);2389 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderCD); 2391 2390 if (strLastFolder.isEmpty()) 2392 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderFD);2391 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderFD); 2393 2392 break; 2394 2393 } … … 2398 2397 strTitle = tr("Please choose a virtual optical disk file"); 2399 2398 allType = tr("All virtual optical disk files (%1)"); 2400 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderCD);2399 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderCD); 2401 2400 if (strLastFolder.isEmpty()) 2402 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderHD);2401 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderHD); 2403 2402 if (strLastFolder.isEmpty()) 2404 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderFD);2403 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderFD); 2405 2404 break; 2406 2405 } … … 2410 2409 strTitle = tr("Please choose a virtual floppy disk file"); 2411 2410 allType = tr("All virtual floppy disk files (%1)"); 2412 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderFD);2411 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderFD); 2413 2412 if (strLastFolder.isEmpty()) 2414 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderCD);2413 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderCD); 2415 2414 if (strLastFolder.isEmpty()) 2416 strLastFolder = virtualBox().GetExtraData( VBoxDefs::GUI_RecentFolderHD);2415 strLastFolder = virtualBox().GetExtraData(GUI_RecentFolderHD); 2417 2416 break; 2418 2417 } … … 2457 2456 2458 2457 /* Remember the path of the last chosen medium: */ 2459 QString strRecentFolderKey = mediumType == UIMediumType_HardDisk ? VBoxDefs::GUI_RecentFolderHD :2460 mediumType == UIMediumType_DVD ? VBoxDefs::GUI_RecentFolderCD :2461 mediumType == UIMediumType_Floppy ? VBoxDefs::GUI_RecentFolderFD :2458 QString strRecentFolderKey = mediumType == UIMediumType_HardDisk ? GUI_RecentFolderHD : 2459 mediumType == UIMediumType_DVD ? GUI_RecentFolderCD : 2460 mediumType == UIMediumType_Floppy ? GUI_RecentFolderFD : 2462 2461 QString(); 2463 2462 vbox.SetExtraData(strRecentFolderKey, QFileInfo(strMediumLocation).absolutePath()); 2464 2463 2465 2464 /* Update recently used list: */ 2466 QString strRecentListKey = mediumType == UIMediumType_HardDisk ? VBoxDefs::GUI_RecentListHD :2467 mediumType == UIMediumType_DVD ? VBoxDefs::GUI_RecentListCD :2468 mediumType == UIMediumType_Floppy ? VBoxDefs::GUI_RecentListFD :2465 QString strRecentListKey = mediumType == UIMediumType_HardDisk ? GUI_RecentListHD : 2466 mediumType == UIMediumType_DVD ? GUI_RecentListCD : 2467 mediumType == UIMediumType_Floppy ? GUI_RecentListFD : 2469 2468 QString(); 2470 2469 QStringList recentMediumList = vbox.GetExtraData(strRecentListKey).split(';'); … … 2508 2507 int VBoxGlobal::mainWindowCount () 2509 2508 { 2510 return mVBox.GetExtraData ( VBoxDefs::GUI_MainWindowCount).toInt();2509 return mVBox.GetExtraData (GUI_MainWindowCount).toInt(); 2511 2510 } 2512 2511 #endif … … 3268 3267 /* static */ 3269 3268 QString VBoxGlobal::formatSize (quint64 aSize, uint aDecimal /* = 2 */, 3270 VBoxDefs::FormatSize aMode /* = FormatSize_Round */)3269 FormatSize aMode /* = FormatSize_Round */) 3271 3270 { 3272 3271 static QString Suffixes [7]; … … 3326 3325 decm *= mult; 3327 3326 /* not greater */ 3328 if (aMode == VBoxDefs::FormatSize_RoundDown)3327 if (aMode == FormatSize_RoundDown) 3329 3328 decm = decm / denom; 3330 3329 /* not less */ 3331 else if (aMode == VBoxDefs::FormatSize_RoundUp)3330 else if (aMode == FormatSize_RoundUp) 3332 3331 decm = (decm + denom - 1) / denom; 3333 3332 /* nearest */ … … 4130 4129 * that attempts to set it will win, the rest will get a failure from 4131 4130 * the SetExtraData() call. */ 4132 mVBox.SetExtraData ( VBoxDefs::GUI_RegistrationDlgWinID,4131 mVBox.SetExtraData (GUI_RegistrationDlgWinID, 4133 4132 QString ("%1").arg ((qulonglong) mMainWindow->winId())); 4134 4133 … … 4163 4162 switch (e->type()) 4164 4163 { 4165 case VBoxDefs::MediaEnumEventType:4164 case MediaEnumEventType: 4166 4165 { 4167 4166 VBoxMediaEnumEvent *ev = (VBoxMediaEnumEvent*) e; … … 4221 4220 bool VBoxGlobal::isDebuggerEnabled(CMachine &aMachine) 4222 4221 { 4223 return isDebuggerWorker(&mDbgEnabled, aMachine, VBoxDefs::GUI_DbgEnabled);4222 return isDebuggerWorker(&mDbgEnabled, aMachine, GUI_DbgEnabled); 4224 4223 } 4225 4224 4226 4225 bool VBoxGlobal::isDebuggerAutoShowEnabled(CMachine &aMachine) 4227 4226 { 4228 return isDebuggerWorker(&mDbgAutoShow, aMachine, VBoxDefs::GUI_DbgAutoShow);4227 return isDebuggerWorker(&mDbgAutoShow, aMachine, GUI_DbgAutoShow); 4229 4228 } 4230 4229 4231 4230 bool VBoxGlobal::isDebuggerAutoShowCommandLineEnabled(CMachine &aMachine) 4232 4231 { 4233 return isDebuggerWorker(&mDbgAutoShowCommandLine, aMachine, VBoxDefs::GUI_DbgAutoShow);4232 return isDebuggerWorker(&mDbgAutoShowCommandLine, aMachine, GUI_DbgAutoShow); 4234 4233 } 4235 4234 4236 4235 bool VBoxGlobal::isDebuggerAutoShowStatisticsEnabled(CMachine &aMachine) 4237 4236 { 4238 return isDebuggerWorker(&mDbgAutoShowStatistics, aMachine, VBoxDefs::GUI_DbgAutoShow);4237 return isDebuggerWorker(&mDbgAutoShowStatistics, aMachine, GUI_DbgAutoShow); 4239 4238 } 4240 4239 … … 4269 4268 { 4270 4269 const QString& strFile = list.at(i).toLocalFile(); 4271 if (VBoxGlobal::hasAllowedExtension(strFile, VBox Defs::VBoxFileExts))4270 if (VBoxGlobal::hasAllowedExtension(strFile, VBoxFileExts)) 4272 4271 { 4273 4272 CVirtualBox vbox = vboxGlobal().virtualBox(); … … 4351 4350 { 4352 4351 /* Increase open Fe/Qt4 windows reference count. */ 4353 int c = mVBox.GetExtraData ( VBoxDefs::GUI_MainWindowCount).toInt() + 1;4352 int c = mVBox.GetExtraData (GUI_MainWindowCount).toInt() + 1; 4354 4353 AssertMsgReturnVoid ((c >= 0) || (mVBox.isOk()), 4355 4354 ("Something went wrong with the window reference count!")); 4356 mVBox.SetExtraData ( VBoxDefs::GUI_MainWindowCount, QString ("%1").arg (c));4355 mVBox.SetExtraData (GUI_MainWindowCount, QString ("%1").arg (c)); 4357 4356 mIncreasedWindowCounter = mVBox.isOk(); 4358 4357 AssertReturnVoid (mIncreasedWindowCounter); … … 4487 4486 4488 4487 vm_render_mode_str = RTStrDup (virtualBox() 4489 .GetExtraData ( VBoxDefs::GUI_RenderMode).toAscii().constData());4488 .GetExtraData (GUI_RenderMode).toAscii().constData()); 4490 4489 4491 4490 #ifdef Q_WS_X11 … … 4495 4494 #ifdef VBOX_WITH_DEBUGGER_GUI 4496 4495 # ifdef VBOX_WITH_DEBUGGER_GUI_MENU 4497 initDebuggerVar(&mDbgEnabled, "VBOX_GUI_DBG_ENABLED", VBoxDefs::GUI_DbgEnabled, true);4496 initDebuggerVar(&mDbgEnabled, "VBOX_GUI_DBG_ENABLED", GUI_DbgEnabled, true); 4498 4497 # else 4499 initDebuggerVar(&mDbgEnabled, "VBOX_GUI_DBG_ENABLED", VBoxDefs::GUI_DbgEnabled, false);4498 initDebuggerVar(&mDbgEnabled, "VBOX_GUI_DBG_ENABLED", GUI_DbgEnabled, false); 4500 4499 # endif 4501 initDebuggerVar(&mDbgAutoShow, "VBOX_GUI_DBG_AUTO_SHOW", VBoxDefs::GUI_DbgAutoShow, false);4500 initDebuggerVar(&mDbgAutoShow, "VBOX_GUI_DBG_AUTO_SHOW", GUI_DbgAutoShow, false); 4502 4501 mDbgAutoShowCommandLine = mDbgAutoShowStatistics = mDbgAutoShow; 4503 4502 mStartPaused = false; … … 4633 4632 if (bForceSeamless && !vmUuid.isEmpty()) 4634 4633 { 4635 mVBox.FindMachine(vmUuid).SetExtraData( VBoxDefs::GUI_Seamless, "on");4634 mVBox.FindMachine(vmUuid).SetExtraData(GUI_Seamless, "on"); 4636 4635 } 4637 4636 else if (bForceFullscreen && !vmUuid.isEmpty()) 4638 4637 { 4639 mVBox.FindMachine(vmUuid).SetExtraData( VBoxDefs::GUI_Fullscreen, "on");4638 mVBox.FindMachine(vmUuid).SetExtraData(GUI_Fullscreen, "on"); 4640 4639 } 4641 4640 … … 4724 4723 { 4725 4724 /* Decrease open Fe/Qt4 windows reference count. */ 4726 int c = mVBox.GetExtraData ( VBoxDefs::GUI_MainWindowCount).toInt() - 1;4725 int c = mVBox.GetExtraData (GUI_MainWindowCount).toInt() - 1; 4727 4726 AssertMsg ((c >= 0) || (mVBox.isOk()), 4728 4727 ("Something went wrong with the window reference count!")); 4729 4728 if (c < 0) 4730 4729 c = 0; /* Clean up the mess. */ 4731 mVBox.SetExtraData ( VBoxDefs::GUI_MainWindowCount,4730 mVBox.SetExtraData (GUI_MainWindowCount, 4732 4731 (c > 0) ? QString ("%1").arg (c) : NULL); 4733 4732 AssertWrapperOk (mVBox); 4734 4733 if (c == 0) 4735 4734 { 4736 mVBox.SetExtraData ( VBoxDefs::GUI_TrayIconWinID, NULL);4735 mVBox.SetExtraData (GUI_TrayIconWinID, NULL); 4737 4736 AssertWrapperOk (mVBox); 4738 4737 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r41615 r41689 29 29 30 30 /* GUI includes: */ 31 #include "UIDefs.h" 31 32 #include "VBoxGlobalSettings.h" 32 33 #include "UIMedium.h" … … 142 143 QList<QUrl> &argUrlList() { return m_ArgUrlList; } 143 144 144 VBoxDefs::RenderMode vmRenderMode() const { return vm_render_mode; }145 RenderMode vmRenderMode() const { return vm_render_mode; } 145 146 const char *vmRenderModeStr() const { return vm_render_mode_str; } 146 147 bool isKWinManaged() const { return mIsKWinManaged; } … … 347 348 348 349 static quint64 parseSize (const QString &); 349 static QString formatSize (quint64 aSize, uint aDecimal = 2, 350 VBoxDefs::FormatSize aMode = VBoxDefs::FormatSize_Round); 350 static QString formatSize (quint64 aSize, uint aDecimal = 2, FormatSize aMode = FormatSize_Round); 351 351 352 352 static quint64 requiredVideoMemory(const QString &strGuestOSTypeId, int cMonitors = 1); … … 501 501 VBoxMediaList mMediaList; 502 502 503 VBoxDefs::RenderMode vm_render_mode;503 RenderMode vm_render_mode; 504 504 const char * vm_render_mode_str; 505 505 bool mIsKWinManaged; -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r41355 r41689 504 504 /* Allow to prevent this message */ 505 505 QString str = vboxGlobal().virtualBox(). 506 GetExtraData (VBoxDefs::GUI_PreventBetaWarning);506 GetExtraData(GUI_PreventBetaWarning); 507 507 if (str != vboxVersion) 508 508 msgCenter().showBETAWarning(); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r41650 r41689 65 65 66 66 AddVDMUrlsEvent (const QList <QUrl> &aUrls) 67 : QEvent (static_cast <QEvent::Type> ( VBoxDefs::AddVDMUrlsEventType))67 : QEvent (static_cast <QEvent::Type> (AddVDMUrlsEventType)) 68 68 , mUrls (aUrls) 69 69 {} … … 748 748 break; 749 749 } 750 case VBoxDefs::AddVDMUrlsEventType:750 case AddVDMUrlsEventType: 751 751 { 752 752 if (aObject == currentTreeWidget()) -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h
r41650 r41689 24 24 #include "QIMainDialog.h" 25 25 #include "QIWithRetranslateUI.h" 26 #include "VBoxDefs.h"27 26 #include "VBoxMediaComboBox.h" 28 27 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.cpp
r41140 r41689 29 29 #include "VBoxGlobal.h" 30 30 #include "UIMessageCenter.h" 31 #include "VBoxDefs.h"32 33 /* Using declarations: */34 using namespace VBoxGlobalDefs;35 31 36 32 /* static */ … … 61 57 62 58 /* Prepare source/target: */ 63 QString strExtPackUnderscoredName(QString( UI_ExtPackName).replace(' ', '_'));59 QString strExtPackUnderscoredName(QString(GUI_ExtPackName).replace(' ', '_')); 64 60 QString strTemplateSourcePath("http://download.virtualbox.org/virtualbox/%1/"); 65 61 QString strTemplateSourceName(QString("%1-%2.vbox-extpack").arg(strExtPackUnderscoredName)); … … 85 81 bool UIDownloaderExtensionPack::askForDownloadingConfirmation(QNetworkReply *pReply) 86 82 { 87 return msgCenter().confirmDownloadExtensionPack( UI_ExtPackName, source().toString(), pReply->header(QNetworkRequest::ContentLengthHeader).toInt());83 return msgCenter().confirmDownloadExtensionPack(GUI_ExtPackName, source().toString(), pReply->header(QNetworkRequest::ContentLengthHeader).toInt()); 88 84 } 89 85 … … 120 116 121 117 /* Warn the user about extension-pack was downloaded but was NOT saved: */ 122 msgCenter().warnAboutExtentionPackCantBeSaved( UI_ExtPackName, source().toString(), QDir::toNativeSeparators(target()));118 msgCenter().warnAboutExtentionPackCantBeSaved(GUI_ExtPackName, source().toString(), QDir::toNativeSeparators(target())); 123 119 124 120 /* Ask the user for another location for the extension-pack file: */ 125 121 QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(), 126 122 msgCenter().networkManagerOrMainWindowShown(), 127 tr("Select folder to save %1 to").arg( UI_ExtPackName), true);123 tr("Select folder to save %1 to").arg(GUI_ExtPackName), true); 128 124 129 125 /* Check if user had really set a new target: */ -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
r41614 r41689 35 35 #include "UIDownloaderExtensionPack.h" 36 36 #include "UIGlobalSettingsExtension.h" 37 #include "VBoxDefs.h"38 37 #include "QIProcess.h" 39 38 … … 48 47 /* Forward declarations: */ 49 48 class UIUpdateStep; 50 51 /* Using declarations: */52 using namespace VBoxGlobalDefs;53 49 54 50 /* Queue for processing update-steps: */ … … 166 162 /* Calculate the count of checks left: */ 167 163 int cCount = 1; 168 QString strCount = vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_UpdateCheckCount);164 QString strCount = vboxGlobal().virtualBox().GetExtraData(GUI_UpdateCheckCount); 169 165 if (!strCount.isEmpty()) 170 166 { … … 193 189 } 194 190 url.addQueryItem("count", QString::number(cCount)); 195 url.addQueryItem("branch", VBoxUpdateData(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_UpdateDate)).branchName());191 url.addQueryItem("branch", VBoxUpdateData(vboxGlobal().virtualBox().GetExtraData(GUI_UpdateDate)).branchName()); 196 192 QString strUserAgent(QString("VirtualBox %1 <%2>").arg(vboxGlobal().virtualBox().GetVersion()).arg(platformInfo())); 197 193 … … 231 227 /* Save left count of checks: */ 232 228 int cCount = 1; 233 QString strCount = vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_UpdateCheckCount);229 QString strCount = vboxGlobal().virtualBox().GetExtraData(GUI_UpdateCheckCount); 234 230 if (!strCount.isEmpty()) 235 231 { … … 238 234 if (ok) cCount = c; 239 235 } 240 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_UpdateCheckCount, QString("%1").arg((qulonglong)cCount + 1));236 vboxGlobal().virtualBox().SetExtraData(GUI_UpdateCheckCount, QString("%1").arg((qulonglong)cCount + 1)); 241 237 242 238 /* Notify about step completion: */ … … 376 372 377 373 /* Get extension pack: */ 378 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find( UI_ExtPackName);374 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName); 379 375 /* Return if extension pack is NOT installed: */ 380 376 if (extPack.isNull()) … … 410 406 { 411 407 /* Inform the user that he should update the extension pack: */ 412 msgCenter().requestUserDownloadExtensionPack( UI_ExtPackName, strExtPackVersion, strVBoxVersion);408 msgCenter().requestUserDownloadExtensionPack(GUI_ExtPackName, strExtPackVersion, strVBoxVersion); 413 409 /* Never try to download for ENTERPRISE version: */ 414 410 emit sigStepComplete(); … … 417 413 418 414 /* Ask the user about extension pack downloading: */ 419 if (!msgCenter().proposeDownloadExtensionPack( UI_ExtPackName, strExtPackVersion))415 if (!msgCenter().proposeDownloadExtensionPack(GUI_ExtPackName, strExtPackVersion)) 420 416 { 421 417 emit sigStepComplete(); … … 438 434 { 439 435 /* Warn the user about extension pack was downloaded and saved, propose to install it: */ 440 if (msgCenter().proposeInstallExtentionPack( UI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget)))436 if (msgCenter().proposeInstallExtentionPack(GUI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget))) 441 437 UIGlobalSettingsExtension::doInstallation(strTarget, strDigest, msgCenter().mainWindowShown(), NULL); 442 438 } … … 518 514 519 515 /* Load/decode curent update data: */ 520 VBoxUpdateData currentData(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_UpdateDate));516 VBoxUpdateData currentData(vboxGlobal().virtualBox().GetExtraData(GUI_UpdateDate)); 521 517 522 518 /* If update is really necessary: */ … … 536 532 { 537 533 /* Load/decode curent update data: */ 538 VBoxUpdateData currentData(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_UpdateDate));534 VBoxUpdateData currentData(vboxGlobal().virtualBox().GetExtraData(GUI_UpdateDate)); 539 535 /* Encode/save new update data: */ 540 536 VBoxUpdateData newData(currentData.periodIndex(), currentData.branchIndex()); 541 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_UpdateDate, newData.data());537 vboxGlobal().virtualBox().SetExtraData(GUI_UpdateDate, newData.data()); 542 538 543 539 #ifdef VBOX_WITH_UPDATE_REQUEST -
trunk/src/VBox/Frontends/VirtualBox/src/precomp.h
r41387 r41689 198 198 # include "VBoxCocoaSpecialControls.h" 199 199 #endif 200 #include " VBoxDefs.h"200 #include "UIDefs.h" 201 201 #include "VBoxDownloaderWgt.h" 202 202 #include "UIApplianceExportEditorWidget.h" … … 321 321 322 322 #ifdef Q_WS_MAC 323 # if MAC_LEOPARD_STYLE /* This is defined by VBoxDefs.h and must come after it was included */323 # if MAC_LEOPARD_STYLE /* This is defined by UIDefs.h and must come after it was included */ 324 324 # include <qmacstyle_mac.h> 325 325 # endif -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.h
r41587 r41689 25 25 26 26 /* GUI includes: */ 27 #include "VBoxDefs.h" 27 #include "UIDefs.h" 28 29 /* COM includes: */ 28 30 #include "CFramebuffer.h" 29 31 … … 44 46 ulong uBitsPerPixel, ulong uBytesPerLine, 45 47 ulong uWidth, ulong uHeight) 46 : QEvent((QEvent::Type) VBoxDefs::ResizeEventType)48 : QEvent((QEvent::Type)ResizeEventType) 47 49 , m_uPixelFormat(uPixelFormat), m_pVRAM(pVRAM), m_uBitsPerPixel(uBitsPerPixel) 48 50 , m_uBytesPerLine(uBytesPerLine), m_uWidth(uWidth), m_uHeight(uHeight) {} … … 72 74 73 75 UIRepaintEvent(int iX, int iY, int iW, int iH) 74 : QEvent((QEvent::Type) VBoxDefs::RepaintEventType)76 : QEvent((QEvent::Type)RepaintEventType) 75 77 , m_iX(iX), m_iY(iY), m_iW(iW), m_iH(iH) {} 76 78 int x() { return m_iX; } … … 92 94 93 95 UISetRegionEvent(const QRegion ®ion) 94 : QEvent((QEvent::Type) VBoxDefs::SetRegionEventType)96 : QEvent((QEvent::Type)SetRegionEventType) 95 97 , m_region(region) {} 96 98 QRegion region() { return m_region; } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r41591 r41689 709 709 { 710 710 /* CAD settings: */ 711 QString passCAD = session().GetConsole().GetMachine().GetExtraData( VBoxDefs::GUI_PassCAD);711 QString passCAD = session().GetConsole().GetMachine().GetExtraData(GUI_PassCAD); 712 712 if (!passCAD.isEmpty() && passCAD != "false" && passCAD != "no") 713 713 m_fPassCAD = true; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r41107 r41689 523 523 { 524 524 /* Test 'scale' flag: */ 525 QString strScaleSettings = machine.GetExtraData( VBoxDefs::GUI_Scale);525 QString strScaleSettings = machine.GetExtraData(GUI_Scale); 526 526 if (strScaleSettings == "on") 527 527 { … … 535 535 { 536 536 /* Test 'seamless' flag: */ 537 QString strSeamlessSettings = machine.GetExtraData( VBoxDefs::GUI_Seamless);537 QString strSeamlessSettings = machine.GetExtraData(GUI_Seamless); 538 538 if (strSeamlessSettings == "on") 539 539 { … … 548 548 { 549 549 /* Test 'fullscreen' flag: */ 550 QString strFullscreenSettings = machine.GetExtraData( VBoxDefs::GUI_Fullscreen);550 QString strFullscreenSettings = machine.GetExtraData(GUI_Fullscreen); 551 551 if (strFullscreenSettings == "on") 552 552 { … … 567 567 { 568 568 /* Set 'scale' flag: */ 569 machine.SetExtraData( VBoxDefs::GUI_Scale, m_pVisualState &&569 machine.SetExtraData(GUI_Scale, m_pVisualState && 570 570 m_pVisualState->visualStateType() == UIVisualStateType_Scale ? "on" : QString()); 571 571 572 572 /* Set 'seamless' flag: */ 573 machine.SetExtraData( VBoxDefs::GUI_Seamless, m_pVisualState &&573 machine.SetExtraData(GUI_Seamless, m_pVisualState && 574 574 m_pVisualState->visualStateType() == UIVisualStateType_Seamless ? "on" : QString()); 575 575 576 576 /* Set 'fullscreen' flag: */ 577 machine.SetExtraData( VBoxDefs::GUI_Fullscreen, m_pVisualState &&577 machine.SetExtraData(GUI_Fullscreen, m_pVisualState && 578 578 m_pVisualState->visualStateType() == UIVisualStateType_Fullscreen ? "on" : QString()); 579 579 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r41615 r41689 708 708 { 709 709 pDockSettingsMenu->addSeparator(); 710 m_DockIconPreviewMonitor = qMin(session().GetMachine().GetExtraData( VBoxDefs::GUI_RealtimeDockIconUpdateMonitor).toInt(), cGuestScreens - 1);710 m_DockIconPreviewMonitor = qMin(session().GetMachine().GetExtraData(GUI_RealtimeDockIconUpdateMonitor).toInt(), cGuestScreens - 1); 711 711 m_pDockPreviewSelectMonitorGroup = new QActionGroup(this); 712 712 for (int i = 0; i < cGuestScreens; ++i) … … 732 732 m_pDockIconPreview = new UIDockIconPreview(uisession(), vboxGlobal().vmGuestOSTypeIcon(osTypeId)); 733 733 734 QString strTest = session().GetMachine().GetExtraData( VBoxDefs::GUI_RealtimeDockIconUpdateEnabled).toLower();734 QString strTest = session().GetMachine().GetExtraData(GUI_RealtimeDockIconUpdateEnabled).toLower(); 735 735 /* Default to true if it is an empty value */ 736 736 bool f = (strTest.isEmpty() || strTest == "true"); … … 1186 1186 case UIMediumType_DVD: 1187 1187 mediums = vboxGlobal().host().GetDVDDrives(); 1188 strRecentMediumAddress = VBoxDefs::GUI_RecentListCD;1188 strRecentMediumAddress = GUI_RecentListCD; 1189 1189 break; 1190 1190 case UIMediumType_Floppy: 1191 1191 mediums = vboxGlobal().host().GetFloppyDrives(); 1192 strRecentMediumAddress = VBoxDefs::GUI_RecentListFD;1192 strRecentMediumAddress = GUI_RecentListFD; 1193 1193 break; 1194 1194 default: … … 1698 1698 fEnabled = false; 1699 1699 1700 machine.SetExtraData( VBoxDefs::GUI_RealtimeDockIconUpdateEnabled, fEnabled ? "true" : "false");1700 machine.SetExtraData(GUI_RealtimeDockIconUpdateEnabled, fEnabled ? "true" : "false"); 1701 1701 updateDockOverlay(); 1702 1702 } … … 1709 1709 { 1710 1710 int monitor = pAction->data().toInt(); 1711 machine.SetExtraData( VBoxDefs::GUI_RealtimeDockIconUpdateMonitor, QString::number(monitor));1711 machine.SetExtraData(GUI_RealtimeDockIconUpdateMonitor, QString::number(monitor)); 1712 1712 updateDockOverlay(); 1713 1713 } … … 1723 1723 m_pDockPreviewSelectMonitorGroup->setEnabled(fEnabled); 1724 1724 CMachine machine = session().GetMachine(); 1725 m_DockIconPreviewMonitor = qMin(machine.GetExtraData( VBoxDefs::GUI_RealtimeDockIconUpdateMonitor).toInt(), (int)machine.GetMonitorCount() - 1);1725 m_DockIconPreviewMonitor = qMin(machine.GetExtraData(GUI_RealtimeDockIconUpdateMonitor).toInt(), (int)machine.GetMonitorCount() - 1); 1726 1726 } 1727 1727 /* Resize the dock icon in the case the preview monitor has changed. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineShortcuts.cpp
r39932 r41689 66 66 m_Shortcuts[PopupMenuShortcut] = UIKeySequence("PopupMenu", "Home"); 67 67 /* Overwrite the key sequences with the one in extra data. */ 68 loadExtraData( VBoxDefs::GUI_Input_MachineShortcuts, EndShortcutType);68 loadExtraData(GUI_Input_MachineShortcuts, EndShortcutType); 69 69 } 70 70 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.cpp
r41600 r41689 179 179 /* And track whether we have had a "normal" resize since the last 180 180 * fullscreen resize hint was sent: */ 181 QString strKey = makeExtraDataKeyPerMonitor 182 (VBoxDefs::GUI_LastGuestSizeHintWasFullscreen); 181 QString strKey = makeExtraDataKeyPerMonitor(GUI_LastGuestSizeHintWasFullscreen); 183 182 machine.SetExtraData(strKey, isFullscreenOrSeamless() ? "true" : ""); 184 183 } … … 193 192 case KMachineState_TeleportingPausedVM: 194 193 { 195 if ( vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode194 if ( vboxGlobal().vmRenderMode() != TimerMode 196 195 && m_pFrameBuffer 197 196 && … … 222 221 || m_previousState == KMachineState_Restoring) 223 222 { 224 if (vboxGlobal().vmRenderMode() != VBoxDefs::TimerMode && m_pFrameBuffer)223 if (vboxGlobal().vmRenderMode() != TimerMode && m_pFrameBuffer) 225 224 { 226 225 /* Reset the pixmap to free memory: */ … … 271 270 switch (vboxGlobal().vmRenderMode()) 272 271 { 273 case VBoxDefs::QGLMode:272 case QGLMode: 274 273 pViewport = new VBoxGLWidget(session().GetConsole(), this, NULL); 275 274 break; … … 289 288 { 290 289 #ifdef VBOX_GUI_USE_QIMAGE 291 case VBoxDefs::QImageMode:290 case QImageMode: 292 291 { 293 292 UIFrameBuffer* pFrameBuffer = uisession()->frameBuffer(screenId()); … … 316 315 #endif /* VBOX_GUI_USE_QIMAGE */ 317 316 #ifdef VBOX_GUI_USE_QGLFB 318 case VBoxDefs::QGLMode:317 case QGLMode: 319 318 m_pFrameBuffer = new UIFrameBufferQGL(this); 320 319 break; 321 // case VBoxDefs::QGLOverlayMode:320 // case QGLOverlayMode: 322 321 // m_pFrameBuffer = new UIQGLOverlayFrameBuffer(this); 323 322 // break; 324 323 #endif /* VBOX_GUI_USE_QGLFB */ 325 324 #ifdef VBOX_GUI_USE_SDL 326 case VBoxDefs::SDLMode:325 case SDLMode: 327 326 { 328 327 /* Indicate that we are doing all drawing stuff ourself: */ … … 362 361 #if 0 // TODO: Enable DDraw frame buffer! 363 362 #ifdef VBOX_GUI_USE_DDRAW 364 case VBoxDefs::DDRAWMode:363 case DDRAWMode: 365 364 m_pFrameBuffer = new UIDDRAWFrameBuffer(this); 366 365 if (!m_pFrameBuffer || m_pFrameBuffer->address() == NULL) … … 368 367 if (m_pFrameBuffer) 369 368 delete m_pFrameBuffer; 370 m_mode = VBoxDefs::QImageMode;369 m_mode = QImageMode; 371 370 m_pFrameBuffer = new UIFrameBufferQImage(this); 372 371 } … … 375 374 #endif 376 375 #ifdef VBOX_GUI_USE_QUARTZ2D 377 case VBoxDefs::Quartz2DMode:376 case Quartz2DMode: 378 377 { 379 378 /* Indicate that we are doing all drawing stuff ourself: */ … … 527 526 { 528 527 /* Process pending frame-buffer resize events: */ 529 QApplication::sendPostedEvents(this, VBoxDefs::ResizeEventType);528 QApplication::sendPostedEvents(this, ResizeEventType); 530 529 if ( 0 531 530 #ifdef VBOX_GUI_USE_QIMAGE 532 || vboxGlobal().vmRenderMode() == VBoxDefs::QImageMode531 || vboxGlobal().vmRenderMode() == QImageMode 533 532 #endif 534 533 #ifdef VBOX_GUI_USE_SDL 535 || vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode534 || vboxGlobal().vmRenderMode() == SDLMode 536 535 #endif 537 536 #ifdef VBOX_GUI_USE_QUARTZ2D 538 || vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode537 || vboxGlobal().vmRenderMode() == Quartz2DMode 539 538 #endif 540 539 #ifdef VBOX_WITH_VIDEOHWACCEL … … 674 673 675 674 /* Load machine view hint: */ 676 QString strKey = makeExtraDataKeyPerMonitor 677 (VBoxDefs::GUI_LastGuestSizeHint); 675 QString strKey = makeExtraDataKeyPerMonitor(GUI_LastGuestSizeHint); 678 676 QString strValue = machine.GetExtraData(strKey); 679 677 … … 706 704 707 705 /* Save machine view hint: */ 708 QString strKey = makeExtraDataKeyPerMonitor 709 (VBoxDefs::GUI_LastGuestSizeHint); 706 QString strKey = makeExtraDataKeyPerMonitor(GUI_LastGuestSizeHint); 710 707 QString strValue = QString("%1,%2").arg(sizeHint.width()).arg(sizeHint.height()); 711 708 machine.SetExtraData(strKey, strValue); … … 838 835 { 839 836 # ifdef VBOX_GUI_USE_QUARTZ2D 840 if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode)837 if (vboxGlobal().vmRenderMode() == Quartz2DMode) 841 838 { 842 839 /* If the render mode is Quartz2D we could use the CGImageRef … … 951 948 } 952 949 953 VBoxDefs::RenderMode UIMachineView::getRenderMode() const950 RenderMode UIMachineView::getRenderMode() const 954 951 { 955 952 if (visualStateType() != UIVisualStateType_Scale) … … 964 961 { 965 962 #ifdef VBOX_GUI_USE_QUARTZ2D 966 case VBoxDefs::Quartz2DMode:967 return VBoxDefs::Quartz2DMode;963 case Quartz2DMode: 964 return Quartz2DMode; 968 965 #endif /* VBOX_GUI_USE_QUARTZ2D */ 969 966 default: 970 967 #ifdef VBOX_GUI_USE_QIMAGE 971 case VBoxDefs::QImageMode:972 return VBoxDefs::QImageMode;968 case QImageMode: 969 return QImageMode; 973 970 #endif /* VBOX_GUI_USE_QIMAGE */ 974 971 break; … … 982 979 switch (pEvent->type()) 983 980 { 984 case VBoxDefs::RepaintEventType:981 case RepaintEventType: 985 982 { 986 983 UIRepaintEvent *pPaintEvent = static_cast<UIRepaintEvent*>(pEvent); … … 992 989 #ifdef Q_WS_MAC 993 990 /* Event posted OnShowWindow: */ 994 case VBoxDefs::ShowWindowEventType:991 case ShowWindowEventType: 995 992 { 996 993 /* Dunno what Qt3 thinks a window that has minimized to the dock should be - it is not hidden, … … 1006 1003 1007 1004 #ifdef VBOX_WITH_VIDEOHWACCEL 1008 case V BoxDefs::VHWACommandProcessType:1005 case VHWACommandProcessType: 1009 1006 { 1010 1007 m_pFrameBuffer->doProcessVHWACommand(pEvent); … … 1103 1100 1104 1101 #ifdef VBOX_GUI_USE_QUARTZ2D 1105 if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode && m_pFrameBuffer)1102 if (vboxGlobal().vmRenderMode() == Quartz2DMode && m_pFrameBuffer) 1106 1103 { 1107 1104 m_pFrameBuffer->paintEvent(pPaintEvent); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineView.h
r41587 r41689 25 25 26 26 /* GUI includes: */ 27 #include "UIDefs.h" 27 28 #include "UIMachineDefs.h" 28 29 #ifdef Q_WS_MAC … … 183 184 /** Returns the current rendering mode. 184 185 * @note contains special case logic for scale mode. */ 185 VBoxDefs::RenderMode getRenderMode() const;186 RenderMode getRenderMode() const; 186 187 187 188 /* Cross-platforms event processors: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
r41608 r41689 284 284 285 285 /* Check if there is a close hock script defined. */ 286 const QString& strScript = m.GetExtraData( VBoxDefs::GUI_CloseActionHook);286 const QString& strScript = m.GetExtraData(GUI_CloseActionHook); 287 287 if (!strScript.isEmpty()) 288 288 { … … 298 298 299 299 /* Check which close actions are disallowed: */ 300 QStringList restictedActionsList = m.GetExtraData( VBoxDefs::GUI_RestrictedCloseActions).split(',');300 QStringList restictedActionsList = m.GetExtraData(GUI_RestrictedCloseActions).split(','); 301 301 bool fIsStateSavingAllowed = !restictedActionsList.contains("SaveState", Qt::CaseInsensitive); 302 302 bool fIsACPIShutdownAllowed = !restictedActionsList.contains("Shutdown", Qt::CaseInsensitive); … … 333 333 334 334 /* Read the last user's choice for the given VM: */ 335 QStringList lastAction = m.GetExtraData( VBoxDefs::GUI_LastCloseAction).split(',');335 QStringList lastAction = m.GetExtraData(GUI_LastCloseAction).split(','); 336 336 337 337 /* Check which button should be initially chosen: */ … … 473 473 { 474 474 /* Read the last user's choice for the given VM: */ 475 QStringList prevAction = m.GetExtraData( VBoxDefs::GUI_LastCloseAction).split(',');475 QStringList prevAction = m.GetExtraData(GUI_LastCloseAction).split(','); 476 476 /* Memorize the last user's choice for the given VM: */ 477 477 QString lastAction = strPowerOff; … … 487 487 if (dlg.mCbDiscardCurState->isChecked()) 488 488 (lastAction += ",") += strDiscardCurState; 489 m.SetExtraData( VBoxDefs::GUI_LastCloseAction, lastAction);489 m.SetExtraData(GUI_LastCloseAction, lastAction); 490 490 } 491 491 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r41591 r41689 771 771 { 772 772 #if 0 // TODO: Move that to fullscreen event-handler: 773 if (vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode)773 if (vboxGlobal().vmRenderMode() != SDLMode) 774 774 { 775 775 /* try to automatically scroll the guest canvas if the … … 798 798 int iVw = m_views[uScreenId]->visibleWidth(), iVh = m_views[uScreenId]->visibleHeight(); 799 799 800 if (vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode)800 if (vboxGlobal().vmRenderMode() != SDLMode) 801 801 { 802 802 /* Try to automatically scroll the guest canvas if the -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r41587 r41689 25 25 26 26 /* GUI includes: */ 27 #include "UIDefs.h" 27 28 #include "UIMultiScreenLayout.h" 28 29 #include "UIActionPoolRuntime.h" … … 99 100 { 100 101 /* If the user ever selected a combination in the view menu, we have the following entry: */ 101 QString strTest = machine.GetExtraData(QString("%1%2").arg( VBoxDefs::GUI_VirtualScreenToHostScreen).arg(i));102 QString strTest = machine.GetExtraData(QString("%1%2").arg(GUI_VirtualScreenToHostScreen).arg(i)); 102 103 bool fOk; 103 104 int cScreen = strTest.toInt(&fOk); … … 113 114 * to the target screens and they will magically open there in 114 115 * seamless/fullscreen also. */ 115 QString strTest1 = machine.GetExtraData( VBoxDefs::GUI_LastWindowPosition + (i > 0 ? QString::number(i): ""));116 QString strTest1 = machine.GetExtraData(GUI_LastNormalWindowPosition + (i > 0 ? QString::number(i): "")); 116 117 QRegExp posParser("(-?\\d+),(-?\\d+),(-?\\d+),(-?\\d+)"); 117 118 if (posParser.exactMatch(strTest1)) … … 257 258 { 258 259 int iHostScreen = m_pScreenMap->value(i); 259 machine.SetExtraData(QString("%1%2").arg( VBoxDefs::GUI_VirtualScreenToHostScreen).arg(i), QString::number(iHostScreen));260 machine.SetExtraData(QString("%1%2").arg(GUI_VirtualScreenToHostScreen).arg(i), QString::number(iHostScreen)); 260 261 QList<QAction*> screenActions = viewActions.at(i)->menu()->actions(); 261 262 for (int w = 0; w < screenActions.size(); ++w) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r41615 r41689 720 720 721 721 /* Is there should be First RUN Wizard? */ 722 strSettings = machine.GetExtraData( VBoxDefs::GUI_FirstRun);722 strSettings = machine.GetExtraData(GUI_FirstRun); 723 723 if (strSettings == "yes") 724 724 m_fIsFirstTimeStarted = true; 725 725 726 726 /* Ignore mediums mounted at runtime? */ 727 strSettings = machine.GetExtraData( VBoxDefs::GUI_SaveMountedAtRuntime);727 strSettings = machine.GetExtraData(GUI_SaveMountedAtRuntime); 728 728 if (strSettings == "no") 729 729 m_fIsIgnoreRuntimeMediumsChanging = true; 730 730 731 731 /* Should guest autoresize? */ 732 strSettings = machine.GetExtraData( VBoxDefs::GUI_AutoresizeGuest);732 strSettings = machine.GetExtraData(GUI_AutoresizeGuest); 733 733 QAction *pGuestAutoresizeSwitch = gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize); 734 734 pGuestAutoresizeSwitch->setChecked(strSettings != "off"); … … 752 752 { 753 753 /* Disable First RUN Wizard for the since now: */ 754 machine.SetExtraData( VBoxDefs::GUI_FirstRun, QString());754 machine.SetExtraData(GUI_FirstRun, QString()); 755 755 756 756 /* Remember if guest should autoresize: */ 757 machine.SetExtraData( VBoxDefs::GUI_AutoresizeGuest,757 machine.SetExtraData(GUI_AutoresizeGuest, 758 758 gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize)->isChecked() ? 759 759 QString() : "off"); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r41598 r41689 23 23 #include <QObject> 24 24 #include <QCursor> 25 #include <QEvent> 25 26 26 27 /* GUI includes: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r41587 r41689 209 209 && m_pScreenLayout->isHostTaskbarCovert()) 210 210 { 211 QString testStr = vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_PresentationModeEnabled).toLower();211 QString testStr = vboxGlobal().virtualBox().GetExtraData(GUI_PresentationModeEnabled).toLower(); 212 212 /* Default to false if it is an empty value */ 213 213 if (testStr.isEmpty() || testStr == "false") -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineViewFullscreen.cpp
r41107 r41689 97 97 switch (pEvent->type()) 98 98 { 99 case VBoxDefs::ResizeEventType:99 case ResizeEventType: 100 100 { 101 101 return guestResizeEvent(pEvent, true); … … 201 201 * We need to do that because we cannot correctly draw in a scrolled window in SDL mode. 202 202 * In all other modes, or when auto-resize is in force, this function does nothing. */ 203 if (vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode)203 if (vboxGlobal().vmRenderMode() == SDLMode) 204 204 { 205 205 if (!uisession()->isGuestSupportsGraphics() || !m_bIsGuestAutoresizeEnabled) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp
r41587 r41689 27 27 28 28 /* GUI includes: */ 29 #include "UIDefs.h" 29 30 #include "VBoxMiniToolBar.h" 30 31 #include "UISession.h" … … 111 112 112 113 /* Make sure mini-toolbar is necessary: */ 113 bool fIsActive = m.GetExtraData( VBoxDefs::GUI_ShowMiniToolBar) != "no";114 bool fIsActive = m.GetExtraData(GUI_ShowMiniToolBar) != "no"; 114 115 if (!fIsActive) 115 116 return; 116 117 117 118 /* Get the mini-toolbar alignment: */ 118 bool fIsAtTop = m.GetExtraData( VBoxDefs::GUI_MiniToolBarAlignment) == "top";119 bool fIsAtTop = m.GetExtraData(GUI_MiniToolBarAlignment) == "top"; 119 120 /* Get the mini-toolbar auto-hide feature availability: */ 120 bool fIsAutoHide = m.GetExtraData( VBoxDefs::GUI_MiniToolBarAutoHide) != "off";121 bool fIsAutoHide = m.GetExtraData(GUI_MiniToolBarAutoHide) != "off"; 121 122 m_pMiniToolBar = new VBoxMiniToolBar(centralWidget(), 122 123 fIsAtTop ? VBoxMiniToolBar::AlignTop : VBoxMiniToolBar::AlignBottom, … … 142 143 143 144 /* Save mini-toolbar settings: */ 144 machine().SetExtraData( VBoxDefs::GUI_MiniToolBarAutoHide, m_pMiniToolBar->isAutoHide() ? QString() : "off");145 machine().SetExtraData(GUI_MiniToolBarAutoHide, m_pMiniToolBar->isAutoHide() ? QString() : "off"); 145 146 /* Delete mini-toolbar: */ 146 147 delete m_pMiniToolBar; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.cpp
r41107 r41689 97 97 switch (pEvent->type()) 98 98 { 99 case VBoxDefs::ResizeEventType:99 case ResizeEventType: 100 100 { 101 101 return guestResizeEvent(pEvent, false); … … 198 198 /* We send a guest size hint if needed to reverse a transition 199 199 * to fullscreen or seamless. */ 200 QString strKey = makeExtraDataKeyPerMonitor 201 (VBoxDefs::GUI_LastGuestSizeHintWasFullscreen); 200 QString strKey = makeExtraDataKeyPerMonitor(GUI_LastGuestSizeHintWasFullscreen); 202 201 QString strHintSent = machine.GetExtraData(strKey); 203 202 if (!strHintSent.isEmpty()) … … 270 269 availableGeo = dwt->availableGeometry(pTopLevelWidget->pos()); 271 270 272 frameGeo = VBoxGlobal::normalizeGeometry(frameGeo, availableGeo, vboxGlobal().vmRenderMode() != VBoxDefs::SDLMode /* can resize? */);271 frameGeo = VBoxGlobal::normalizeGeometry(frameGeo, availableGeo, vboxGlobal().vmRenderMode() != SDLMode /* can resize? */); 273 272 } 274 273 … … 314 313 * We need to do that because we cannot correctly draw in a scrolled window in SDL mode. 315 314 * In all other modes, or when auto-resize is in force, this function does nothing. */ 316 if (vboxGlobal().vmRenderMode() == VBoxDefs::SDLMode)315 if (vboxGlobal().vmRenderMode() == SDLMode) 317 316 { 318 317 if (!uisession()->isGuestSupportsGraphics() || !m_bIsGuestAutoresizeEnabled) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r41591 r41689 338 338 { 339 339 /* Load window position settings: */ 340 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg( VBoxDefs::GUI_LastNormalWindowPosition) :341 QString("%1%2").arg( VBoxDefs::GUI_LastNormalWindowPosition).arg(m_uScreenId);340 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg(GUI_LastNormalWindowPosition) : 341 QString("%1%2").arg(GUI_LastNormalWindowPosition).arg(m_uScreenId); 342 342 QStringList strPositionSettings = m.GetExtraDataStringList(strPositionAddress); 343 343 bool ok = !strPositionSettings.isEmpty(), max = false; … … 356 356 else ok = false; 357 357 if (ok && strPositionSettings.size() > 4) 358 max = strPositionSettings[4] == VBoxDefs::GUI_LastWindowState_Max;358 max = strPositionSettings[4] == GUI_LastWindowState_Max; 359 359 QRect ar = ok ? QApplication::desktop()->availableGeometry(QPoint(x, y)) : 360 360 QApplication::desktop()->availableGeometry(this); … … 439 439 .arg(m_normalGeometry.width()).arg(m_normalGeometry.height()); 440 440 if (isMaximizedChecked()) 441 strWindowPosition += QString(",%1").arg( VBoxDefs::GUI_LastWindowState_Max);442 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg( VBoxDefs::GUI_LastNormalWindowPosition) :443 QString("%1%2").arg( VBoxDefs::GUI_LastNormalWindowPosition).arg(m_uScreenId);441 strWindowPosition += QString(",%1").arg(GUI_LastWindowState_Max); 442 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg(GUI_LastNormalWindowPosition) : 443 QString("%1%2").arg(GUI_LastNormalWindowPosition).arg(m_uScreenId); 444 444 m.SetExtraData(strPositionAddress, strWindowPosition); 445 445 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.cpp
r41591 r41689 161 161 switch (pEvent->type()) 162 162 { 163 case VBoxDefs::ResizeEventType:163 case ResizeEventType: 164 164 { 165 165 /* Some situations require framebuffer resize events to be ignored at all, … … 192 192 } 193 193 194 case VBoxDefs::RepaintEventType:194 case RepaintEventType: 195 195 { 196 196 UIRepaintEvent *pPaintEvent = static_cast<UIRepaintEvent*>(pEvent); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineWindowScale.cpp
r41587 r41689 29 29 30 30 /* GUI includes: */ 31 #include "UIDefs.h" 31 32 #include "UISession.h" 32 33 #include "UIMachineLogic.h" … … 110 111 /* Load extra-data settings: */ 111 112 { 112 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg( VBoxDefs::GUI_LastScaleWindowPosition) :113 QString("%1%2").arg( VBoxDefs::GUI_LastScaleWindowPosition).arg(m_uScreenId);113 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg(GUI_LastScaleWindowPosition) : 114 QString("%1%2").arg(GUI_LastScaleWindowPosition).arg(m_uScreenId); 114 115 QStringList strPositionSettings = m.GetExtraDataStringList(strPositionAddress); 115 116 … … 130 131 else ok = false; 131 132 if (ok && strPositionSettings.size() > 4) 132 max = strPositionSettings[4] == VBoxDefs::GUI_LastWindowState_Max;133 max = strPositionSettings[4] == GUI_LastWindowState_Max; 133 134 134 135 QRect ar = ok ? QApplication::desktop()->availableGeometry(QPoint(x, y)) : … … 169 170 .arg(m_normalGeometry.width()).arg(m_normalGeometry.height()); 170 171 if (isMaximizedChecked()) 171 strWindowPosition += QString(",%1").arg( VBoxDefs::GUI_LastWindowState_Max);172 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg( VBoxDefs::GUI_LastScaleWindowPosition) :173 QString("%1%2").arg( VBoxDefs::GUI_LastScaleWindowPosition).arg(m_uScreenId);172 strWindowPosition += QString(",%1").arg(GUI_LastWindowState_Max); 173 QString strPositionAddress = m_uScreenId == 0 ? QString("%1").arg(GUI_LastScaleWindowPosition) : 174 QString("%1%2").arg(GUI_LastScaleWindowPosition).arg(m_uScreenId); 174 175 m.SetExtraData(strPositionAddress, strWindowPosition); 175 176 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineViewSeamless.cpp
r41591 r41689 101 101 switch (pEvent->type()) 102 102 { 103 case VBoxDefs::SetRegionEventType:103 case SetRegionEventType: 104 104 { 105 105 /* Get region-update event: */ … … 115 115 } 116 116 117 case VBoxDefs::ResizeEventType:117 case ResizeEventType: 118 118 { 119 119 return guestResizeEvent(pEvent, true); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp
r41587 r41689 143 143 144 144 /* Make sure mini-toolbar is necessary: */ 145 bool fIsActive = m.GetExtraData( VBoxDefs::GUI_ShowMiniToolBar) != "no";145 bool fIsActive = m.GetExtraData(GUI_ShowMiniToolBar) != "no"; 146 146 if (!fIsActive) 147 147 return; 148 148 149 149 /* Get the mini-toolbar alignment: */ 150 bool fIsAtTop = m.GetExtraData( VBoxDefs::GUI_MiniToolBarAlignment) == "top";150 bool fIsAtTop = m.GetExtraData(GUI_MiniToolBarAlignment) == "top"; 151 151 /* Get the mini-toolbar auto-hide feature availability: */ 152 bool fIsAutoHide = m.GetExtraData( VBoxDefs::GUI_MiniToolBarAutoHide) != "off";152 bool fIsAutoHide = m.GetExtraData(GUI_MiniToolBarAutoHide) != "off"; 153 153 m_pMiniToolBar = new VBoxMiniToolBar(centralWidget(), 154 154 fIsAtTop ? VBoxMiniToolBar::AlignTop : VBoxMiniToolBar::AlignBottom, … … 192 192 193 193 /* Save mini-toolbar settings: */ 194 machine().SetExtraData( VBoxDefs::GUI_MiniToolBarAutoHide, m_pMiniToolBar->isAutoHide() ? QString() : "off");194 machine().SetExtraData(GUI_MiniToolBarAutoHide, m_pMiniToolBar->isAutoHide() ? QString() : "off"); 195 195 /* Delete mini-toolbar: */ 196 196 delete m_pMiniToolBar; … … 348 348 #elif defined (Q_WS_MAC) 349 349 # if defined (VBOX_GUI_USE_QUARTZ2D) 350 if (vboxGlobal().vmRenderMode() == VBoxDefs::Quartz2DMode)350 if (vboxGlobal().vmRenderMode() == Quartz2DMode) 351 351 { 352 352 /* If we are using the Quartz2D backend we have to trigger -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorShortcuts.cpp
r39932 r41689 57 57 m_Shortcuts[AboutShortcut] = UIKeySequence("About"); 58 58 /* Get a list of overwritten keys */ 59 loadExtraData( VBoxDefs::GUI_Input_SelectorShortcuts, EndShortcutType);59 loadExtraData(GUI_Input_SelectorShortcuts, EndShortcutType); 60 60 } 61 61 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r41616 r41689 146 146 /* Load toolbar/statusbar availability settings: */ 147 147 CVirtualBox vbox = vboxGlobal().virtualBox(); 148 QString strToolbar = vbox.GetExtraData( VBoxDefs::GUI_Toolbar);149 QString strStatusbar = vbox.GetExtraData( VBoxDefs::GUI_Statusbar);148 QString strToolbar = vbox.GetExtraData(GUI_Toolbar); 149 QString strStatusbar = vbox.GetExtraData(GUI_Statusbar); 150 150 bool fToolbar = strToolbar.isEmpty() || strToolbar == "true"; 151 151 bool fStatusbar = strStatusbar.isEmpty() || strStatusbar == "true"; … … 176 176 m_pBar->show(); 177 177 #endif /* !Q_WS_MAC */ 178 vbox.SetExtraData( VBoxDefs::GUI_Toolbar, "true");178 vbox.SetExtraData(GUI_Toolbar, "true"); 179 179 } 180 180 else … … 185 185 m_pBar->hide(); 186 186 #endif /* !Q_WS_MAC */ 187 vbox.SetExtraData( VBoxDefs::GUI_Toolbar, "false");187 vbox.SetExtraData(GUI_Toolbar, "false"); 188 188 } 189 189 } … … 193 193 { 194 194 statusBar()->show(); 195 vbox.SetExtraData( VBoxDefs::GUI_Statusbar, "true");195 vbox.SetExtraData(GUI_Statusbar, "true"); 196 196 } 197 197 else 198 198 { 199 199 statusBar()->hide(); 200 vbox.SetExtraData( VBoxDefs::GUI_Statusbar, "false");200 vbox.SetExtraData(GUI_Statusbar, "false"); 201 201 } 202 202 } … … 291 291 QString strTitle = tr("Select a virtual machine file"); 292 292 QStringList extensions; 293 for (int i = 0; i < VBox Defs::VBoxFileExts.size(); ++i)294 extensions << QString("*.%1").arg(VBox Defs::VBoxFileExts[i]);293 for (int i = 0; i < VBoxFileExts.size(); ++i) 294 extensions << QString("*.%1").arg(VBoxFileExts[i]); 295 295 QString strFilter = tr("Virtual machine files (%1)").arg(extensions.join(" ")); 296 296 /* Create open file dialog: */ … … 792 792 m_pVMModel->addItem(*m); 793 793 /* Apply the saved sort order. */ 794 m_pVMModel->sortByIdList(vbox.GetExtraDataStringList( VBoxDefs::GUI_SelectorVMPositions));794 m_pVMModel->sortByIdList(vbox.GetExtraDataStringList(GUI_SelectorVMPositions)); 795 795 /* Update details page. */ 796 796 sltCurrentVMItemChanged(); … … 962 962 if (!strFile.isEmpty() && QFile::exists(strFile)) 963 963 { 964 if (VBoxGlobal::hasAllowedExtension(strFile, VBox Defs::VBoxFileExts))964 if (VBoxGlobal::hasAllowedExtension(strFile, VBoxFileExts)) 965 965 { 966 966 /* VBox config files. */ … … 977 977 sltShowAddMachineDialog(strFile); 978 978 } 979 else if (VBoxGlobal::hasAllowedExtension(strFile, VBoxDefs::OVFFileExts))979 else if (VBoxGlobal::hasAllowedExtension(strFile, OVFFileExts)) 980 980 { 981 981 /* OVF/OVA. Only one file at the time. */ … … 983 983 break; 984 984 } 985 else if (VBoxGlobal::hasAllowedExtension(strFile, VBox Defs::VBoxExtPackFileExts))985 else if (VBoxGlobal::hasAllowedExtension(strFile, VBoxExtPackFileExts)) 986 986 { 987 987 UIGlobalSettingsExtension::doInstallation(strFile, QString(), this, NULL); … … 1263 1263 /* We have to invert the isVisible check one time, cause this event 1264 1264 * is sent *before* the real toggle is done. Really intuitive Trolls. */ 1265 vbox.SetExtraData( VBoxDefs::GUI_Toolbar, !::darwinIsToolbarVisible(mVMToolBar) ? "true" : "false");1265 vbox.SetExtraData(GUI_Toolbar, !::darwinIsToolbarVisible(mVMToolBar) ? "true" : "false"); 1266 1266 break; 1267 1267 } … … 1684 1684 /* Restore window position: */ 1685 1685 { 1686 QString strWinPos = vbox.GetExtraData( VBoxDefs::GUI_LastWindowPosition);1686 QString strWinPos = vbox.GetExtraData(GUI_LastSelectorWindowPosition); 1687 1687 1688 1688 bool ok = false, max = false; … … 1696 1696 h = strWinPos.section(',', 3, 3).toInt(&ok); 1697 1697 if (ok) 1698 max = strWinPos.section(',', 4, 4) == VBoxDefs::GUI_LastWindowState_Max;1698 max = strWinPos.section(',', 4, 4) == GUI_LastWindowState_Max; 1699 1699 1700 1700 QRect ar = ok ? QApplication::desktop()->availableGeometry(QPoint(x, y)) : … … 1727 1727 /* Restore selected VM(s): */ 1728 1728 { 1729 QString strPrevVMId = vbox.GetExtraData( VBoxDefs::GUI_LastVMSelected);1729 QString strPrevVMId = vbox.GetExtraData(GUI_LastVMSelected); 1730 1730 1731 1731 m_pVMListView->selectItemById(strPrevVMId); … … 1734 1734 /* Restore splitter handle position: */ 1735 1735 { 1736 QList<int> sizes = vbox.GetExtraDataIntList( VBoxDefs::GUI_SplitterSizes);1736 QList<int> sizes = vbox.GetExtraDataIntList(GUI_SplitterSizes); 1737 1737 1738 1738 if (sizes.size() == 2) … … 1742 1742 /* Restore toolbar and statusbar visibility: */ 1743 1743 { 1744 QString strToolbar = vbox.GetExtraData( VBoxDefs::GUI_Toolbar);1745 QString strStatusbar = vbox.GetExtraData( VBoxDefs::GUI_Statusbar);1744 QString strToolbar = vbox.GetExtraData(GUI_Toolbar); 1745 QString strStatusbar = vbox.GetExtraData(GUI_Statusbar); 1746 1746 1747 1747 #ifdef Q_WS_MAC … … 1775 1775 if (isMaximized()) 1776 1776 #endif /* !Q_WS_MAC */ 1777 strWinPos += QString(",%1").arg( VBoxDefs::GUI_LastWindowState_Max);1778 1779 vbox.SetExtraData( VBoxDefs::GUI_LastWindowPosition, strWinPos);1777 strWinPos += QString(",%1").arg(GUI_LastWindowState_Max); 1778 1779 vbox.SetExtraData(GUI_LastSelectorWindowPosition, strWinPos); 1780 1780 } 1781 1781 … … 1784 1784 UIVMItem *pItem = m_pVMListView->currentItem(); 1785 1785 QString strCurrentVMId = pItem ? QString(pItem->id()) : QString(); 1786 vbox.SetExtraData( VBoxDefs::GUI_LastVMSelected, strCurrentVMId);1787 vbox.SetExtraDataStringList( VBoxDefs::GUI_SelectorVMPositions, m_pVMModel->idList());1786 vbox.SetExtraData(GUI_LastVMSelected, strCurrentVMId); 1787 vbox.SetExtraDataStringList(GUI_SelectorVMPositions, m_pVMModel->idList()); 1788 1788 } 1789 1789 1790 1790 /* Save splitter handle position: */ 1791 1791 { 1792 vbox.SetExtraDataIntList( VBoxDefs::GUI_SplitterSizes, m_pSplitter->sizes());1792 vbox.SetExtraDataIntList(GUI_SplitterSizes, m_pSplitter->sizes()); 1793 1793 } 1794 1794 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
r41608 r41689 1654 1654 1655 1655 /* Load section configuration from extra data: */ 1656 QStringList values = vboxGlobal().virtualBox().GetExtraDataStringList( VBoxDefs::GUI_DetailsPageBoxes,1656 QStringList values = vboxGlobal().virtualBox().GetExtraDataStringList(GUI_DetailsPageBoxes, 1657 1657 /* Default keys: */ 1658 1658 QStringList() … … 1716 1716 } 1717 1717 /* Save section configuration to extra data: */ 1718 vboxGlobal().virtualBox().SetExtraDataStringList( VBoxDefs::GUI_DetailsPageBoxes, m_sectionSettings.values());1718 vboxGlobal().virtualBox().SetExtraDataStringList(GUI_DetailsPageBoxes, m_sectionSettings.values()); 1719 1719 } 1720 1720 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMItem.cpp
r41608 r41689 264 264 * UIMessageCenter::confirm_machineDeletion() */ 265 265 QFileInfo fi(m_strSettingsFile); 266 QString name = VBoxGlobal::hasAllowedExtension(fi.completeSuffix(), VBox Defs::VBoxFileExts) ?266 QString name = VBoxGlobal::hasAllowedExtension(fi.completeSuffix(), VBoxFileExts) ? 267 267 fi.completeBaseName() : fi.fileName(); 268 268 needsResort = name != m_strName; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMListView.cpp
r40202 r41689 517 517 QList<QUrl> list = pEvent->mimeData()->urls(); 518 518 QString file = list.at(0).toLocalFile(); 519 if (VBoxGlobal::hasAllowedExtension(file, VBox Defs::VBoxFileExts))519 if (VBoxGlobal::hasAllowedExtension(file, VBoxFileExts)) 520 520 { 521 521 Qt::DropAction action = Qt::IgnoreAction; … … 529 529 pEvent->accept(); 530 530 } 531 }else if ( VBoxGlobal::hasAllowedExtension(file, VBoxDefs::OVFFileExts)531 }else if ( VBoxGlobal::hasAllowedExtension(file, OVFFileExts) 532 532 && pEvent->possibleActions().testFlag(Qt::CopyAction)) 533 533 { 534 534 pEvent->setDropAction(Qt::CopyAction); 535 535 pEvent->accept(); 536 }else if ( VBoxGlobal::hasAllowedExtension(file, VBox Defs::VBoxExtPackFileExts)536 }else if ( VBoxGlobal::hasAllowedExtension(file, VBoxExtPackFileExts) 537 537 && pEvent->possibleActions().testFlag(Qt::CopyAction)) 538 538 { -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMPreviewWindow.cpp
r41591 r41689 82 82 83 83 /* Load preview update interval: */ 84 QString strInterval = vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_PreviewUpdate);84 QString strInterval = vboxGlobal().virtualBox().GetExtraData(GUI_PreviewUpdate); 85 85 /* Parse loaded value: */ 86 86 UpdateInterval interval = m_intervals.key(strInterval, UpdateInterval_1000ms); … … 375 375 } 376 376 if (fSave && m_intervals.contains(interval)) 377 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_PreviewUpdate, m_intervals[interval]);377 vboxGlobal().virtualBox().SetExtraData(GUI_PreviewUpdate, m_intervals[interval]); 378 378 } 379 379 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxTrayIcon.cpp
r38977 r41689 87 87 if (mActive) 88 88 { 89 vboxGlobal().virtualBox().SetExtraData (VBoxDefs::GUI_TrayIconWinID, 90 QString::null); 89 vboxGlobal().virtualBox().SetExtraData(GUI_TrayIconWinID, QString::null); 91 90 hide(); 92 91 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r41587 r41689 845 845 * the boot order or disk configuration were changed: */ 846 846 if (m_fResetFirstRunFlag) 847 m_machine.SetExtraData( VBoxDefs::GUI_FirstRun, QString::null);847 m_machine.SetExtraData(GUI_FirstRun, QString::null); 848 848 849 849 /* Save settings finally: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
r41587 r41689 334 334 QString strTitle = tr("Select an extension package file"); 335 335 QStringList extensions; 336 for (int i = 0; i < VBox Defs::VBoxExtPackFileExts.size(); ++i)337 extensions << QString("*.%1").arg(VBox Defs::VBoxExtPackFileExts[i]);336 for (int i = 0; i < VBoxExtPackFileExts.size(); ++i) 337 extensions << QString("*.%1").arg(VBoxExtPackFileExts[i]); 338 338 QString strFilter = tr("Extension package files (%1)").arg(extensions.join(" ")); 339 339 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp
r34166 r41689 49 49 50 50 /* Fill internal variables with corresponding values: */ 51 VBoxUpdateData updateData(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_UpdateDate));51 VBoxUpdateData updateData(vboxGlobal().virtualBox().GetExtraData(GUI_UpdateDate)); 52 52 m_cache.m_fCheckEnabled = !updateData.isNoNeedToCheck(); 53 53 m_cache.m_periodIndex = updateData.periodIndex(); … … 103 103 /* Gather corresponding values from internal variables: */ 104 104 VBoxUpdateData newData(m_cache.m_periodIndex, m_cache.m_branchIndex); 105 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_UpdateDate, newData.data());105 vboxGlobal().virtualBox().SetExtraData(GUI_UpdateDate, newData.data()); 106 106 107 107 /* Upload properties & settings to data: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r41608 r41689 350 350 "the minimum amount required to switch the virtual machine to " 351 351 "fullscreen or seamless mode.") 352 .arg(vboxGlobal().formatSize(uNeedBytes, 0, VBoxDefs::FormatSize_RoundUp));352 .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp)); 353 353 return true; 354 354 } … … 362 362 strWarning = tr("you have assigned less than <b>%1</b> of video memory which is " 363 363 "the minimum amount required for HD Video to be played efficiently.") 364 .arg(vboxGlobal().formatSize(uNeedBytes, 0, VBoxDefs::FormatSize_RoundUp));364 .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp)); 365 365 return true; 366 366 } … … 379 379 strWarning = tr("you have 3D Acceleration enabled for a operation system which uses the WDDM video driver. " 380 380 "For maximal performance set the guest VRAM to at least <b>%1</b>.") 381 .arg(vboxGlobal().formatSize(uNeedBytes, 0, VBoxDefs::FormatSize_RoundUp));381 .arg(vboxGlobal().formatSize(uNeedBytes, 0, FormatSize_RoundUp)); 382 382 return true; 383 383 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r41608 r41689 90 90 generalData.m_strName = m_machine.GetName(); 91 91 generalData.m_strGuestOsTypeId = m_machine.GetOSTypeId(); 92 QString strSaveMountedAtRuntime = m_machine.GetExtraData( VBoxDefs::GUI_SaveMountedAtRuntime);92 QString strSaveMountedAtRuntime = m_machine.GetExtraData(GUI_SaveMountedAtRuntime); 93 93 generalData.m_fSaveMountedAtRuntime = strSaveMountedAtRuntime != "no"; 94 QString strShowMiniToolBar = m_machine.GetExtraData( VBoxDefs::GUI_ShowMiniToolBar);94 QString strShowMiniToolBar = m_machine.GetExtraData(GUI_ShowMiniToolBar); 95 95 generalData.m_fShowMiniToolBar = strShowMiniToolBar != "no"; 96 QString strMiniToolBarAlignment = m_machine.GetExtraData( VBoxDefs::GUI_MiniToolBarAlignment);96 QString strMiniToolBarAlignment = m_machine.GetExtraData(GUI_MiniToolBarAlignment); 97 97 generalData.m_fMiniToolBarAtTop = strMiniToolBarAlignment == "top"; 98 98 generalData.m_strSnapshotsFolder = m_machine.GetSnapshotFolder(); … … 174 174 /* Advanced tab: */ 175 175 m_machine.SetClipboardMode(generalData.m_clipboardMode); 176 m_machine.SetExtraData( VBoxDefs::GUI_SaveMountedAtRuntime, generalData.m_fSaveMountedAtRuntime ? "yes" : "no");177 m_machine.SetExtraData( VBoxDefs::GUI_ShowMiniToolBar, generalData.m_fShowMiniToolBar ? "yes" : "no");178 m_machine.SetExtraData( VBoxDefs::GUI_MiniToolBarAlignment, generalData.m_fMiniToolBarAtTop ? "top" : "bottom");176 m_machine.SetExtraData(GUI_SaveMountedAtRuntime, generalData.m_fSaveMountedAtRuntime ? "yes" : "no"); 177 m_machine.SetExtraData(GUI_ShowMiniToolBar, generalData.m_fShowMiniToolBar ? "yes" : "no"); 178 m_machine.SetExtraData(GUI_MiniToolBarAlignment, generalData.m_fMiniToolBarAtTop ? "top" : "bottom"); 179 179 /* Description tab: */ 180 180 m_machine.SetDescription(generalData.m_strDescription); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r41615 r41689 3171 3171 { 3172 3172 case UIMediumType_HardDisk: 3173 strRecentMediumAddress = VBoxDefs::GUI_RecentListHD;3173 strRecentMediumAddress = GUI_RecentListHD; 3174 3174 break; 3175 3175 case UIMediumType_DVD: 3176 strRecentMediumAddress = VBoxDefs::GUI_RecentListCD;3176 strRecentMediumAddress = GUI_RecentListCD; 3177 3177 break; 3178 3178 case UIMediumType_Floppy: 3179 strRecentMediumAddress = VBoxDefs::GUI_RecentListFD;3179 strRecentMediumAddress = GUI_RecentListFD; 3180 3180 break; 3181 3181 default: -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r41608 r41689 31 31 #include "UIMachineSettingsUSB.h" 32 32 #include "UIMachineSettingsUSBFilterDetails.h" 33 #include "VBoxDefs.h"34 33 #include "COMEnumsWrapper.h" 35 34 … … 43 42 #include "CExtPackManager.h" 44 43 #include "CExtPack.h" 45 46 /* Using declarations: */47 using namespace VBoxGlobalDefs;48 44 49 45 /** … … 420 416 usbData.m_fUSBEnabled = mGbUSB->isChecked(); 421 417 /* USB 2.0 (EHCI): */ 422 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find( UI_ExtPackName);418 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName); 423 419 usbData.m_fEHCIEnabled = extPack.isNull() || !extPack.GetUsable() ? false : mCbUSB2->isChecked(); 424 420 … … 579 575 NOREF(strWarningText); 580 576 #ifdef VBOX_WITH_EXTPACK 581 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find( UI_ExtPackName);577 CExtPack extPack = vboxGlobal().virtualBox().GetExtensionPackManager().Find(GUI_ExtPackName); 582 578 if (mGbUSB->isChecked() && mCbUSB2->isChecked() && (extPack.isNull() || !extPack.GetUsable())) 583 579 { … … 587 583 "After this you will be able to re-enable USB 2.0. " 588 584 "It will be disabled in the meantime unless you cancel the current settings changes.") 589 .arg( UI_ExtPackName);590 msgCenter().remindAboutUnsupportedUSB2( UI_ExtPackName, this);585 .arg(GUI_ExtPackName); 586 msgCenter().remindAboutUnsupportedUSB2(GUI_ExtPackName, this); 591 587 return true; 592 588 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
r35862 r41689 20 20 /* Local includes */ 21 21 #include "UIHotKeyEditor.h" 22 #include "VBoxDefs.h"23 22 #include "VBoxGlobal.h" 24 23 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
r41415 r41689 62 62 QString strWizardName = nameForType(m_type); 63 63 /* Load mode settings: */ 64 QStringList wizards = vboxGlobal().virtualBox().GetExtraDataStringList( VBoxDefs::GUI_HideDescriptionForWizards);64 QStringList wizards = vboxGlobal().virtualBox().GetExtraDataStringList(GUI_HideDescriptionForWizards); 65 65 66 66 /* Switch mode: */ … … 89 89 90 90 /* Save mode settings: */ 91 vboxGlobal().virtualBox().SetExtraDataStringList( VBoxDefs::GUI_HideDescriptionForWizards, wizards);91 vboxGlobal().virtualBox().SetExtraDataStringList(GUI_HideDescriptionForWizards, wizards); 92 92 93 93 /* Prepare: */ … … 551 551 return UIWizardMode_Basic; 552 552 /* Get mode from extra-data: */ 553 QStringList wizards = vboxGlobal().virtualBox().GetExtraDataStringList( VBoxDefs::GUI_HideDescriptionForWizards);553 QStringList wizards = vboxGlobal().virtualBox().GetExtraDataStringList(GUI_HideDescriptionForWizards); 554 554 if (wizards.contains(nameForType(type))) 555 555 return UIWizardMode_Expert; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r41587 r41689 124 124 /* Save attributes to GUI extra data: */ 125 125 StorageType storageType = field("storageType").value<StorageType>(); 126 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_Export_StorageType, QString::number(storageType));127 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_Export_Username, m_pLeUsername->text());128 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_Export_Hostname, m_pLeHostname->text());129 vboxGlobal().virtualBox().SetExtraData( VBoxDefs::GUI_Export_Bucket, m_pLeBucket->text());126 vboxGlobal().virtualBox().SetExtraData(GUI_Export_StorageType, QString::number(storageType)); 127 vboxGlobal().virtualBox().SetExtraData(GUI_Export_Username, m_pLeUsername->text()); 128 vboxGlobal().virtualBox().SetExtraData(GUI_Export_Hostname, m_pLeHostname->text()); 129 vboxGlobal().virtualBox().SetExtraData(GUI_Export_Bucket, m_pLeBucket->text()); 130 130 #endif 131 131 return true; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic1.cpp
r41610 r41689 59 59 QString settingsFile = machine.GetSettingsFilePath(); 60 60 QFileInfo fi(settingsFile); 61 strName = VBoxGlobal::hasAllowedExtension(fi.completeSuffix(), VBox Defs::VBoxFileExts) ? fi.completeBaseName() : fi.fileName();61 strName = VBoxGlobal::hasAllowedExtension(fi.completeSuffix(), VBoxFileExts) ? fi.completeBaseName() : fi.fileName(); 62 62 pixIcon = QPixmap(":/os_other.png").scaled(16, 16, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); 63 63 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic2.cpp
r41372 r41689 38 38 /* Load storage-type from GUI extra data: */ 39 39 bool ok; 40 StorageType storageType = StorageType(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_Export_StorageType).toInt(&ok));40 StorageType storageType = StorageType(vboxGlobal().virtualBox().GetExtraData(GUI_Export_StorageType).toInt(&ok)); 41 41 if (ok) 42 42 setStorageType(storageType); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageBasic3.cpp
r41372 r41689 42 42 /* Select default settings: */ 43 43 #if 0 44 m_pUsernameEditor->setText(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_Export_Username));45 m_pHostnameEditor->setText(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_Export_Hostname));46 m_pBucketEditor->setText(vboxGlobal().virtualBox().GetExtraData( VBoxDefs::GUI_Export_Bucket));44 m_pUsernameEditor->setText(vboxGlobal().virtualBox().GetExtraData(GUI_Export_Username)); 45 m_pHostnameEditor->setText(vboxGlobal().virtualBox().GetExtraData(GUI_Export_Hostname)); 46 m_pBucketEditor->setText(vboxGlobal().virtualBox().GetExtraData(GUI_Export_Bucket)); 47 47 #else 48 48 /* Do nothing for now... */ … … 307 307 { 308 308 const QString &strFile = m_pFileSelector->path().toLower(); 309 fResult = VBoxGlobal::hasAllowedExtension(strFile, VBoxDefs::OVFFileExts);309 fResult = VBoxGlobal::hasAllowedExtension(strFile, OVFFileExts); 310 310 if (fResult) 311 311 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageExpert.cpp
r41402 r41689 232 232 { 233 233 const QString &strFile = m_pFileSelector->path().toLower(); 234 fResult = VBoxGlobal::hasAllowedExtension(strFile, VBoxDefs::OVFFileExts);234 fResult = VBoxGlobal::hasAllowedExtension(strFile, OVFFileExts); 235 235 if (fResult) 236 236 { -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageBasic1.cpp
r41372 r41689 77 77 { 78 78 /* Make sure appliance file has allowed extension and exists: */ 79 return VBoxGlobal::hasAllowedExtension(m_pFileSelector->path().toLower(), VBoxDefs::OVFFileExts) &&79 return VBoxGlobal::hasAllowedExtension(m_pFileSelector->path().toLower(), OVFFileExts) && 80 80 QFileInfo(m_pFileSelector->path()).exists(); 81 81 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
r41402 r41689 92 92 { 93 93 /* Make sure appliance file has allowed extension and exists and appliance widget is valid: */ 94 return VBoxGlobal::hasAllowedExtension(m_pFileSelector->path().toLower(), VBoxDefs::OVFFileExts) &&94 return VBoxGlobal::hasAllowedExtension(m_pFileSelector->path().toLower(), OVFFileExts) && 95 95 QFileInfo(m_pFileSelector->path()).exists() && 96 96 m_pApplianceWidget->isValid(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r41615 r41689 24 24 #include "UIWizardNewVMPageBasic3.h" 25 25 #include "UIWizardNewVMPageExpert.h" 26 #include "VBoxDefs.h"27 26 #include "VBoxGlobal.h" 28 27 #include "UIMessageCenter.h" … … 33 32 #include "CExtPackManager.h" 34 33 #include "CStorageController.h" 35 36 /* Using declarations: */37 using namespace VBoxGlobalDefs;38 34 39 35 UIWizardNewVM::UIWizardNewVM(QWidget *pParent) … … 76 72 * Selecting an existing virtual hard drive will cancel the FirstRun wizard. */ 77 73 if (field("virtualDiskId").toString().isNull() || !field("virtualDisk").value<CMedium>().isNull()) 78 m_machine.SetExtraData( VBoxDefs::GUI_FirstRun, "yes");74 m_machine.SetExtraData(GUI_FirstRun, "yes"); 79 75 } 80 76 … … 104 100 * introduced by the new distribution model. */ 105 101 CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager(); 106 if (manager.IsExtPackUsable( UI_ExtPackName))102 if (manager.IsExtPackUsable(GUI_ExtPackName)) 107 103 usbController.SetEnabledEhci(true); 108 104 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
r41615 r41689 27 27 #include "UIWizardNewVMPageBasic3.h" 28 28 #include "UIWizardNewVM.h" 29 #include "VBoxDefs.h"30 29 #include "UIMessageCenter.h" 31 30 #include "UIIconPool.h"
Note:
See TracChangeset
for help on using the changeset viewer.