VBoxUtils.h revision e2de40b4b54a8ea51348be768ddcd3ecd753d7b6
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* Declarations of utility classes and functions
*/
/*
* Copyright (C) 2006-2008 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 ___VBoxUtils_h___
#define ___VBoxUtils_h___
/* Qt includes */
#include <QMouseEvent>
#include <QWidget>
#include <QTextBrowser>
/**
* Simple class that filters out all key presses and releases
* got while the Alt key is pressed. For some very strange reason,
* QLineEdit accepts those combinations that are not used as accelerators,
* and inserts the corresponding characters to the entry field.
*/
{
{
{
return true;
}
return false;
}
};
/**
* Simple class which simulates focus-proxy rule redirecting widget
* assigned shortcut to desired widget.
*/
{
{
}
{
{
return true;
}
}
};
/**
* QTextEdit reimplementation to feat some extended requirements.
*/
{
{
}
};
/**
* QTextBrowser reimplementation to feat some extended requirements.
*/
{
{
}
};
#ifdef Q_WS_MAC
# include "VBoxUtils-darwin.h"
#endif /* Q_WS_MAC */
#endif // !___VBoxUtils_h___