diff options
Diffstat (limited to 'src/fqterm/3rdparty/dotnetstyle.h')
-rw-r--r-- | src/fqterm/3rdparty/dotnetstyle.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/fqterm/3rdparty/dotnetstyle.h b/src/fqterm/3rdparty/dotnetstyle.h new file mode 100644 index 0000000..16326b6 --- /dev/null +++ b/src/fqterm/3rdparty/dotnetstyle.h @@ -0,0 +1,77 @@ +/**************************************************************************** +** +** Copyright (C) 2007-2007 Trolltech ASA. All rights reserved. +** +** This file is part of the DotNetStyle project on Trolltech Labs. +** +** This file may be used under the terms of the GNU General Public +** License version 2.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of +** this file. Please review the following information to ensure GNU +** General Public Licensing requirements will be met: +** http://www.trolltech.com/products/qt/opensource.html +** +** If you are unsure which license is appropriate for your use, please +** review the following information: +** http://www.trolltech.com/products/qt/licensing.html or contact the +** sales department at sales@trolltech.com. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +****************************************************************************/ + + +#ifndef QTDOTNETSTYLE_H +#define QTDOTNETSTYLE_H +#ifdef USE_DOTNET_STYLE +#include <QtGui/QWindowsVistastyle.h> + +class QLinearGradient; +class QBrush; + +class DotNetStylePrivate; +class DotNetStyle : public QWindowsVistaStyle +{ +public: + enum ColorTheme { + Standard, + Office + }; + DotNetStyle(); + + DotNetStyle(ColorTheme palette); + + ~DotNetStyle(); + + void drawPrimitive(PrimitiveElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget = 0) const; + void drawControl(ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const; + void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, + QPainter *painter, const QWidget *widget) const; + QSize sizeFromContents(ContentsType type, const QStyleOption *option, + const QSize &size, const QWidget *widget) const; + + QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const; + QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, + SubControl sc, const QWidget *widget) const; + + SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option, + const QPoint &pos, const QWidget *widget = 0) const; + + QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, + const QWidget *widget = 0) const; + int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0, + QStyleHintReturn *returnData = 0) const; + int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const; + void polish(QWidget *widget); + void unpolish(QWidget *widget); + void polish(QPalette &pal); + void polish(QApplication *app); + void unpolish(QApplication *app); + QPalette standardPalette() const; + DotNetStylePrivate *d; +}; +#endif //USE_DOTNET_STYLE +#endif |