Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 ,
  DirtyFillTransform = 0x100 , DirtyFillItem = 0x200 , DirtyAll = 0x3FF
}
 
- 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 ()
 
void _q_fillItemDestroyed ()
 
void handleSceneChange ()
 
void writeToDebugStream (QDebug &debug) const override
 
- Public Member Functions inherited from QQuickPathPrivate
 QQuickPathPrivate ()
 
void appendPathElement (QQuickPathElement *pathElement)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
void setObjectNameWithoutBindings (const QString &name)
 
 QObjectPrivate (decltype(QObjectPrivateVersion) version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
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
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
const 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: 1
 
bool isShapePath: 1
 
bool simplify: 1
 
bool processPending: 1
 
bool asynchronous: 1
 
bool useCustomPath: 1
 
- 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 91 of file qquickshape_p_p.h.

Member Enumeration Documentation

◆ Dirty

Enumerator
DirtyPath 
DirtyStrokeColor 
DirtyStrokeWidth 
DirtyFillColor 
DirtyFillRule 
DirtyStyle 
DirtyDash 
DirtyFillGradient 
DirtyFillTransform 
DirtyFillItem 
DirtyAll 

Definition at line 96 of file qquickshape_p_p.h.

Constructor & Destructor Documentation

◆ QQuickShapePathPrivate()

QQuickShapePathPrivate::QQuickShapePathPrivate ( )

Describes a Path and associated properties for stroking and filling.

\qmltype ShapePath

! \nativetype 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 158 of file qquickshape.cpp.

Member Function Documentation

◆ _q_fillGradientChanged()

void QQuickShapePathPrivate::_q_fillGradientChanged ( )

Definition at line 461 of file qquickshape.cpp.

◆ _q_fillItemDestroyed()

void QQuickShapePathPrivate::_q_fillItemDestroyed ( )

Definition at line 529 of file qquickshape.cpp.

◆ _q_pathChanged()

void QQuickShapePathPrivate::_q_pathChanged ( )

◆ get()

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

Definition at line 121 of file qquickshape_p_p.h.

◆ handleSceneChange()

void QQuickShapePathPrivate::handleSceneChange ( )

◆ writeToDebugStream()

void QQuickShapePathPrivate::writeToDebugStream ( QDebug & debug) const
overridevirtual

Reimplemented from QObjectPrivate.

Definition at line 539 of file qquickshape.cpp.

Member Data Documentation

◆ dirty

int QQuickShapePathPrivate::dirty

Definition at line 123 of file qquickshape_p_p.h.

◆ pathHints

QQuickShapePath::PathHints QQuickShapePathPrivate::pathHints

Definition at line 125 of file qquickshape_p_p.h.

◆ sfp

QQuickShapeStrokeFillParams QQuickShapePathPrivate::sfp

Definition at line 124 of file qquickshape_p_p.h.


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