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 QGTKSTYLE_H
00043 #define QGTKSTYLE_H
00044
00045 #include <QtGui/QCleanlooksStyle>
00046 #include <QtGui/QPalette>
00047 #include <QtGui/QFont>
00048 #include <QtGui/QFileDialog>
00049
00050 QT_BEGIN_HEADER
00051
00052 QT_BEGIN_NAMESPACE
00053
00054 QT_MODULE(Gui)
00055
00056 #if !defined(QT_NO_STYLE_GTK)
00057
00058 class QPainterPath;
00059 class QGtkStylePrivate;
00060
00061 class Q_GUI_EXPORT QGtkStyle : public QCleanlooksStyle
00062 {
00063 Q_OBJECT
00064 Q_DECLARE_PRIVATE(QGtkStyle)
00065
00066 public:
00067 QGtkStyle();
00068 QGtkStyle(QGtkStylePrivate &dd);
00069
00070 ~QGtkStyle();
00071
00072 QPalette standardPalette() const;
00073
00074 void drawPrimitive(PrimitiveElement element, const QStyleOption *option,
00075 QPainter *painter, const QWidget *widget) const;
00076 void drawControl(ControlElement control, const QStyleOption *option,
00077 QPainter *painter, const QWidget *widget) const;
00078 void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
00079 QPainter *painter, const QWidget *widget) const;
00080 void drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
00081 const QPixmap &pixmap) const;
00082 void drawItemText(QPainter *painter, const QRect &rect, int alignment, const QPalette &pal,
00083 bool enabled, const QString& text, QPalette::ColorRole textRole) const;
00084
00085 int pixelMetric(PixelMetric metric, const QStyleOption *option = 0,
00086 const QWidget *widget = 0) const;
00087 int styleHint(StyleHint hint, const QStyleOption *option,
00088 const QWidget *widget, QStyleHintReturn *returnData) const;
00089
00090 QStyle::SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,
00091 const QPoint &pt, const QWidget *w) const;
00092
00093 QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option,
00094 SubControl subControl, const QWidget *widget) const;
00095 QRect subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *w) const;
00096 QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const;
00097
00098
00099 QSize sizeFromContents(ContentsType type, const QStyleOption *option,
00100 const QSize &size, const QWidget *widget) const;
00101 QPixmap standardPixmap(StandardPixmap sp, const QStyleOption *option,
00102 const QWidget *widget) const;
00103 QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
00104 const QStyleOption *opt) const;
00105
00106 void polish(QWidget *widget);
00107 void polish(QApplication *app);
00108 void polish(QPalette &palette);
00109
00110 void unpolish(QWidget *widget);
00111 void unpolish(QApplication *app);
00112
00113 static bool getGConfBool(const QString &key, bool fallback = 0);
00114 static QString getGConfString(const QString &key, const QString &fallback = QString());
00115
00116
00117 protected Q_SLOTS:
00118 QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option,
00119 const QWidget *widget = 0) const;
00120 };
00121
00122 #endif //!defined(QT_NO_STYLE_QGTK)
00123
00124 QT_END_NAMESPACE
00125
00126 QT_END_HEADER
00127
00128 #endif //QGTKSTYLE_H