00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
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