![]() |
Qt 6.x
The Qt SDK
|
#include <qquickshape_p.h>
Public Types | |
enum | FillRule { OddEvenFill = Qt::OddEvenFill , WindingFill = Qt::WindingFill } |
enum | JoinStyle { MiterJoin = Qt::MiterJoin , BevelJoin = Qt::BevelJoin , RoundJoin = Qt::RoundJoin } |
enum | CapStyle { FlatCap = Qt::FlatCap , SquareCap = Qt::SquareCap , RoundCap = Qt::RoundCap } |
enum | StrokeStyle { SolidLine = Qt::SolidLine , DashLine = Qt::DashLine } |
Signals | |
void | shapePathChanged () |
void | strokeColorChanged () |
void | strokeWidthChanged () |
void | fillColorChanged () |
void | fillRuleChanged () |
void | joinStyleChanged () |
void | miterLimitChanged () |
void | capStyleChanged () |
void | strokeStyleChanged () |
void | dashOffsetChanged () |
void | dashPatternChanged () |
![]() | |
void | changed () |
void | startXChanged () |
void | startYChanged () |
Q_REVISION (6, 6) void simplifiedChanged() | |
Q_REVISION (2, 14) void scaleChanged() | |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QQuickShapePath (QObject *parent=nullptr) | |
~QQuickShapePath () | |
QColor | strokeColor () const |
\qmlproperty color QtQuick.Shapes::ShapePath::strokeColor | |
void | setStrokeColor (const QColor &color) |
qreal | strokeWidth () const |
\qmlproperty real QtQuick.Shapes::ShapePath::strokeWidth | |
void | setStrokeWidth (qreal w) |
QColor | fillColor () const |
\qmlproperty color QtQuick.Shapes::ShapePath::fillColor | |
void | setFillColor (const QColor &color) |
FillRule | fillRule () const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::fillRule | |
void | setFillRule (FillRule fillRule) |
JoinStyle | joinStyle () const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::joinStyle | |
void | setJoinStyle (JoinStyle style) |
int | miterLimit () const |
\qmlproperty int QtQuick.Shapes::ShapePath::miterLimit | |
void | setMiterLimit (int limit) |
CapStyle | capStyle () const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::capStyle | |
void | setCapStyle (CapStyle style) |
StrokeStyle | strokeStyle () const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::strokeStyle | |
void | setStrokeStyle (StrokeStyle style) |
qreal | dashOffset () const |
\qmlproperty real QtQuick.Shapes::ShapePath::dashOffset | |
void | setDashOffset (qreal offset) |
QVector< qreal > | dashPattern () const |
\qmlproperty list<real> QtQuick.Shapes::ShapePath::dashPattern | |
void | setDashPattern (const QVector< qreal > &array) |
QQuickShapeGradient * | fillGradient () const |
\qmlproperty ShapeGradient QtQuick.Shapes::ShapePath::fillGradient | |
void | setFillGradient (QQuickShapeGradient *gradient) |
void | resetFillGradient () |
![]() | |
QQuickPath (QObject *parent=nullptr) | |
\qmltype PathElement \instantiates QQuickPathElement \inqmlmodule QtQuick | |
~QQuickPath () override | |
QQmlListProperty< QQuickPathElement > | pathElements () |
qreal | startX () const |
\qmlproperty real QtQuick::Path::startX \qmlproperty real QtQuick::Path::startY These properties hold the starting position of the path. | |
void | setStartX (qreal x) |
bool | hasStartX () const |
qreal | startY () const |
void | setStartY (qreal y) |
bool | hasStartY () const |
bool | isClosed () const |
\qmlproperty bool QtQuick::Path::closed This property holds whether the start and end of the path are identical. | |
QPainterPath | path () const |
QStringList | attributes () const |
qreal | attributeAt (const QString &, qreal) const |
Q_REVISION (2, 14) Q_INVOKABLE QPointF pointAtPercent(qreal t) const | |
QPointF | sequentialPointAt (qreal p, qreal *angle=nullptr) const |
void | invalidateSequentialHistory () const |
QSizeF | scale () const |
\qmlproperty size QtQuick::Path::scale | |
void | setScale (const QSizeF &scale) |
bool | simplified () const |
void | setSimplified (bool simplified) |
\qmlproperty bool QtQuick::Path::simplified | |
QPainterPath | createPath (const QPointF &startPoint, const QPointF &endPoint, const QStringList &attributes, qreal &pathLength, QList< AttributePoint > &attributePoints, bool *closed=nullptr) |
QPainterPath | createShapePath (const QPointF &startPoint, const QPointF &endPoint, qreal &pathLength, bool *closed=nullptr) |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
![]() | |
QQmlParserStatus () | |
virtual | ~QQmlParserStatus () |
virtual void | classBegin ()=0 |
Invoked after class creation, but before any properties have been set. | |
virtual void | componentComplete ()=0 |
Invoked after the root component that caused this instantiation has completed construction. | |
Properties | |
QColor | strokeColor |
qreal | strokeWidth |
QColor | fillColor |
FillRule | fillRule |
JoinStyle | joinStyle |
int | miterLimit |
CapStyle | capStyle |
StrokeStyle | strokeStyle |
qreal | dashOffset |
QVector< qreal > | dashPattern |
QQuickShapeGradient * | fillGradient |
QSizeF | scale |
![]() | |
QQmlListProperty< QQuickPathElement > | pathElements |
\qmlproperty list<PathElement> QtQuick::Path::pathElements This property holds the objects composing the path. | |
qreal | startX |
qreal | startY |
bool | closed |
bool | simplified |
FINALQSizeF | scale |
![]() | |
QString | objectName |
the name of this object | |
Additional Inherited Members | |
![]() | |
void | deleteLater () |
\threadsafe | |
![]() | |
static QPointF | sequentialPointAt (const QPainterPath &path, const qreal &pathLength, const QList< AttributePoint > &attributePoints, QQuickCachedBezier &prevBez, qreal p, qreal *angle=nullptr) |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QQuickPath (QQuickPathPrivate &dd, QObject *parent=nullptr) | |
void | componentComplete () override |
Invoked after the root component that caused this instantiation has completed construction. | |
void | classBegin () override |
Invoked after class creation, but before any properties have been set. | |
void | disconnectPathElements () |
void | connectPathElements () |
void | gatherAttributes () |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
![]() | |
static QQuickPathElement * | pathElements_at (QQmlListProperty< QQuickPathElement > *, qsizetype) |
static void | pathElements_append (QQmlListProperty< QQuickPathElement > *, QQuickPathElement *) |
static qsizetype | pathElements_count (QQmlListProperty< QQuickPathElement > *) |
static void | pathElements_clear (QQmlListProperty< QQuickPathElement > *) |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 183 of file qquickshape_p.h.
Enumerator | |
---|---|
FlatCap | |
SquareCap | |
RoundCap |
Definition at line 216 of file qquickshape_p.h.
Enumerator | |
---|---|
OddEvenFill | |
WindingFill |
Definition at line 203 of file qquickshape_p.h.
Enumerator | |
---|---|
MiterJoin | |
BevelJoin | |
RoundJoin |
Definition at line 209 of file qquickshape_p.h.
Enumerator | |
---|---|
SolidLine | |
DashLine |
Definition at line 223 of file qquickshape_p.h.
Definition at line 158 of file qquickshape.cpp.
References QQuickPath::changed(), QObject::connect(), d, QQuickShapePathPrivate::DirtyPath, emit, and shapePathChanged().
QQuickShapePath::~QQuickShapePath | ( | ) |
Definition at line 173 of file qquickshape.cpp.
QQuickShapePath::CapStyle QQuickShapePath::capStyle | ( | ) | const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::capStyle
This property defines how the end points of lines are drawn. The default value is ShapePath.SquareCap
.
\value ShapePath.FlatCap A square line end that does not cover the end point of the line.
\value ShapePath.SquareCap A square line end that covers the end point and extends beyond it by half the line width.
\value ShapePath.RoundCap A rounded line end.
Definition at line 366 of file qquickshape.cpp.
References d.
|
signal |
qreal QQuickShapePath::dashOffset | ( | ) | const |
\qmlproperty real QtQuick.Shapes::ShapePath::dashOffset
This property defines the starting point on the dash pattern, measured in units used to specify the dash pattern.
The default value is 0.
Definition at line 421 of file qquickshape.cpp.
References d.
|
signal |
\qmlproperty list<real> QtQuick.Shapes::ShapePath::dashPattern
This property defines the dash pattern when ShapePath.strokeStyle is set to ShapePath.DashLine. The pattern must be specified as an even number of positive entries where the entries 1, 3, 5... are the dashes and 2, 4, 6... are the spaces. The pattern is specified in units of the pen's width.
The default value is (4, 2), meaning a dash of 4 * ShapePath.strokeWidth pixels followed by a space of 2 * ShapePath.strokeWidth pixels.
Definition at line 452 of file qquickshape.cpp.
References d.
|
signal |
QColor QQuickShapePath::fillColor | ( | ) | const |
\qmlproperty color QtQuick.Shapes::ShapePath::fillColor
This property holds the fill color.
When set to transparent
, no filling occurs.
The default value is white
.
Definition at line 241 of file qquickshape.cpp.
References d.
|
signal |
QQuickShapeGradient * QQuickShapePath::fillGradient | ( | ) | const |
\qmlproperty ShapeGradient QtQuick.Shapes::ShapePath::fillGradient
This property defines the fill gradient. By default no gradient is enabled and the value is null
. In this case the fill uses a solid color based on the value of ShapePath.fillColor.
When set, ShapePath.fillColor is ignored and filling is done using one of the ShapeGradient subtypes.
Definition at line 483 of file qquickshape.cpp.
References d.
QQuickShapePath::FillRule QQuickShapePath::fillRule | ( | ) | const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::fillRule
This property holds the fill rule. The default value is ShapePath.OddEvenFill
. For an explanation on fill rules, see QPainterPath::setFillRule().
\value ShapePath.OddEvenFill Odd-even fill rule.
\value ShapePath.WindingFill Non-zero winding fill rule.
Definition at line 272 of file qquickshape.cpp.
References d.
|
signal |
QQuickShapePath::JoinStyle QQuickShapePath::joinStyle | ( | ) | const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::joinStyle
This property defines how joins between two connected lines are drawn. The default value is ShapePath.BevelJoin
.
\value ShapePath.MiterJoin The outer edges of the lines are extended to meet at an angle, and this area is filled.
\value ShapePath.BevelJoin The triangular notch between the two lines is filled.
\value ShapePath.RoundJoin A circular arc between the two lines is filled.
Definition at line 306 of file qquickshape.cpp.
References d.
|
signal |
int QQuickShapePath::miterLimit | ( | ) | const |
\qmlproperty int QtQuick.Shapes::ShapePath::miterLimit
When joinStyle is set to ShapePath.MiterJoin
, this property specifies how far the miter join can extend from the join point.
The default value is 2.
Definition at line 332 of file qquickshape.cpp.
References d.
|
signal |
void QQuickShapePath::resetFillGradient | ( | ) |
Definition at line 512 of file qquickshape.cpp.
References setFillGradient().
Definition at line 372 of file qquickshape.cpp.
References capStyleChanged(), d, QQuickShapePathPrivate::DirtyStyle, emit, and shapePathChanged().
Definition at line 427 of file qquickshape.cpp.
References d, dashOffsetChanged(), QQuickShapePathPrivate::DirtyDash, emit, and shapePathChanged().
Definition at line 458 of file qquickshape.cpp.
References d, dashPatternChanged(), QQuickShapePathPrivate::DirtyDash, emit, and shapePathChanged().
Definition at line 247 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyFillColor, emit, fillColorChanged(), and shapePathChanged().
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
void QQuickShapePath::setFillGradient | ( | QQuickShapeGradient * | gradient | ) |
Definition at line 489 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyFillGradient, emit, qmlobject_connect, qmlobject_disconnect, shapePathChanged(), SIGNAL, and SLOT.
Referenced by resetFillGradient().
Definition at line 278 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyFillRule, emit, fillRule, fillRuleChanged(), and shapePathChanged().
Definition at line 312 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyStyle, emit, joinStyleChanged(), and shapePathChanged().
void QQuickShapePath::setMiterLimit | ( | int | limit | ) |
Definition at line 338 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyStyle, emit, miterLimitChanged(), and shapePathChanged().
Definition at line 193 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyStrokeColor, emit, shapePathChanged(), and strokeColorChanged().
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
void QQuickShapePath::setStrokeStyle | ( | StrokeStyle | style | ) |
Definition at line 399 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyDash, emit, shapePathChanged(), and strokeStyleChanged().
Definition at line 220 of file qquickshape.cpp.
References d, QQuickShapePathPrivate::DirtyStrokeWidth, emit, shapePathChanged(), and strokeWidthChanged().
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
|
signal |
Referenced by QQuickShapePath(), setCapStyle(), setDashOffset(), setDashPattern(), setFillColor(), setFillGradient(), setFillRule(), setJoinStyle(), setMiterLimit(), setStrokeColor(), setStrokeStyle(), and setStrokeWidth().
QColor QQuickShapePath::strokeColor | ( | ) | const |
\qmlproperty color QtQuick.Shapes::ShapePath::strokeColor
This property holds the stroking color.
When set to transparent
, no stroking occurs.
The default value is white
.
Definition at line 187 of file qquickshape.cpp.
References d.
|
signal |
QQuickShapePath::StrokeStyle QQuickShapePath::strokeStyle | ( | ) | const |
\qmlproperty enumeration QtQuick.Shapes::ShapePath::strokeStyle
This property defines the style of stroking. The default value is ShapePath.SolidLine.
\value ShapePath.SolidLine A plain line. \value ShapePath.DashLine Dashes separated by a few pixels.
Definition at line 393 of file qquickshape.cpp.
References d.
|
signal |
qreal QQuickShapePath::strokeWidth | ( | ) | const |
\qmlproperty real QtQuick.Shapes::ShapePath::strokeWidth
This property holds the stroke width.
When set to a negative value, no stroking occurs.
The default value is 1.
Definition at line 214 of file qquickshape.cpp.
References d.
|
signal |
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
Referenced by setFillRule().
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.
|
readwrite |
Definition at line 180 of file qquickshape_p.h.