UIConsoleEventHandler.h revision 103b0154d1ec1325cacf0cabaedab9581a317ce2
561N/A/** @file
561N/A *
1339N/A * VBox frontends: Qt GUI ("VirtualBox"):
561N/A * UIConsoleEventHandler class declaration
561N/A */
919N/A
919N/A/*
919N/A * Copyright (C) 2010 Oracle Corporation
919N/A *
919N/A * This file is part of VirtualBox Open Source Edition (OSE), as
919N/A * available from http://www.virtualbox.org. This file is free software;
919N/A * you can redistribute it and/or modify it under the terms of the GNU
919N/A * General Public License (GPL) as published by the Free Software
919N/A * Foundation, in version 2 as it comes in the "COPYING" file of the
919N/A * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
919N/A * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
919N/A */
919N/A
919N/A#ifndef __UIConsoleEventHandler_h__
919N/A#define __UIConsoleEventHandler_h__
919N/A
919N/A/* Local includes */
561N/A#include "COMDefs.h"
561N/A
561N/A/* Local forward declarations */
561N/Aclass UISession;
561N/A
561N/Aclass UIConsoleEventHandler: public QObject
970N/A{
970N/A Q_OBJECT;
970N/A
970N/Apublic:
561N/A static UIConsoleEventHandler* instance(UISession *pSession = 0);
1043N/A static void destroy();
561N/A
911N/Asignals:
1043N/A void sigMousePointerShapeChange(bool fVisible, bool fAlpha, QPoint hotCorner, QSize size, QVector<uint8_t> shape);
1043N/A void sigMouseCapabilityChange(bool fSupportsAbsolute, bool fSupportsRelative, bool fNeedsHostCursor);
911N/A void sigKeyboardLedsChangeEvent(bool fNumLock, bool fCapsLock, bool fScrollLock);
1339N/A void sigStateChange(KMachineState state);
1339N/A void sigAdditionsChange();
1339N/A void sigNetworkAdapterChange(CNetworkAdapter adapter);
561N/A void sigMediumChange(CMediumAttachment attachment);
561N/A void sigVRDEChange();
void sigUSBControllerChange();
void sigUSBDeviceStateChange(CUSBDevice device, bool fAttached, CVirtualBoxErrorInfo error);
void sigSharedFolderChange();
void sigRuntimeError(bool fFatal, QString strId, QString strMessage);
#ifdef RT_OS_DARWIN
void sigShowWindow();
#endif /* RT_OS_DARWIN */
void sigCPUExecutionCapChange();
private slots:
void sltCanShowWindow(bool &fVeto, QString &strReason);
void sltShowWindow(LONG64 &winId);
private:
UIConsoleEventHandler(UISession *pSession);
~UIConsoleEventHandler();
static UIConsoleEventHandler *m_pInstance;
UISession *m_pSession;
CEventListener m_mainEventListener;
};
#define gConsoleEvents UIConsoleEventHandler::instance()
#endif /* !__UIConsoleEventHandler_h__ */