QIHotKeyEdit.h revision e2de40b4b54a8ea51348be768ddcd3ecd753d7b6
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* VirtualBox Qt extensions: QIHotKeyEdit class declaration
*/
/*
* Copyright (C) 2006-2007 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 ___QIHotKeyEdit_h___
#define ___QIHotKeyEdit_h___
#include <QLabel>
#if defined (Q_WS_X11)
#include <QMap>
#endif
#if defined (Q_WS_MAC)
/* Carbon.h includes AssertMacros.h which defines the macro "check". In
* QItemDelegate a class method is called check also. As we not used the macro
* undefine it here. */
#endif
#if defined (Q_WS_PM)
/* Extra virtual keys returned by QIHotKeyEdit::virtualKey() */
#define VK_LSHIFT VK_USERFIRST + 0
#endif
{
virtual ~QIHotKeyEdit();
QSize minimumSizeHint() const;
#if defined (Q_WS_PM)
#endif
static void retranslateUi();
#endif
static bool isValidKey (int aKeyVal);
void clear();
#if defined (Q_WS_WIN32)
# ifdef QT_MAC_USE_COCOA
static bool darwinEventHandlerProc (const void *pvCocoaEvent, const void *pvCarbonEvent, void *pvUser);
# else
static pascal OSStatus darwinEventHandlerProc (EventHandlerCallRef inHandlerCallRef, EventRef inEvent, void *inUserData);
# endif
#endif
void focusInEvent (QFocusEvent *);
void focusOutEvent (QFocusEvent *);
void paintEvent (QPaintEvent *);
void updateText();
int mKeyVal;
#if defined (Q_WS_PM)
#endif
#if defined (Q_WS_MAC)
# ifndef QT_MAC_USE_COCOA
/** Event handler reference. NULL if the handler isn't installed. */
# endif
/** The current modifier key mask. Used to figure out which modifier
* key was pressed when we get a kEventRawKeyModifiersChanged event. */
#endif
static const char *kNoneSymbName;
};
#endif // !___QIHotKeyEdit_h___