![]() |
Qt 6.x
The Qt SDK
|
#include <qquickshape_p_p.h>
Public Types | |
enum | Dirty { DirtyPath = 0x01 , DirtyStrokeColor = 0x02 , DirtyStrokeWidth = 0x04 , DirtyFillColor = 0x08 , DirtyFillRule = 0x10 , DirtyStyle = 0x20 , DirtyDash = 0x40 , DirtyFillGradient = 0x80 , DirtyAll = 0xFF } |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
Static Public Member Functions | |
static QQuickShapePathPrivate * | get (QQuickShapePath *p) |
![]() | |
static QQuickPathPrivate * | get (QQuickPath *path) |
static const QQuickPathPrivate * | get (const QQuickPath *path) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Definition at line 93 of file qquickshape_p_p.h.
Enumerator | |
---|---|
DirtyPath | |
DirtyStrokeColor | |
DirtyStrokeWidth | |
DirtyFillColor | |
DirtyFillRule | |
DirtyStyle | |
DirtyDash | |
DirtyFillGradient | |
DirtyAll |
Definition at line 98 of file qquickshape_p_p.h.
QQuickShapePathPrivate::QQuickShapePathPrivate | ( | ) |
Describes a Path and associated properties for stroking and filling.
\qmltype ShapePath
! \instantiates QQuickShapePath \inqmlmodule QtQuick.Shapes
\inherits Path
A \l Shape contains one or more ShapePath elements. At least one ShapePath is necessary in order to have a Shape output anything visible. A ShapePath itself is a \l Path with additional properties describing the stroking and filling parameters, such as the stroke width and color, the fill color or gradient, join and cap styles, and so on. As with ordinary \l Path objects, ShapePath also contains a list of path elements like \l PathMove, \l PathLine, \l PathCubic, \l PathQuad, \l PathArc, together with a starting position.
Any property changes in these data sets will be bubble up and change the output of the Shape. This means that it is simple and easy to change, or even animate, the starting and ending position, control points, or any stroke or fill parameters using the usual QML bindings and animation types like NumberAnimation.
In the following example the line join style changes automatically based on the value of joinStyleIndex:
\qml ShapePath { strokeColor: "black" strokeWidth: 16 fillColor: "transparent" capStyle: ShapePath.RoundCap
property int joinStyleIndex: 0
property variant styles: [ ShapePath.BevelJoin, ShapePath.MiterJoin, ShapePath.RoundJoin ]
joinStyle: styles[joinStyleIndex]
startX: 30 startY: 30 PathLine { x: 100; y: 100 } PathLine { x: 30; y: 100 } } \endqml
Once associated with a Shape, here is the output with a joinStyleIndex of 2 (ShapePath.RoundJoin):
Definition at line 151 of file qquickshape.cpp.
References QQuickPathPrivate::isShapePath.
void QQuickShapePathPrivate::_q_fillGradientChanged | ( | ) |
Definition at line 505 of file qquickshape.cpp.
References dirty, DirtyFillGradient, and emit.
void QQuickShapePathPrivate::_q_pathChanged | ( | ) |
|
inlinestatic |
Definition at line 116 of file qquickshape_p_p.h.
Referenced by QQuickShape::itemChange(), and QQuickShapePrivate::sync().
int QQuickShapePathPrivate::dirty |
Definition at line 118 of file qquickshape_p_p.h.
Referenced by _q_fillGradientChanged(), and QQuickShape::itemChange().
QQuickShapeStrokeFillParams QQuickShapePathPrivate::sfp |
Definition at line 119 of file qquickshape_p_p.h.