| 1 | /****************************************************************************
 | 
|---|
| 2 | ** $Id: qdrawutil.h 2 2005-11-16 15:49:26Z dmik $
 | 
|---|
| 3 | **
 | 
|---|
| 4 | ** Definition of draw utilities
 | 
|---|
| 5 | **
 | 
|---|
| 6 | ** Created : 950920
 | 
|---|
| 7 | **
 | 
|---|
| 8 | ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
 | 
|---|
| 9 | **
 | 
|---|
| 10 | ** This file is part of the kernel module of the Qt GUI Toolkit.
 | 
|---|
| 11 | **
 | 
|---|
| 12 | ** This file may be distributed under the terms of the Q Public License
 | 
|---|
| 13 | ** as defined by Trolltech AS of Norway and appearing in the file
 | 
|---|
| 14 | ** LICENSE.QPL included in the packaging of this file.
 | 
|---|
| 15 | **
 | 
|---|
| 16 | ** This file may be distributed and/or modified under the terms of the
 | 
|---|
| 17 | ** GNU General Public License version 2 as published by the Free Software
 | 
|---|
| 18 | ** Foundation and appearing in the file LICENSE.GPL included in the
 | 
|---|
| 19 | ** packaging of this file.
 | 
|---|
| 20 | **
 | 
|---|
| 21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
 | 
|---|
| 22 | ** licenses may use this file in accordance with the Qt Commercial License
 | 
|---|
| 23 | ** Agreement provided with the Software.
 | 
|---|
| 24 | **
 | 
|---|
| 25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 | 
|---|
| 26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 | 
|---|
| 27 | **
 | 
|---|
| 28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
 | 
|---|
| 29 | **   information about Qt Commercial License Agreements.
 | 
|---|
| 30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
 | 
|---|
| 31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
 | 
|---|
| 32 | **
 | 
|---|
| 33 | ** Contact info@trolltech.com if any conditions of this licensing are
 | 
|---|
| 34 | ** not clear to you.
 | 
|---|
| 35 | **
 | 
|---|
| 36 | **********************************************************************/
 | 
|---|
| 37 | 
 | 
|---|
| 38 | #ifndef QDRAWUTIL_H
 | 
|---|
| 39 | #define QDRAWUTIL_H
 | 
|---|
| 40 | 
 | 
|---|
| 41 | #ifndef QT_H
 | 
|---|
| 42 | #include "qnamespace.h"
 | 
|---|
| 43 | #include "qstring.h" // char*->QString conversion
 | 
|---|
| 44 | #endif // QT_H
 | 
|---|
| 45 | 
 | 
|---|
| 46 | class QPainter;
 | 
|---|
| 47 | class QColorGroup;
 | 
|---|
| 48 | class QPoint;
 | 
|---|
| 49 | class QBrush;
 | 
|---|
| 50 | class QRect;
 | 
|---|
| 51 | class QPixmap;
 | 
|---|
| 52 | 
 | 
|---|
| 53 | #ifndef QT_NO_DRAWUTIL
 | 
|---|
| 54 | //
 | 
|---|
| 55 | // Standard shade drawing
 | 
|---|
| 56 | //
 | 
|---|
| 57 | 
 | 
|---|
| 58 | Q_EXPORT void qDrawShadeLine( QPainter *p, int x1, int y1, int x2, int y2,
 | 
|---|
| 59 |                               const QColorGroup &g, bool sunken = TRUE,
 | 
|---|
| 60 |                               int lineWidth = 1, int midLineWidth = 0 );
 | 
|---|
| 61 | 
 | 
|---|
| 62 | Q_EXPORT void qDrawShadeLine( QPainter *p, const QPoint &p1, const QPoint &p2,
 | 
|---|
| 63 |                               const QColorGroup &g, bool sunken = TRUE,
 | 
|---|
| 64 |                               int lineWidth = 1, int midLineWidth = 0 );
 | 
|---|
| 65 | 
 | 
|---|
| 66 | Q_EXPORT void qDrawShadeRect( QPainter *p, int x, int y, int w, int h,
 | 
|---|
| 67 |                               const QColorGroup &, bool sunken=FALSE,
 | 
|---|
| 68 |                               int lineWidth = 1, int midLineWidth = 0,
 | 
|---|
| 69 |                               const QBrush *fill = 0 );
 | 
|---|
| 70 | 
 | 
|---|
| 71 | Q_EXPORT void qDrawShadeRect( QPainter *p, const QRect &r,
 | 
|---|
| 72 |                               const QColorGroup &, bool sunken=FALSE,
 | 
|---|
| 73 |                               int lineWidth = 1, int midLineWidth = 0,
 | 
|---|
| 74 |                               const QBrush *fill = 0 );
 | 
|---|
| 75 | 
 | 
|---|
| 76 | Q_EXPORT void qDrawShadePanel( QPainter *p, int x, int y, int w, int h,
 | 
|---|
| 77 |                                const QColorGroup &, bool sunken=FALSE,
 | 
|---|
| 78 |                                int lineWidth = 1, const QBrush *fill = 0 );
 | 
|---|
| 79 | 
 | 
|---|
| 80 | Q_EXPORT void qDrawShadePanel( QPainter *p, const QRect &r,
 | 
|---|
| 81 |                                const QColorGroup &, bool sunken=FALSE,
 | 
|---|
| 82 |                                int lineWidth = 1, const QBrush *fill = 0 );
 | 
|---|
| 83 | 
 | 
|---|
| 84 | Q_EXPORT void qDrawWinButton( QPainter *p, int x, int y, int w, int h,
 | 
|---|
| 85 |                               const QColorGroup &g, bool sunken = FALSE,
 | 
|---|
| 86 |                               const QBrush *fill = 0 );
 | 
|---|
| 87 | 
 | 
|---|
| 88 | Q_EXPORT void qDrawWinButton( QPainter *p, const QRect &r,
 | 
|---|
| 89 |                               const QColorGroup &g, bool sunken = FALSE,
 | 
|---|
| 90 |                               const QBrush *fill = 0 );
 | 
|---|
| 91 | 
 | 
|---|
| 92 | Q_EXPORT void qDrawWinPanel( QPainter *p, int x, int y, int w, int h,
 | 
|---|
| 93 |                              const QColorGroup &, bool sunken=FALSE,
 | 
|---|
| 94 |                              const QBrush *fill = 0 );
 | 
|---|
| 95 | 
 | 
|---|
| 96 | Q_EXPORT void qDrawWinPanel( QPainter *p, const QRect &r,
 | 
|---|
| 97 |                              const QColorGroup &, bool sunken=FALSE,
 | 
|---|
| 98 |                              const QBrush *fill = 0 );
 | 
|---|
| 99 | 
 | 
|---|
| 100 | Q_EXPORT void qDrawPlainRect( QPainter *p, int x, int y, int w, int h, const QColor &,
 | 
|---|
| 101 |                               int lineWidth = 1, const QBrush *fill = 0 );
 | 
|---|
| 102 | 
 | 
|---|
| 103 | Q_EXPORT void qDrawPlainRect( QPainter *p, const QRect &r, const QColor &,
 | 
|---|
| 104 |                               int lineWidth = 1, const QBrush *fill = 0 );
 | 
|---|
| 105 | 
 | 
|---|
| 106 | 
 | 
|---|
| 107 | //
 | 
|---|
| 108 | // Other obsolete drawing functions.
 | 
|---|
| 109 | // Use QStyle::itemRect(), QStyle::drawItem() and QStyle::drawArrow() instead.
 | 
|---|
| 110 | //
 | 
|---|
| 111 | Q_EXPORT QRect qItemRect( QPainter *p, Qt::GUIStyle gs, int x, int y, int w, int h,
 | 
|---|
| 112 |                           int flags, bool enabled,
 | 
|---|
| 113 |                           const QPixmap *pixmap, const QString& text, int len=-1 );
 | 
|---|
| 114 | 
 | 
|---|
| 115 | Q_EXPORT void qDrawItem( QPainter *p, Qt::GUIStyle gs, int x, int y, int w, int h,
 | 
|---|
| 116 |                          int flags, const QColorGroup &g, bool enabled,
 | 
|---|
| 117 |                          const QPixmap *pixmap, const QString& text,
 | 
|---|
| 118 |                          int len=-1, const QColor* penColor = 0 );
 | 
|---|
| 119 | 
 | 
|---|
| 120 | Q_EXPORT void qDrawArrow( QPainter *p, Qt::ArrowType type, Qt::GUIStyle style, bool down,
 | 
|---|
| 121 |                           int x, int y, int w, int h,
 | 
|---|
| 122 |                           const QColorGroup &g, bool enabled );
 | 
|---|
| 123 | 
 | 
|---|
| 124 | #endif // QT_NO_DRAWUTIL
 | 
|---|
| 125 | #endif // QDRAWUTIL_H
 | 
|---|