Go to the
documentation of this file.
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
00038
00039
00040
00041
00042 #ifndef QS60STYLE_H
00043 #define QS60STYLE_H
00044
00045 #include <QtGui/qcommonstyle.h>
00046
00047 QT_BEGIN_HEADER
00048
00049 QT_BEGIN_NAMESPACE
00050
00051 QT_MODULE(Gui)
00052
00053
00054
00055 enum {
00056 PM_FrameCornerWidth = QStyle::PM_CustomBase + 1,
00057 PM_FrameCornerHeight,
00058 PM_BoldLineWidth,
00059 PM_ThinLineWidth,
00060 PM_MessageBoxHeight
00061 };
00062
00063 class QS60StylePrivate;
00064
00065 class Q_GUI_EXPORT QS60Style : public QCommonStyle
00066 {
00067 Q_OBJECT
00068 Q_DECLARE_PRIVATE(QS60Style)
00069
00070 public:
00071 QS60Style();
00072 ~QS60Style();
00073
00074 void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, QPainter *painter, const QWidget *widget = 0) const;
00075 void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const;
00076 void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget = 0) const;
00077 int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const;
00078 QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w = 0) const;
00079 int styleHint(StyleHint sh, const QStyleOption *opt = 0, const QWidget *w = 0,
00080 QStyleHintReturn *shret = 0) const;
00081 QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl scontrol, const QWidget *widget = 0) const;
00082 QRect subElementRect(SubElement element, const QStyleOption *opt, const QWidget *widget = 0) const;
00083 void polish(QWidget *widget);
00084 void unpolish(QWidget *widget);
00085 void polish(QApplication *application);
00086 void unpolish(QApplication *application);
00087 #ifndef Q_NO_USING_KEYWORD
00088 using QCommonStyle::polish;
00089 #endif
00090 bool event(QEvent *e);
00091
00092 #ifndef Q_OS_SYMBIAN
00093 static QStringList partKeys();
00094 static QStringList colorListKeys();
00095 void setS60Theme(const QHash<QString, QPicture> &parts,
00096 const QHash<QPair<QString , int>, QColor> &colors);
00097 bool loadS60ThemeFromBlob(const QString &blobFile);
00098 bool saveS60ThemeToBlob(const QString &blobFile) const;
00099 #endif // !Q_OS_SYMBIAN
00100
00101 protected Q_SLOTS:
00102 QIcon standardIconImplementation(
00103 StandardPixmap standardIcon, const QStyleOption * option = 0, const QWidget * widget = 0 ) const;
00104
00105 protected:
00106 void timerEvent(QTimerEvent *event);
00107 bool eventFilter(QObject *o, QEvent *e);
00108 private:
00109 Q_DISABLE_COPY(QS60Style)
00110 friend class QStyleFactory;
00111 friend class QApplicationPrivate;
00112 };
00113
00114 QT_END_NAMESPACE
00115
00116 QT_END_HEADER
00117
00118 #endif // QS60STYLE_H