src/gui/styles/qcleanlooksstyle.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 1992-2006 Trolltech ASA. All rights reserved.
00004 **
00005 ** This file is part of the QtGui 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://www.trolltech.com/products/qt/opensource.html
00013 **
00014 ** If you are unsure which license is appropriate for your use, please
00015 ** review the following information:
00016 ** http://www.trolltech.com/products/qt/licensing.html or contact the
00017 ** sales department at sales@trolltech.com.
00018 **
00019 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00020 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00021 **
00022 ****************************************************************************/
00023 
00024 #ifndef QCLEANLOOKSSTYLE_H
00025 #define QCLEANLOOKSSTYLE_H
00026 
00027 #include <QtGui/qwindowsstyle.h>
00028 
00029 QT_BEGIN_HEADER
00030 
00031 QT_MODULE(Gui)
00032 
00033 #if !defined(QT_NO_STYLE_CLEANLOOKS)
00034 
00035 class QCleanlooksStylePrivate;
00036 class Q_GUI_EXPORT QCleanlooksStyle : public QWindowsStyle
00037 {
00038     Q_OBJECT
00039     Q_DECLARE_PRIVATE(QCleanlooksStyle)
00040 
00041 public:
00042     QCleanlooksStyle();
00043     ~QCleanlooksStyle();
00044 
00045     QPalette standardPalette () const;
00046     void drawPrimitive(PrimitiveElement elem,
00047                         const QStyleOption *option,
00048                         QPainter *painter, const QWidget *widget = 0) const;
00049     void drawControl(ControlElement ce, const QStyleOption *option, QPainter *painter,
00050                                 const QWidget *widget) const;
00051     int pixelMetric(PixelMetric metric, const QStyleOption *option = 0, const QWidget *widget = 0) const;
00052     void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option,
00053                             QPainter *painter, const QWidget *widget) const;
00054     QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const;
00055     QSize sizeFromContents(ContentsType type, const QStyleOption *option,
00056                            const QSize &size, const QWidget *widget) const;
00057     SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt,
00058                                const QPoint &pt, const QWidget *w = 0) const;
00059     QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt,
00060                          SubControl sc, const QWidget *widget) const;
00061     QPixmap generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
00062                                         const QStyleOption *opt) const;
00063     int styleHint(StyleHint hint, const QStyleOption *option = 0, const QWidget *widget = 0,
00064       QStyleHintReturn *returnData = 0) const;
00065     QRect itemPixmapRect(const QRect &r, int flags, const QPixmap &pixmap) const;
00066     QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
00067                            const QWidget *widget = 0) const;
00068     void drawItemPixmap(QPainter *painter, const QRect &rect,
00069                         int alignment, const QPixmap &pixmap) const;
00070     void drawItemText(QPainter *painter, const QRect &rect,
00071                               int flags, const QPalette &pal, bool enabled,
00072                               const QString &text, QPalette::ColorRole textRole = QPalette::NoRole) const;
00073     void polish(QWidget *widget);
00074     void polish(QApplication *app);
00075     void polish(QPalette &pal);
00076     void unpolish(QWidget *widget);
00077     void unpolish(QApplication *app);
00078 
00079 protected Q_SLOTS:
00080     QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option,
00081                                      const QWidget *widget = 0) const;
00082 
00083 };
00084 
00085 #endif // QT_NO_STYLE_CLEANLOOKS
00086 
00087 QT_END_HEADER
00088 
00089 #endif // QCLEANLOOKSSTYLE_H

Generated on Thu Mar 15 11:55:40 2007 for Qt 4.2 User's Guide by  doxygen 1.5.1