qtdotnetstyle.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
00004 **
00005 ** This file is part of the QtCore module of the Qt Toolkit.
00006 **
00007 ** This file may be used under the terms of the GNU General Public
00008 ** License version 2.0 as published by the Free Software Foundation
00009 ** and appearing in the file LICENSE.GPL included in the packaging of
00010 ** this file.  Please review the following information to ensure GNU
00011 ** General Public Licensing requirements will be met:
00012 ** http://trolltech.com/products/qt/licenses/licensing/opensource/
00013 **
00014 ** If you are unsure which license is appropriate for your use, please
00015 ** review the following information:
00016 ** http://trolltech.com/products/qt/licenses/licensing/licensingoverview
00017 ** or contact the sales department at sales@trolltech.com.
00018 **
00019 ** In addition, as a special exception, Trolltech gives you certain
00020 ** additional rights. These rights are described in the Trolltech GPL
00021 ** Exception version 1.0, which can be found at
00022 ** http://www.trolltech.com/products/qt/gplexception/ and in the file
00023 ** GPL_EXCEPTION.txt in this package.
00024 **
00025 ** In addition, as a special exception, Trolltech, as the sole copyright
00026 ** holder for Qt Designer, grants users of the Qt/Eclipse Integration
00027 ** plug-in the right for the Qt/Eclipse Integration to link to
00028 ** functionality provided by Qt Designer and its related libraries.
00029 **
00030 ** Trolltech reserves all rights not expressly granted herein.
00031 **
00032 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00033 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00034 **
00035 ****************************************************************************/
00036 
00037 #ifdef Q_WS_WIN
00038 
00039 #ifndef QTDOTNETSTYLE_H
00040 #define QTDOTNETSTYLE_H
00041 
00042 #include <QtGui/QWindowsVistaStyle>
00043 
00044 class QLinearGradient;
00045 class QBrush;
00046 
00047 #if defined(Q_WS_WIN)
00048 #  if !defined(QT_QTDOTNETSTYLE_EXPORT) && !defined(QT_QTDOTNETSTYLE_IMPORT)
00049 #    define QT_QTDOTNETSTYLE_EXPORT
00050 #  elif defined(QT_QTDOTNETSTYLE_IMPORT)
00051 #    if defined(QT_QTDOTNETSTYLE_EXPORT)
00052 #      undef QT_QTDOTNETSTYLE_EXPORT
00053 #    endif
00054 #    define QT_QTDOTNETSTYLE_EXPORT __declspec(dllimport)
00055 #  elif defined(QT_QTDOTNETSTYLE_EXPORT)
00056 #    undef QT_QTDOTNETSTYLE_EXPORT
00057 #    define QT_QTDOTNETSTYLE_EXPORT __declspec(dllexport)
00058 #  endif
00059 #else
00060 #  define QT_QTDOTNETSTYLE_EXPORT
00061 #endif
00062 
00063 class QtDotNetStylePrivate;
00064 class QT_QTDOTNETSTYLE_EXPORT QtDotNetStyle : public QWindowsVistaStyle
00065 {
00066 public:
00067     enum ColorTheme {
00068         Standard,
00069         Office
00070     };
00071     QtDotNetStyle();
00072 
00073     QtDotNetStyle(ColorTheme palette);
00074 
00075     ~QtDotNetStyle();
00076 
00077     void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
00078                        QPainter *painter, const QWidget *widget = 0) const;
00079     void drawControl(ControlElement element, const QStyleOption *option,
00080                      QPainter *painter, const QWidget *widget) const;
00081     void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
00082                             QPainter *painter, const QWidget *widget) const;
00083     QSize sizeFromContents(ContentsType type, const QStyleOption *option,
00084                            const QSize &size, const QWidget *widget) const;
00085 
00086     QRect subElementRect(SubElement element, const QStyleOption *option, const QWidget *widget) const;
00087     QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
00088                          SubControl sc, const QWidget *widget) const;
00089 
00090     SubControl hitTestComplexControl(ComplexControl control, const QStyleOptionComplex *option,
00091                                                     const QPoint &pos, const QWidget *widget = 0) const;
00092 
00093     QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
00094                                     const QWidget *widget = 0) const;
00095     int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0,
00096                   QStyleHintReturn *returnData = 0) const;
00097     int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const;
00098     void polish(QWidget *widget);
00099     void unpolish(QWidget *widget);
00100     void polish(QPalette &pal);
00101     void polish(QApplication *app);
00102     void unpolish(QApplication *app);
00103     QPalette standardPalette() const;
00104     QtDotNetStylePrivate *d;
00105 };
00106 
00107 #endif
00108 
00109 #endif

Generated on Sat Feb 23 21:22:18 2008 for QtGEOM by  doxygen 1.4.7