1 | /* $Id: UIMachineShortcuts.cpp 35634 2011-01-19 16:13:31Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | *
|
---|
4 | * VBox frontends: Qt GUI ("VirtualBox"):
|
---|
5 | * UIMachineShortcuts class definitions
|
---|
6 | */
|
---|
7 |
|
---|
8 | /*
|
---|
9 | * Copyright (C) 2011 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 | */
|
---|
19 |
|
---|
20 | /* Local includes */
|
---|
21 | #include "UIMachineShortcuts.h"
|
---|
22 |
|
---|
23 | template <> UIMachineShortcuts* UIShortcuts<UIMachineShortcuts>::m_pInstance = 0;
|
---|
24 |
|
---|
25 | UIMachineShortcuts::UIMachineShortcuts()
|
---|
26 | {
|
---|
27 | /* Defaults */
|
---|
28 | m_Shortcuts[FullscreenModeShortcut] = UIKeySequence("FullscreenMode", "F");
|
---|
29 | m_Shortcuts[SeamlessModeShortcut] = UIKeySequence("SeamlessMode", "L");
|
---|
30 | m_Shortcuts[ScaleModeShortcut] = UIKeySequence("ScaleMode", "C");
|
---|
31 | m_Shortcuts[GuestAutoresizeShortcut] = UIKeySequence("GuestAutoresize", "G");
|
---|
32 | m_Shortcuts[WindowAdjustShortcut] = UIKeySequence("WindowAdjust", "A");
|
---|
33 | m_Shortcuts[MouseIntegrationShortcut] = UIKeySequence("MouseIntegration" , "I");
|
---|
34 | m_Shortcuts[TypeCADShortcut] = UIKeySequence("TypeCAD", "Del");
|
---|
35 | m_Shortcuts[TypeCABSShortcut] = UIKeySequence("TypeCABS", "Backspace");
|
---|
36 | m_Shortcuts[TakeSnapshotShortcut] = UIKeySequence("TakeSnapshot", "S");
|
---|
37 | m_Shortcuts[InformationDialogShortcut] = UIKeySequence("InformationDialog", "N");
|
---|
38 | m_Shortcuts[PauseShortcut] = UIKeySequence("Pause", "P");
|
---|
39 | m_Shortcuts[ResetShortcut] = UIKeySequence("Reset", "R");
|
---|
40 | #ifdef Q_WS_MAC
|
---|
41 | m_Shortcuts[ShutdownShortcut] = UIKeySequence("Shutdown", "U");
|
---|
42 | #else /* Q_WS_MAC */
|
---|
43 | m_Shortcuts[ShutdownShortcut] = UIKeySequence("Shutdown", "H");
|
---|
44 | #endif /* Q_WS_MAC */
|
---|
45 | m_Shortcuts[CloseShortcut] = UIKeySequence("Close", "Q");
|
---|
46 | m_Shortcuts[NetworkAdaptersDialogShortcut] = UIKeySequence("NetworkAdaptersDialog");
|
---|
47 | m_Shortcuts[SharedFoldersDialogShortcut] = UIKeySequence("SharedFoldersDialog");
|
---|
48 | m_Shortcuts[VRDPServerShortcut] = UIKeySequence("VRDPServer");
|
---|
49 | m_Shortcuts[InstallGuestAdditionsShortcut] = UIKeySequence("InstallGuestAdditions", "D");
|
---|
50 | #ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
51 | m_Shortcuts[StatisticWindowShortcut] = UIKeySequence("StatisticWindow");
|
---|
52 | m_Shortcuts[CommandLineWindowShortcut] = UIKeySequence("CommandLineWindow");
|
---|
53 | m_Shortcuts[LoggingShortcut] = UIKeySequence("Logging");
|
---|
54 | #endif /* VBOX_WITH_DEBUGGER_GUI */
|
---|
55 | m_Shortcuts[HelpShortcut] = UIKeySequence("Help", QKeySequence::HelpContents);
|
---|
56 | m_Shortcuts[WebShortcut] = UIKeySequence("Web");
|
---|
57 | m_Shortcuts[ResetWarningsShortcut] = UIKeySequence("ResetWarnings");
|
---|
58 | #ifdef VBOX_WITH_REGISTRATION
|
---|
59 | m_Shortcuts[RegisterShortcut] = UIKeySequence("Register");
|
---|
60 | #endif /* VBOX_WITH_REGISTRATION */
|
---|
61 | m_Shortcuts[UpdateShortcut] = UIKeySequence("Update");
|
---|
62 | m_Shortcuts[AboutShortcut] = UIKeySequence("About");
|
---|
63 | /* Overwrite the key sequences with the one in extra data. */
|
---|
64 | loadExtraData(VBoxDefs::GUI_Input_MachineShortcuts, EndShortcutType);
|
---|
65 | }
|
---|
66 |
|
---|