src/gui/styles/qwindowsstyle.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 QWINDOWSSTYLE_H
00025 #define QWINDOWSSTYLE_H
00026 
00027 #include <QtGui/qcommonstyle.h>
00028 
00029 QT_BEGIN_HEADER
00030 
00031 QT_MODULE(Gui)
00032 
00033 #if !defined(QT_NO_STYLE_WINDOWS)
00034 
00035 class QWindowsStylePrivate;
00036 
00037 class Q_GUI_EXPORT QWindowsStyle : public QCommonStyle
00038 {
00039     Q_OBJECT
00040 public:
00041     QWindowsStyle();
00042     ~QWindowsStyle();
00043 
00044     void polish(QApplication*);
00045     void unpolish(QApplication*);
00046 
00047     void polish(QWidget*);
00048     void unpolish(QWidget*);
00049 
00050     void polish(QPalette &);
00051 
00052     void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,
00053                        const QWidget *w = 0) const;
00054     void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p,
00055                      const QWidget *w = 0) const;
00056     QRect subElementRect(SubElement r, const QStyleOption *opt, const QWidget *widget = 0) const;
00057     void drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,
00058                             const QWidget *w = 0) const;
00059     QSize sizeFromContents(ContentsType ct, const QStyleOption *opt,
00060                            const QSize &contentsSize, const QWidget *widget = 0) const;
00061 
00062     int pixelMetric(PixelMetric pm, const QStyleOption *option = 0, const QWidget *widget = 0) const;
00063 
00064     int styleHint(StyleHint hint, const QStyleOption *opt = 0, const QWidget *widget = 0,
00065                   QStyleHintReturn *returnData = 0) const;
00066 
00067     QPixmap standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
00068                            const QWidget *widget = 0) const;
00069 
00070 protected Q_SLOTS:
00071     QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *option,
00072                                      const QWidget *widget = 0) const;
00073 
00074 protected:
00075     bool eventFilter(QObject *o, QEvent *e);
00076     void timerEvent(QTimerEvent *event);
00077     QWindowsStyle(QWindowsStylePrivate &dd);
00078 
00079 private:
00080     Q_DISABLE_COPY(QWindowsStyle)
00081     Q_DECLARE_PRIVATE(QWindowsStyle)
00082     void *reserved;
00083 };
00084 
00085 #endif // QT_NO_STYLE_WINDOWS
00086 
00087 QT_END_HEADER
00088 
00089 #endif // QWINDOWSSTYLE_H

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