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
QQuickShapePathPrivate Class Reference

#include <qquickshape_p_p.h>

+ Inheritance diagram for QQuickShapePathPrivate:
+ Collaboration diagram for QQuickShapePathPrivate:

Public Types

enum  Dirty {
  DirtyPath = 0x01 , DirtyStrokeColor = 0x02 , DirtyStrokeWidth = 0x04 , DirtyFillColor = 0x08 ,
  DirtyFillRule = 0x10 , DirtyStyle = 0x20 , DirtyDash = 0x40 , DirtyFillGradient = 0x80 ,
  DirtyAll = 0xFF
}
 
- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Public Member Functions

 QQuickShapePathPrivate ()
 Describes a Path and associated properties for stroking and filling.
 
void _q_pathChanged ()
 
void _q_fillGradientChanged ()
 
- Public Member Functions inherited from QQuickPathPrivate
 QQuickPathPrivate ()
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Static Public Member Functions

static QQuickShapePathPrivateget (QQuickShapePath *p)
 
- Static Public Member Functions inherited from QQuickPathPrivate
static QQuickPathPrivateget (QQuickPath *path)
 
static const QQuickPathPrivateget (const QQuickPath *path)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (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)
 

Public Attributes

int dirty
 
QQuickShapeStrokeFillParams sfp
 
QQuickShapePath::PathHints pathHints
 
- Public Attributes inherited from QQuickPathPrivate
QPainterPath _path
 
QList< QQuickPathElement * > _pathElements
 
QVector< QPointF_pointCache
 
QList< QQuickPath::AttributePoint > _attributePoints
 
QStringList _attributes
 
QList< QQuickCurve * > _pathCurves
 
QList< QQuickPathText * > _pathTexts
 
QQuickCachedBezier prevBez
 
QQmlNullableValue< qrealstartX
 
QQmlNullableValue< qrealstartY
 
qreal pathLength = 0
 
QSizeF scale = QSizeF(1, 1)
 
bool closed = false
 
bool componentComplete = true
 
bool isShapePath = false
 
bool simplify = false
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Detailed Description

Definition at line 84 of file qquickshape_p_p.h.

Member Enumeration Documentation

◆ Dirty

Enumerator
DirtyPath 
DirtyStrokeColor 
DirtyStrokeWidth 
DirtyFillColor 
DirtyFillRule 
DirtyStyle 
DirtyDash 
DirtyFillGradient 
DirtyAll 

Definition at line 89 of file qquickshape_p_p.h.

Constructor & Destructor Documentation

◆ QQuickShapePathPrivate()

QQuickShapePathPrivate::QQuickShapePathPrivate ( )

Describes a Path and associated properties for stroking and filling.

\qmltype ShapePath

! \instantiates QQuickShapePath \inqmlmodule QtQuick.Shapes

\inherits Path

Since
5.10

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):

See also
{Qt Quick Examples - Shapes}, {Weather Forecast Example}, Shape

Definition at line 155 of file qquickshape.cpp.

References QQuickPathPrivate::isShapePath.

Member Function Documentation

◆ _q_fillGradientChanged()

void QQuickShapePathPrivate::_q_fillGradientChanged ( )

Definition at line 509 of file qquickshape.cpp.

References dirty, DirtyFillGradient, and emit.

◆ _q_pathChanged()

void QQuickShapePathPrivate::_q_pathChanged ( )

◆ get()

static QQuickShapePathPrivate * QQuickShapePathPrivate::get ( QQuickShapePath * p)
inlinestatic

Definition at line 107 of file qquickshape_p_p.h.

Referenced by QQuickShape::itemChange(), and QQuickShapePrivate::sync().

+ Here is the caller graph for this function:

Member Data Documentation

◆ dirty

int QQuickShapePathPrivate::dirty

Definition at line 109 of file qquickshape_p_p.h.

Referenced by _q_fillGradientChanged().

◆ pathHints

QQuickShapePath::PathHints QQuickShapePathPrivate::pathHints

Definition at line 111 of file qquickshape_p_p.h.

◆ sfp

QQuickShapeStrokeFillParams QQuickShapePathPrivate::sfp

Definition at line 110 of file qquickshape_p_p.h.


The documentation for this class was generated from the following files: