00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef QWINDOWSCLASSICSTYLE_H
00010 #define QWINDOWSCLASSICSTYLE_H
00011
00012 #include <QWindowsStyle>
00013
00014
00015
00016
00017
00024 class QWindowsClassicStyle : public QWindowsStyle
00025 {
00026 Q_OBJECT
00027 public:
00028 QWindowsClassicStyle();
00029 public:
00030 bool isPatchEnabled();
00031 void setPatchEnabled(bool enabled);
00032 public:
00033 virtual int pixelMetric(PixelMetric metric, const QStyleOption *option,
00034 const QWidget *widget) const;
00035 virtual void drawPrimitive(PrimitiveElement element,
00036 const QStyleOption *option, QPainter *painter,
00037 const QWidget *widget) const;
00038 virtual void drawComplexControl(ComplexControl control,
00039 const QStyleOptionComplex *option,
00040 QPainter *painter,
00041 const QWidget *widget) const;
00042 virtual int styleHint(StyleHint hint, const QStyleOption *option = 0,
00043 const QWidget *widget = 0,
00044 QStyleHintReturn *returnData = 0) const;
00045 virtual QRect subElementRect(SubElement sr, const QStyleOption *opt,
00046 const QWidget *widget) const;
00047 virtual QPalette standardPalette() const;
00048 private:
00049 bool m_patchDisabled;
00050 mutable QColor m_leftTitleBarColor;
00051 mutable QColor m_rightTitleBarColor;
00052 mutable QColor m_leftTitleBarInactiveColor;
00053 mutable QColor m_rightTitleBarInactiveColor;
00054 };
00055
00056
00057
00058
00059
00065 inline bool QWindowsClassicStyle::isPatchEnabled()
00066 {
00067 return !m_patchDisabled;
00068 }
00069
00075 inline void QWindowsClassicStyle::setPatchEnabled(bool enabled)
00076 {
00077 m_patchDisabled = !enabled;
00078 }
00079
00080 #endif // QWINDOWSCLASSICSTYLE_H
00081
00082
00083
00084
00085
00086
00087
00088