Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qdrawutil.h File Reference

(703f922b18110ed90018bd05526661937c3067f6)

#include <QtWidgets/qtwidgetsglobal.h>
#include <QtCore/qnamespace.h>
#include <QtCore/qstring.h>
#include <QtCore/qmargins.h>
#include <QtGui/qpixmap.h>
+ Include dependency graph for qdrawutil.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  QTileRules
 The QTileRules class provides the rules used to draw a pixmap or image split into nine segments. More...
 

Namespaces

namespace  QDrawBorderPixmap
 

Enumerations

enum  QDrawBorderPixmap::DrawingHint {
  QDrawBorderPixmap::OpaqueTopLeft = 0x0001 , QDrawBorderPixmap::OpaqueTop = 0x0002 , QDrawBorderPixmap::OpaqueTopRight = 0x0004 , QDrawBorderPixmap::OpaqueLeft = 0x0008 ,
  QDrawBorderPixmap::OpaqueCenter = 0x0010 , QDrawBorderPixmap::OpaqueRight = 0x0020 , QDrawBorderPixmap::OpaqueBottomLeft = 0x0040 , QDrawBorderPixmap::OpaqueBottom = 0x0080 ,
  QDrawBorderPixmap::OpaqueBottomRight = 0x0100 , QDrawBorderPixmap::OpaqueCorners = OpaqueTopLeft | OpaqueTopRight | OpaqueBottomLeft | OpaqueBottomRight , QDrawBorderPixmap::OpaqueEdges = OpaqueTop | OpaqueLeft | OpaqueRight | OpaqueBottom , QDrawBorderPixmap::OpaqueFrame = OpaqueCorners | OpaqueEdges ,
  QDrawBorderPixmap::OpaqueAll = OpaqueCenter | OpaqueFrame
}
 

Functions

Q_WIDGETS_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_WIDGETS_EXPORT void qDrawShadeLine (QPainter *p, const QPoint &p1, const QPoint &p2, const QPalette &pal, bool sunken=true, int lineWidth=1, int midLineWidth=0)
 
Q_WIDGETS_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=nullptr)
 
Q_WIDGETS_EXPORT void qDrawShadeRect (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, int lineWidth=1, int midLineWidth=0, const QBrush *fill=nullptr)
 
Q_WIDGETS_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=nullptr)
 
Q_WIDGETS_EXPORT void qDrawShadePanel (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, int lineWidth=1, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawWinButton (QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken=false, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawWinButton (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawWinPanel (QPainter *p, int x, int y, int w, int h, const QPalette &pal, bool sunken=false, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawWinPanel (QPainter *p, const QRect &r, const QPalette &pal, bool sunken=false, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawPlainRect (QPainter *p, int x, int y, int w, int h, const QColor &, int lineWidth=1, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawPlainRect (QPainter *p, const QRect &r, const QColor &, int lineWidth=1, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawPlainRoundedRect (QPainter *p, int x, int y, int w, int h, qreal rx, qreal ry, const QColor &, int lineWidth=1, const QBrush *fill=nullptr)
 
void qDrawPlainRoundedRect (QPainter *painter, const QRect &rect, qreal rx, qreal ry, const QColor &lineColor, int lineWidth=1, const QBrush *fill=nullptr)
 
Q_WIDGETS_EXPORT void qDrawBorderPixmap (QPainter *painter, const QRect &targetRect, const QMargins &targetMargins, const QPixmap &pixmap, const QRect &sourceRect, const QMargins &sourceMargins, const QTileRules &rules=QTileRules(), QDrawBorderPixmap::DrawingHints hints=QDrawBorderPixmap::DrawingHints())
 
void qDrawBorderPixmap (QPainter *painter, const QRect &target, const QMargins &margins, const QPixmap &pixmap)
 

Function Documentation

◆ qDrawBorderPixmap() [1/2]

void qDrawBorderPixmap ( QPainter * painter,
const QRect & target,
const QMargins & margins,
const QPixmap & pixmap )
inline

Definition at line 134 of file qdrawutil.h.

References painter, pixmap, and qDrawBorderPixmap().

+ Here is the call graph for this function:

◆ qDrawBorderPixmap() [2/2]

Q_WIDGETS_EXPORT void qDrawBorderPixmap ( QPainter * painter,
const QRect & targetRect,
const QMargins & targetMargins,
const QPixmap & pixmap,
const QRect & sourceRect,
const QMargins & sourceMargins,
const QTileRules & rules = QTileRules(),
QDrawBorderPixmap::DrawingHints hints = QDrawBorderPixmap::DrawingHints() )

Referenced by qDrawBorderPixmap(), and QPixmapStylePrivate::scale().

+ Here is the caller graph for this function:

◆ qDrawPlainRect() [1/2]

Q_WIDGETS_EXPORT void qDrawPlainRect ( QPainter * p,
const QRect & r,
const QColor & c,
int lineWidth = 1,
const QBrush * fill = nullptr )

Definition at line 881 of file qdrawutil.cpp.

References fill(), and qDrawPlainRect().

+ Here is the call graph for this function:

◆ qDrawPlainRect() [2/2]

Q_WIDGETS_EXPORT void qDrawPlainRect ( QPainter * p,
int x,
int y,
int w,
int h,
const QColor & c,
int lineWidth = 1,
const QBrush * fill = nullptr )

Definition at line 574 of file qdrawutil.cpp.

References fill(), i, Qt::NoBrush, Qt::NoPen, Q_UNLIKELY, qFuzzyCompare(), qRound(), and qWarning.

Referenced by QAndroidStyle::AndroidControl::drawControl(), QCommonStyle::drawControl(), QCommonStyle::drawPrimitive(), and qDrawPlainRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDrawPlainRoundedRect() [1/2]

Q_WIDGETS_EXPORT void qDrawPlainRoundedRect ( QPainter * p,
int x,
int y,
int w,
int h,
qreal rx,
qreal ry,
const QColor & c,
int lineWidth = 1,
const QBrush * fill = nullptr )

Definition at line 640 of file qdrawutil.cpp.

References fill(), i, Qt::NoBrush, Qt::NoPen, Q_UNLIKELY, qFuzzyCompare(), qRound(), qWarning, rect, rx(), and ry().

Referenced by QWindows11Style::drawControl(), and qDrawPlainRoundedRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDrawPlainRoundedRect() [2/2]

void qDrawPlainRoundedRect ( QPainter * painter,
const QRect & rect,
qreal rx,
qreal ry,
const QColor & lineColor,
int lineWidth = 1,
const QBrush * fill = nullptr )
inline

Definition at line 78 of file qdrawutil.h.

References fill(), painter, qDrawPlainRoundedRect(), rect, rx(), and ry().

+ Here is the call graph for this function:

◆ qDrawShadeLine() [1/2]

Q_WIDGETS_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 716 of file qdrawutil.cpp.

References p1, p2, and qDrawShadeLine().

+ Here is the call graph for this function:

◆ qDrawShadeLine() [2/2]

Q_WIDGETS_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 86 of file qdrawutil.cpp.

References QBrush::color(), QPalette::color(), QPalette::Dark, QPalette::dark(), i, QPalette::light(), QPalette::mid(), Q_UNLIKELY, qFuzzyCompare(), qRound(), qWarning, and QPolygon::setPoints().

Referenced by QCommonStyle::drawControl(), QAndroidStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), and qDrawShadeLine().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDrawShadePanel() [1/2]

Q_WIDGETS_EXPORT void qDrawShadePanel ( QPainter * p,
const QRect & r,
const QPalette & pal,
bool sunken = false,
int lineWidth = 1,
const QBrush * fill = nullptr )

Definition at line 792 of file qdrawutil.cpp.

References fill(), and qDrawShadePanel().

+ Here is the call graph for this function:

◆ qDrawShadePanel() [2/2]

Q_WIDGETS_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 = nullptr )

Definition at line 329 of file qdrawutil.cpp.

References QBrush::color(), QPalette::dark(), fill(), i, QPalette::light(), QPalette::midlight(), Q_UNLIKELY, qFuzzyCompare(), qRound(), qWarning, and QPalette::shadow().

Referenced by QAndroidStyle::AndroidControl::drawControl(), QCommonStyle::drawControl(), QWindows11Style::drawControl(), QCommonStyle::drawPrimitive(), QtPrivate::QColorLuminancePicker::paintEvent(), and qDrawShadePanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDrawShadeRect() [1/2]

Q_WIDGETS_EXPORT void qDrawShadeRect ( QPainter * p,
const QRect & r,
const QPalette & pal,
bool sunken = false,
int lineWidth = 1,
int midLineWidth = 0,
const QBrush * fill = nullptr )

Definition at line 755 of file qdrawutil.cpp.

References fill(), and qDrawShadeRect().

+ Here is the call graph for this function:

◆ qDrawShadeRect() [2/2]

Q_WIDGETS_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 = nullptr )

Definition at line 213 of file qdrawutil.cpp.

References QBrush::color(), QPalette::dark(), fill(), i, j, QPalette::light(), QPalette::mid(), Qt::NoPen, Q_UNLIKELY, qFuzzyCompare(), qRound(), and qWarning.

Referenced by QCommonStyle::drawControl(), QWindows11Style::drawControl(), QAndroidStyle::drawPrimitive(), QCommonStyle::drawPrimitive(), and qDrawShadeRect().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDrawWinButton() [1/2]

Q_WIDGETS_EXPORT void qDrawWinButton ( QPainter * p,
const QRect & r,
const QPalette & pal,
bool sunken = false,
const QBrush * fill = nullptr )

Definition at line 823 of file qdrawutil.cpp.

References fill(), and qDrawWinButton().

+ Here is the call graph for this function:

◆ qDrawWinButton() [2/2]

Q_WIDGETS_EXPORT void qDrawWinButton ( QPainter * p,
int x,
int y,
int w,
int h,
const QPalette & pal,
bool sunken = false,
const QBrush * fill = nullptr )

Definition at line 498 of file qdrawutil.cpp.

References QPalette::button(), QBrush::color(), QPalette::dark(), fill(), QPalette::light(), qDrawWinShades(), and QPalette::shadow().

Referenced by QWindowsVistaStyle::drawPrimitive(), and qDrawWinButton().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qDrawWinPanel() [1/2]

Q_WIDGETS_EXPORT void qDrawWinPanel ( QPainter * p,
const QRect & r,
const QPalette & pal,
bool sunken = false,
const QBrush * fill = nullptr )

Definition at line 854 of file qdrawutil.cpp.

References fill(), and qDrawWinPanel().

+ Here is the call graph for this function:

◆ qDrawWinPanel() [2/2]

Q_WIDGETS_EXPORT void qDrawWinPanel ( QPainter * p,
int x,
int y,
int w,
int h,
const QPalette & pal,
bool sunken = false,
const QBrush * fill = nullptr )

Definition at line 538 of file qdrawutil.cpp.

References QBrush::color(), QPalette::dark(), fill(), QPalette::light(), QPalette::midlight(), qDrawWinShades(), and QPalette::shadow().

Referenced by QCommonStyle::drawComplexControl(), QCommonStyle::drawControl(), QCommonStyle::drawPrimitive(), and qDrawWinPanel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: