VBoxAquaStyle.h revision 8e0c2ca3abd721979958f95b9af73b60665478c8
/** $Id: $ */
/** @file
* Qt GUI - VBox Variation on the QAquaStyle.
*/
/*
* 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 ___VBoxAquaStyle_h___
#define ___VBoxAquaStyle_h___
#include <qstyle.h>
//Added by qt3to4:
#include <QPixmap>
#include <Q3PopupMenu>
/**
* The Virtual Box QAquaStyle overrider.
*
* The purpose of this class is to make some small adjustments to
* the QAquaStyle so it looks and works better.
*
* Since the QAquaStyle class isn't exported we have to do all the
* virtual method work our selves. This also means we doesn't have
* access to any protected or QAquaStyle methods, too bad.
*/
{
virtual ~VBoxAquaStyle();
static VBoxAquaStyle &instance();
// The QStyle implementation.
virtual QRect itemRect( QPainter *p, const QRect &r, int flags, bool enabled, const QPixmap *pixmap,
virtual void drawPrimitive( PrimitiveElement pe, QPainter *p, const QRect &r, const QColorGroup &cg,
virtual void drawControl( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg,
virtual void drawControlMask( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r,
virtual QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentsSize,
virtual int styleHint( StyleHint stylehint, const QWidget *widget = 0, const QStyleOption &foo = QStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const;
virtual QPixmap stylePixmap( StylePixmap stylepixmap, const QWidget *widget = 0, const QStyleOption &foo = QStyleOption::Default ) const;
virtual void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r,
virtual void drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r,
virtual SubControl querySubControl( ComplexControl control, const QWidget *widget, const QPoint &pos,
/** The style we're overloading. */
/** The global instance. */
static VBoxAquaStyle *sInstance;
};
#endif