source: trunk/src/gui/painting/qdrawutil.h@ 350

Last change on this file since 350 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 5.6 KB
Line 
1/****************************************************************************
2**
3** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
4** Contact: Qt Software Information ([email protected])
5**
6** This file is part of the QtGui module of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial Usage
10** Licensees holding valid Qt Commercial licenses may use this file in
11** accordance with the Qt Commercial License Agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and Nokia.
14**
15** GNU Lesser General Public License Usage
16** Alternatively, this file may be used under the terms of the GNU Lesser
17** General Public License version 2.1 as published by the Free Software
18** Foundation and appearing in the file LICENSE.LGPL included in the
19** packaging of this file. Please review the following information to
20** ensure the GNU Lesser General Public License version 2.1 requirements
21** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
22**
23** In addition, as a special exception, Nokia gives you certain
24** additional rights. These rights are described in the Nokia Qt LGPL
25** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
26** package.
27**
28** GNU General Public License Usage
29** Alternatively, this file may be used under the terms of the GNU
30** General Public License version 3.0 as published by the Free Software
31** Foundation and appearing in the file LICENSE.GPL included in the
32** packaging of this file. Please review the following information to
33** ensure the GNU General Public License version 3.0 requirements will be
34** met: http://www.gnu.org/copyleft/gpl.html.
35**
36** If you are unsure which license is appropriate for your use, please
37** contact the sales department at [email protected].
38** $QT_END_LICENSE$
39**
40****************************************************************************/
41
42#ifndef QDRAWUTIL_H
43#define QDRAWUTIL_H
44
45#include <QtCore/qnamespace.h>
46#include <QtCore/qstring.h> // char*->QString conversion
47
48QT_BEGIN_HEADER
49
50QT_BEGIN_NAMESPACE
51
52QT_MODULE(Gui)
53
54class QPainter;
55#ifndef QT3_SUPPORT
56class QColorGroup;
57#endif
58class QPalette;
59class QPoint;
60class QColor;
61class QBrush;
62class QRect;
63class QPixmap;
64
65//
66// Standard shade drawing
67//
68
69Q_GUI_EXPORT void qDrawShadeLine(QPainter *p, int x1, int y1, int x2, int y2,
70 const QPalette &pal, bool sunken = true,
71 int lineWidth = 1, int midLineWidth = 0);
72
73Q_GUI_EXPORT void qDrawShadeLine(QPainter *p, const QPoint &p1, const QPoint &p2,
74 const QPalette &pal, bool sunken = true,
75 int lineWidth = 1, int midLineWidth = 0);
76
77Q_GUI_EXPORT void qDrawShadeRect(QPainter *p, int x, int y, int w, int h,
78 const QPalette &pal, bool sunken = false,
79 int lineWidth = 1, int midLineWidth = 0,
80 const QBrush *fill = 0);
81
82Q_GUI_EXPORT void qDrawShadeRect(QPainter *p, const QRect &r,
83 const QPalette &pal, bool sunken = false,
84 int lineWidth = 1, int midLineWidth = 0,
85 const QBrush *fill = 0);
86
87Q_GUI_EXPORT void qDrawShadePanel(QPainter *p, int x, int y, int w, int h,
88 const QPalette &pal, bool sunken = false,
89 int lineWidth = 1, const QBrush *fill = 0);
90
91Q_GUI_EXPORT void qDrawShadePanel(QPainter *p, const QRect &r,
92 const QPalette &pal, bool sunken = false,
93 int lineWidth = 1, const QBrush *fill = 0);
94
95Q_GUI_EXPORT void qDrawWinButton(QPainter *p, int x, int y, int w, int h,
96 const QPalette &pal, bool sunken = false,
97 const QBrush *fill = 0);
98
99Q_GUI_EXPORT void qDrawWinButton(QPainter *p, const QRect &r,
100 const QPalette &pal, bool sunken = false,
101 const QBrush *fill = 0);
102
103Q_GUI_EXPORT void qDrawWinPanel(QPainter *p, int x, int y, int w, int h,
104 const QPalette &pal, bool sunken = false,
105 const QBrush *fill = 0);
106
107Q_GUI_EXPORT void qDrawWinPanel(QPainter *p, const QRect &r,
108 const QPalette &pal, bool sunken = false,
109 const QBrush *fill = 0);
110
111Q_GUI_EXPORT void qDrawPlainRect(QPainter *p, int x, int y, int w, int h, const QColor &,
112 int lineWidth = 1, const QBrush *fill = 0);
113
114Q_GUI_EXPORT void qDrawPlainRect(QPainter *p, const QRect &r, const QColor &,
115 int lineWidth = 1, const QBrush *fill = 0);
116
117
118#ifdef QT3_SUPPORT
119//
120// Use QStyle::itemRect(), QStyle::drawItem() and QStyle::drawArrow() instead.
121//
122Q_GUI_EXPORT QT3_SUPPORT QRect qItemRect(QPainter *p, Qt::GUIStyle gs, int x, int y, int w, int h,
123 int flags, bool enabled,
124 const QPixmap *pixmap, const QString& text, int len=-1);
125
126Q_GUI_EXPORT QT3_SUPPORT void qDrawItem(QPainter *p, Qt::GUIStyle gs, int x, int y, int w, int h,
127 int flags, const QPalette &pal, bool enabled,
128 const QPixmap *pixmap, const QString& text,
129 int len=-1, const QColor* penColor = 0);
130
131Q_GUI_EXPORT QT3_SUPPORT void qDrawArrow(QPainter *p, Qt::ArrowType type, Qt::GUIStyle style, bool down,
132 int x, int y, int w, int h,
133 const QPalette &pal, bool enabled);
134#endif
135
136QT_END_NAMESPACE
137
138QT_END_HEADER
139
140#endif // QDRAWUTIL_H
Note: See TracBrowser for help on using the repository browser.