Qt 4.8
|
#include <QtCore/qnamespace.h>
#include <QtCore/qstring.h>
#include <QtCore/qmargins.h>
#include <QtGui/qpixmap.h>
Go to the source code of this file.
Classes | |
class | QTileRules |
Holds the rules used to draw a pixmap or image split into nine segments, similar to [CSS3 border-images](http://www. More... | |
Functions | |
Q_GUI_EXPORT void | qDrawBorderPixmap (QPainter *painter, const QRect &targetRect, const QMargins &targetMargins, const QPixmap &pixmap, const QRect &sourceRect, const QMargins &sourceMargins, const QTileRules &rules=QTileRules()) |
void | qDrawBorderPixmap (QPainter *painter, const QRect &target, const QMargins &margins, const QPixmap &pixmap) |
Q_GUI_EXPORT void | qDrawPlainRect (QPainter *p, int x, int y, int w, int h, const QColor &, int lineWidth=1, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawPlainRect (QPainter *p, const QRect &r, const QColor &, int lineWidth=1, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawShadeLine (QPainter *p, int x1, int y1, int x2, int y2, const QPalette &pal, bool sunken=true, int lineWidth=1, int midLineWidth=0) |
Q_GUI_EXPORT void | qDrawShadeLine (QPainter *p, const QPoint &p1, const QPoint &p2, const QPalette &pal, bool sunken=true, int lineWidth=1, int midLineWidth=0) |
Q_GUI_EXPORT void | qDrawShadePanel (QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken=false, int lineWidth=1, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawShadePanel (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, int lineWidth=1, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawShadeRect (QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken=false, int lineWidth=1, int midLineWidth=0, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawShadeRect (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, int lineWidth=1, int midLineWidth=0, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawWinButton (QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken=false, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawWinButton (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawWinPanel (QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken=false, const QBrush *fill=0) |
Q_GUI_EXPORT void | qDrawWinPanel (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, const QBrush *fill=0) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Draws the Windows-style panel at the rectangle specified by rect using the given painter with a line width of 2 pixels. More... | |
Q_GUI_EXPORT void qDrawBorderPixmap | ( | QPainter * | painter, |
const QRect & | targetRect, | ||
const QMargins & | targetMargins, | ||
const QPixmap & | pixmap, | ||
const QRect & | sourceRect, | ||
const QMargins & | sourceMargins, | ||
const QTileRules & | rules = QTileRules() |
||
) |
Referenced by qDrawBorderPixmap().
|
inline |
Definition at line 183 of file qdrawutil.h.
Q_GUI_EXPORT void qDrawPlainRect | ( | QPainter * | p, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const QColor & | , | ||
int | lineWidth = 1 , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 511 of file qdrawutil.cpp.
Referenced by QWindowsMobileStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsCEStyle::drawControl(), QWindowsMobileStyle::drawControl(), QWindowsCEStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), and qDrawPlainRect().
Q_GUI_EXPORT void qDrawPlainRect | ( | QPainter * | p, |
const QRect & | r, | ||
const QColor & | , | ||
int | lineWidth = 1 , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 726 of file qdrawutil.cpp.
Q_GUI_EXPORT void qDrawShadeLine | ( | QPainter * | p, |
int | x1, | ||
int | y1, | ||
int | x2, | ||
int | y2, | ||
const QPalette & | pal, | ||
bool | sunken = true , |
||
int | lineWidth = 1 , |
||
int | midLineWidth = 0 |
||
) |
Definition at line 93 of file qdrawutil.cpp.
Referenced by QMotifStyle::drawComplexControl(), QCommonStyle::drawControl(), QCommonStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), and qDrawShadeLine().
Q_GUI_EXPORT void qDrawShadeLine | ( | QPainter * | p, |
const QPoint & | p1, | ||
const QPoint & | p2, | ||
const QPalette & | pal, | ||
bool | sunken = true , |
||
int | lineWidth = 1 , |
||
int | midLineWidth = 0 |
||
) |
Definition at line 568 of file qdrawutil.cpp.
Q_GUI_EXPORT void qDrawShadePanel | ( | QPainter * | p, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const QPalette & | pal, | ||
bool | sunken = false , |
||
int | lineWidth = 1 , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 303 of file qdrawutil.cpp.
Referenced by QMotifStyle::drawComplexControl(), QCommonStyle::drawControl(), QWindowsCEStyle::drawControl(), QCDEStyle::drawControl(), QWindowsStyle::drawControl(), QMotifStyle::drawControl(), QStyleSheetStyle::drawControl(), QCommonStyle::drawPrimitive(), QWindowsMobileStyle::drawPrimitive(), QCDEStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QMotifStyle::drawPrimitive(), QDecorationDefault::paint(), QColorLuminancePicker::paintEvent(), and qDrawShadePanel().
Q_GUI_EXPORT void qDrawShadePanel | ( | QPainter * | p, |
const QRect & | r, | ||
const QPalette & | pal, | ||
bool | sunken = false , |
||
int | lineWidth = 1 , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 640 of file qdrawutil.cpp.
Q_GUI_EXPORT void qDrawShadeRect | ( | QPainter * | p, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const QPalette & | pal, | ||
bool | sunken = false , |
||
int | lineWidth = 1 , |
||
int | midLineWidth = 0 , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 204 of file qdrawutil.cpp.
Referenced by QCommonStyle::drawControl(), QWindowsStyle::drawControl(), QWindowsCEStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), and qDrawShadeRect().
Q_GUI_EXPORT void qDrawShadeRect | ( | QPainter * | p, |
const QRect & | r, | ||
const QPalette & | pal, | ||
bool | sunken = false , |
||
int | lineWidth = 1 , |
||
int | midLineWidth = 0 , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 605 of file qdrawutil.cpp.
Q_GUI_EXPORT void qDrawWinButton | ( | QPainter * | p, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const QPalette & | pal, | ||
bool | sunken = false , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 435 of file qdrawutil.cpp.
Referenced by QWindowsStyle::drawComplexControl(), QWindowsStyle::drawControl(), QWindowsMobileStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), and qDrawWinButton().
Q_GUI_EXPORT void qDrawWinButton | ( | QPainter * | p, |
const QRect & | r, | ||
const QPalette & | pal, | ||
bool | sunken = false , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 669 of file qdrawutil.cpp.
Q_GUI_EXPORT void qDrawWinPanel | ( | QPainter * | p, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h, | ||
const QPalette & | pal, | ||
bool | sunken = false , |
||
const QBrush * | fill = 0 |
||
) |
Definition at line 475 of file qdrawutil.cpp.
Referenced by QCommonStyle::drawComplexControl(), QWindowsStyle::drawComplexControl(), QCommonStyle::drawControl(), QCommonStyle::drawPrimitive(), QWindowsStyle::drawPrimitive(), QDecorationDefault::paint(), QDecorationWindows::paintButton(), QDecorationDefault::paintButton(), and qDrawWinPanel().
Q_GUI_EXPORT void qDrawWinPanel | ( | QPainter * | p, |
const QRect & | r, | ||
const QPalette & | pal, | ||
bool | sunken, | ||
const QBrush * | fill | ||
) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Draws the Windows-style panel at the rectangle specified by rect using the given painter with a line width of 2 pixels.
The button's interior is filled with the fill brush unless fill is 0.
The given palette specifies the shading colors. The panel appears sunken if sunken is true, otherwise raised.
Alternatively you can use a QFrame widget and apply the QFrame::setFrameStyle() function to display a shaded panel:
Definition at line 699 of file qdrawutil.cpp.