Eneboo - Documentación para desarrolladores
src/qt/include/qplatinumstyle.h
Ir a la documentación de este archivo.
00001 /****************************************************************************
00002 ** $Id: qt/qplatinumstyle.h   3.3.8   edited Jan 11 14:46 $
00003 **
00004 ** Definition of Platinum-like style class
00005 **
00006 ** Created : 981231
00007 **
00008 ** Copyright (C) 1998-2007 Trolltech ASA.  All rights reserved.
00009 **
00010 ** This file is part of the widgets module of the Qt GUI Toolkit.
00011 **
00012 ** This file may be distributed under the terms of the Q Public License
00013 ** as defined by Trolltech ASA of Norway and appearing in the file
00014 ** LICENSE.QPL included in the packaging of this file.
00015 **
00016 ** This file may be distributed and/or modified under the terms of the
00017 ** GNU General Public License version 2 as published by the Free Software
00018 ** Foundation and appearing in the file LICENSE.GPL included in the
00019 ** packaging of this file.
00020 **
00021 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
00022 ** licenses may use this file in accordance with the Qt Commercial License
00023 ** Agreement provided with the Software.
00024 **
00025 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00026 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00027 **
00028 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
00029 **   information about Qt Commercial License Agreements.
00030 ** See http://www.trolltech.com/qpl/ for QPL licensing information.
00031 ** See http://www.trolltech.com/gpl/ for GPL licensing information.
00032 **
00033 ** Contact info@trolltech.com if any conditions of this licensing are
00034 ** not clear to you.
00035 **
00036 **********************************************************************/
00037 
00038 #ifndef QPLATINUMSTYLE_H
00039 #define QPLATINUMSTYLE_H
00040 
00041 #ifndef QT_H
00042 #include "qwindowsstyle.h"
00043 #endif // QT_H
00044 
00045 #if !defined(QT_NO_STYLE_PLATINUM) || defined(QT_PLUGIN)
00046 
00047 class QPalette;
00048 
00049 #if defined(QT_PLUGIN)
00050 #define Q_EXPORT_STYLE_PLATINUM
00051 #else
00052 #define Q_EXPORT_STYLE_PLATINUM Q_EXPORT
00053 #endif
00054 
00055 class Q_EXPORT_STYLE_PLATINUM QPlatinumStyle : public QWindowsStyle
00056 {
00057     Q_OBJECT
00058 public:
00059     QPlatinumStyle();
00060     virtual ~QPlatinumStyle();
00061 
00062     // new Style Stuff
00063     void drawPrimitive( PrimitiveElement pe,
00064                         QPainter *p,
00065                         const QRect &r,
00066                         const QColorGroup &cg,
00067                         SFlags flags = Style_Default,
00068                         const QStyleOption& = QStyleOption::Default ) const;
00069 
00070     void drawControl( ControlElement element,
00071                       QPainter *p,
00072                       const QWidget *widget,
00073                       const QRect &r,
00074                       const QColorGroup &cg,
00075                       SFlags how = Style_Default,
00076                       const QStyleOption& = QStyleOption::Default ) const;
00077 
00078     void drawComplexControl( ComplexControl control,
00079                              QPainter *p,
00080                              const QWidget *widget,
00081                              const QRect &r,
00082                              const QColorGroup &cg,
00083                              SFlags how = Style_Default,
00084 #ifdef Q_QDOC
00085                              SCFlags sub = SC_All,
00086 #else
00087                              SCFlags sub = (uint)SC_All,
00088 #endif
00089                              SCFlags subActive = SC_None,
00090                              const QStyleOption& = QStyleOption::Default ) const;
00091 
00092     QRect querySubControlMetrics( ComplexControl control,
00093                                   const QWidget *widget,
00094                                   SubControl sc,
00095                                   const QStyleOption& = QStyleOption::Default ) const;
00096 
00097     int pixelMetric( PixelMetric metric, const QWidget *widget = 0 ) const;
00098 
00099     QRect subRect( SubRect r, const QWidget *widget ) const;
00100 
00101 protected:
00102      QColor mixedColor(const QColor &, const QColor &) const;
00103     void drawRiffles( QPainter* p,  int x, int y, int w, int h,
00104                       const QColorGroup &g, bool horizontal ) const;
00105 private:        // Disabled copy constructor and operator=
00106 #if defined(Q_DISABLE_COPY)
00107     QPlatinumStyle( const QPlatinumStyle & );
00108     QPlatinumStyle& operator=( const QPlatinumStyle & );
00109 #endif
00110 };
00111 
00112 #endif // QT_NO_STYLE_PLATINUM
00113 
00114 #endif // QPLATINUMSTYLE_H
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'