UIActionPoolRuntime.h revision 123cf63fa2d7b42aeea7da2605e3a4971a722dad
/** @file
* VBox Qt GUI - UIActionPoolRuntime class declaration.
*/
/*
* Copyright (C) 2010-2014 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ___UIActionPoolRuntime_h___
#define ___UIActionPoolRuntime_h___
/* Qt includes: */
#include <QMap>
#include <QList>
/* GUI includes: */
#include "UIActionPool.h"
#include "UIExtraDataDefs.h"
/* Forward declarations: */
/** Runtime action-pool index enum.
* Naming convention is following:
* 1. Every menu index prepended with 'M',
* 2. Every simple-action index prepended with 'S',
* 3. Every toggle-action index presended with 'T',
* 4. Every polymorphic-action index presended with 'P',
* 5. Every sub-index contains full parent-index name. */
enum UIActionIndexRT
{
/* 'Machine' menu actions: */
#ifdef Q_WS_X11
#endif /* Q_WS_X11 */
/* 'View' menu actions: */
/* 'Devices' menu actions: */
#ifdef VBOX_WITH_DEBUGGER_GUI
/* 'Debugger' menu actions: */
#endif /* VBOX_WITH_DEBUGGER_GUI */
#ifdef Q_WS_MAC
/* 'Dock' menu actions: */
#endif /* Q_WS_MAC */
/* Maximum index: */
};
/** UIActionPool extension
* representing action-pool singleton for Runtime UI. */
{
/** Notifies about 'View' : 'Resize' menu action trigger. */
/** Notifies about 'View' : 'Multiscreen' menu action trigger. */
/** Defines UI session object reference.
* @note For menus which uses it to build contents. */
/** Returns UI session object reference. */
/** Defines UI multi-screen layout object reference.
* @note For menus which uses it to build contents. */
/** Returns UI multi-screen layout object reference. */
/** Returns whether the menu with passed @a type is allowed in menu-bar. */
/** Defines menu-bar @a restriction for passed @a level. */
/** Returns whether the action with passed @a type is allowed in the 'Machine' menu. */
/** Defines 'Machine' menu @a restriction for passed @a level. */
void setRestrictionForMenuMachine(UIActionRestrictionLevel level, RuntimeMenuMachineActionType restriction);
/** Returns whether the action with passed @a type is allowed in the 'View' menu. */
/** Defines 'View' menu @a restriction for passed @a level. */
void setRestrictionForMenuView(UIActionRestrictionLevel level, RuntimeMenuViewActionType restriction);
/** Returns whether the action with passed @a type is allowed in the 'Devices' menu. */
/** Defines 'Devices' menu @a restriction for passed @a level. */
void setRestrictionForMenuDevices(UIActionRestrictionLevel level, RuntimeMenuDevicesActionType restriction);
#ifdef VBOX_WITH_DEBUGGER_GUI
/** Returns whether the action with passed @a type is allowed in the 'Debug' menu. */
/** Defines 'Debug' menu @a restriction for passed @a level. */
void setRestrictionForMenuDebugger(UIActionRestrictionLevel level, RuntimeMenuDebuggerActionType restriction);
#endif /* VBOX_WITH_DEBUGGER_GUI */
/** Prepare 'View' : 'Resize' menu routine. */
void sltPrepareMenuViewResize();
/** Prepare 'View' : 'Multiscreen' menu routine. */
void sltPrepareMenuViewMultiscreen();
/** Handles 'View' : 'Resize' menu @a pAction trigger. */
/** Handles 'View' : 'Multiscreen' menu @a pAction trigger. */
/** Handles screen-layout update. */
void sltHandleScreenLayoutUpdate();
/** Constructor,
* @param fTemporary is used to determine whether this action-pool is temporary,
* which can be created to re-initialize shortcuts-pool. */
UIActionPoolRuntime(bool fTemporary = false);
/** Prepare pool routine. */
virtual void preparePool();
/** Prepare connections routine. */
virtual void prepareConnections();
/** Update configuration routine. */
virtual void updateConfiguration();
/** Update menu routine. */
void updateMenu(int iIndex);
/** Update menus routine. */
void updateMenus();
/** Update 'Machine' menu routine. */
void updateMenuMachine();
/** Update 'Machine' : 'Keyboard' menu routine. */
void updateMenuMachineKeyboard();
/** Update 'Machine' : 'Mouse' menu routine. */
void updateMenuMachineMouse();
/** Update 'View' menu routine. */
void updateMenuView();
/** Update 'View' : 'Popup' menu routine. */
void updateMenuViewPopup();
/** Update 'View' : 'Status Bar' menu routine. */
void updateMenuViewStatusBar();
/** Update 'View' : 'Resize' @a pMenu routine. */
/** Update 'View' : 'Multiscreen' @a pMenu routine. */
/** Update 'Devices' menu routine. */
void updateMenuDevices();
/** Update 'Devices' : 'Hard Drives' menu routine. */
void updateMenuDevicesHardDrives();
/** Update 'Devices' : 'Network' menu routine. */
void updateMenuDevicesNetwork();
/** Update 'Devices' : 'USB' menu routine. */
void updateMenuDevicesUSBDevices();
/** Update 'Devices' : 'Shared Folders' menu routine. */
void updateMenuDevicesSharedFolders();
/** Update 'Devices' : 'Video Capture' menu routine. */
void updateMenuDevicesVideoCapture();
#ifdef VBOX_WITH_DEBUGGER_GUI
/** Update 'Debug' menu routine. */
void updateMenuDebug();
#endif /* VBOX_WITH_DEBUGGER_GUI */
/** Translation handler. */
virtual void retranslateUi();
/** Returns extra-data ID to save keyboard shortcuts under. */
/** Returns the list of Runtime UI main menus. */
/** Holds the UI session object reference. */
/** Holds the UI multi-screen layout object reference. */
/** Holds the list of main-menus. */
/** Holds restricted menu types. */
/** Holds restricted action types of the Machine menu. */
/** Holds restricted action types of the View menu. */
/** Holds restricted action types of the Devices menu. */
#ifdef VBOX_WITH_DEBUGGER_GUI
/** Holds restricted action types of the Debugger menu. */
#endif /* VBOX_WITH_DEBUGGER_GUI */
/* Enable factory in base-class: */
};
#endif /* !___UIActionPoolRuntime_h___ */