UISession.h revision af62929dce3cc5e14c75438cd2b893f82ae6dbc8
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* UISession class declaration
*/
/*
* Copyright (C) 2010 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#ifndef ___UIConsole_h___
#define ___UIConsole_h___
/* Global includes */
#include <QObject>
#include <QCursor>
/* Local includes */
#include "COMDefs.h"
#include "UIMachineDefs.h"
/* Global forwards */
/* Local forwards */
/* CConsole callback event types: */
enum UIConsoleEventType
{
};
{
/* Machine uisession constructor/destructor: */
/* Common members: */
void powerUp();
/* Common getters: */
UIActionsPool* actionsPool() const;
QWidget* mainMachineWindow() const;
machineState() == KMachineState_Saved ||
machineState() == KMachineState_Teleported ||
machineState() == KMachineState_Aborted; }
bool isFirstTimeStarted() const { return m_fIsFirstTimeStarted; }
bool isIgnoreRuntimeMediumsChanging() const { return m_fIsIgnoreRutimeMediumsChanging; }
bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; }
bool isSeamlessModeRequested() const { return m_fIsSeamlessModeRequested; }
/* Guest additions state getters: */
bool isGuestAdditionsActive() const { return m_fIsGuestAdditionsActive; }
bool isGuestSupportsGraphics() const { return isGuestAdditionsActive() && m_fIsGuestSupportsGraphics; }
bool isGuestSupportsSeamless() const { return isGuestSupportsGraphics() && m_fIsGuestSupportsSeamless; }
/* Keyboard getters: */
bool isNumLock() const { return m_fNumLock; }
bool isCapsLock() const { return m_fCapsLock; }
bool isScrollLock() const { return m_fScrollLock; }
/* Mouse getters: */
bool isMouseSupportsAbsolute() const { return m_fIsMouseSupportsAbsolute; }
bool isMouseSupportsRelative() const { return m_fIsMouseSupportsRelative; }
bool isMouseHostCursorNeeded() const { return m_fIsMouseHostCursorNeeded; }
bool isMouseCaptured() const { return m_fIsMouseCaptured; }
bool isMouseIntegrated() const { return m_fIsMouseIntegrated; }
bool isValidPointerShapePresent() const { return m_fIsValidPointerShapePresent; }
bool isHidingHostPointer() const { return m_fIsHidingHostPointer; }
/* Common setters: */
void setGuestResizeIgnored(bool fIsGuestResizeIgnored) { m_fIsGuestResizeIgnored = fIsGuestResizeIgnored; }
void setSeamlessModeRequested(bool fIsSeamlessModeRequested) { m_fIsSeamlessModeRequested = fIsSeamlessModeRequested; }
/* Keyboard setters: */
void setNumLockAdaptionCnt(uint uNumLockAdaptionCnt) { m_uNumLockAdaptionCnt = uNumLockAdaptionCnt; }
void setCapsLockAdaptionCnt(uint uCapsLockAdaptionCnt) { m_uCapsLockAdaptionCnt = uCapsLockAdaptionCnt; }
/* Mouse setters: */
void setMouseCaptured(bool fIsMouseCaptured) { m_fIsMouseCaptured = fIsMouseCaptured; emit sigMouseCapturedStatusChanged(); }
/* Console callback signals: */
void sigMousePointerShapeChange();
void sigMouseCapabilityChange();
void sigKeyboardLedsChange();
void sigMachineStateChange();
void sigAdditionsStateChange();
void sigStorageControllerChange();
void sigVRDPServerChange();
void sigRemoteDisplayInfoChange();
void sigUSBControllerChange();
void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error);
void sigSharedFolderChange();
/* Session signals: */
void sigMachineStarted();
void sigMouseCapturedStatusChanged();
/* Close uisession handler: */
void sltCloseVirtualSession();
/* Private getters: */
/* Event handlers: */
/* Prepare helpers: */
void prepareMenuPool();
void loadSessionSettings();
/* Cleanup helpers: */
void saveSessionSettings();
void cleanupMenuPool();
/* Common helpers: */
void setPointerShape(const uchar *pShapeData, bool fHasAlpha, uint uXHot, uint uYHot, uint uWidth, uint uHeight);
void reinitMenuPool();
void preparePowerUp();
/* Private variables: */
const CConsoleCallback m_callback;
/* Common variables: */
#if defined(Q_WS_WIN)
#endif
/* Common flags: */
bool m_fIsFirstTimeStarted : 1;
bool m_fIsIgnoreRutimeMediumsChanging : 1;
bool m_fIsGuestResizeIgnored : 1;
bool m_fIsSeamlessModeRequested : 1;
/* Guest additions flags: */
bool m_fIsGuestAdditionsActive : 1;
bool m_fIsGuestSupportsGraphics : 1;
bool m_fIsGuestSupportsSeamless : 1;
/* Keyboard flags: */
bool m_fNumLock : 1;
bool m_fCapsLock : 1;
bool m_fScrollLock : 1;
/* Mouse flags: */
bool m_fIsMouseSupportsAbsolute : 1;
bool m_fIsMouseSupportsRelative : 1;
bool m_fIsMouseHostCursorNeeded : 1;
bool m_fIsMouseCaptured : 1;
bool m_fIsMouseIntegrated : 1;
bool m_fIsValidPointerShapePresent : 1;
bool m_fIsHidingHostPointer : 1;
/* Friend classes: */
};
#endif // !___UIConsole_h___