6#include <QtCore/qmath.h>
7#include <QtCore/qeasingcurve.h>
8#include <QtQuick/private/qquickitem_p.h>
9#include <QtQuick/private/qsgadaptationlayer_p.h>
10#include <QtQuick/qsgrectanglenode.h>
11#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
44 bool m_indeterminate =
false;
55 m_borderPhases[0] = Phase( 500, -50, 0);
56 m_borderPhases[1] = Phase(1500, 0, 0);
57 m_borderPhases[2] = Phase(1000, 0, 100);
58 m_borderPhases[3] = Phase( 917, 100, 100);
83 qreal dx = from + (to - from) * progress;
110 for (phaseIndex = 0; phaseIndex <
QupbPhaseCount - 1; ++phaseIndex) {
113 remain -= m_borderPhases[phaseIndex].duration;
114 elapsed += m_borderPhases[phaseIndex].duration;
117 const Phase &phase = m_borderPhases[phaseIndex];
120 qreal progress =
pos / phase.duration;
121 qreal dx = phase.from + (phase.to - phase.from) * progress;
133 for (phaseIndex = 0; phaseIndex <
QupbPhaseCount - 1; ++phaseIndex) {
136 remain -= m_ellipsePhases[phaseIndex].duration;
137 elapsed += m_ellipsePhases[phaseIndex].duration;
140 const Phase &phase = m_ellipsePhases[phaseIndex];
146 qreal dx = from + (to - from) * progress;
175 if (!m_indeterminate)
180 geometryNode =
item->
window()->createRectangleNode();
186 if (!m_indeterminate) {
248 if (m_color ==
color)
271 return m_indeterminate;
307#include "moc_qquickuniversalprogressbar_p.cpp"
The QColor class provides colors based on RGB, HSV or CMYK values.
void addCubicBezierSegment(const QPointF &c1, const QPointF &c2, const QPointF &endPoint)
Adds a segment of a cubic bezier spline to define a custom easing curve.
qreal valueForProgress(qreal progress) const
Return the effective progress for the easing curve at progress.
QGraphicsWidget * window() const
virtual QRectF boundingRect() const =0
This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be ...
The QMatrix4x4 class represents a 4x4 transformation matrix in 3D space.
void translate(const QVector3D &vector)
Multiplies this matrix by another that translates coordinates by the components of vector.
\inmodule QtCore\reentrant
void setLoopCount(int count)
void setDuration(int duration)
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
void setFlag(Flag flag, bool enabled=true)
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disable...
qreal width
This property holds the width of this item.
virtual void itemChange(ItemChange, const ItemChangeData &)
Called when change occurs for this item.
qreal height
This property holds the height of this item.
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
void update()
Schedules a call to updatePaintNode() for this item.
QQuickUniversalProgressBarNode(QQuickUniversalProgressBar *item)
void updateCurrentTime(int time) override
void sync(QQuickItem *item) override
void setColor(const QColor &color)
QSGNode * updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override
Called on the render thread when it is time to sync the state of the item with the scene graph.
void itemChange(ItemChange change, const ItemChangeData &data) override
Called when change occurs for this item.
bool isIndeterminate() const
void setProgress(qreal progress)
void setIndeterminate(bool indeterminate)
QQuickUniversalProgressBar(QQuickItem *parent=nullptr)
\inmodule QtCore\reentrant
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr void setWidth(qreal w) noexcept
Sets the width of the rectangle to the given finite width.
constexpr void setHeight(qreal h) noexcept
Sets the height of the rectangle to the given finite height.
constexpr void moveTop(qreal pos) noexcept
Moves the rectangle vertically, leaving the rectangle's top line at the given finite y coordinate.
virtual void setRadius(qreal radius)=0
virtual void setAntialiasing(bool antialiasing)
virtual void setRect(const QRectF &rect)=0
virtual void setColor(const QColor &color)=0
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
QSGNode * nextSibling() const
Returns the node after this in the parent's list of children.
void appendChildNode(QSGNode *node)
Appends node to this node's list of children.
QSGNode * firstChild() const
Returns the first child of this node.
NodeType type() const
Returns the type of this node.
The QSGOpacityNode class is used to change opacity of nodes.
void setOpacity(qreal opacity)
Sets the opacity of this node to opacity.
The QSGRectangleNode class is a convenience class for drawing solid filled rectangles using scenegrap...
virtual QRectF rect() const =0
Returns the rectangle that this rect node covers.
virtual void setRect(const QRectF &rect)=0
Sets the rectangle of this rect node to rect.
virtual void setColor(const QColor &color)=0
Sets the color of this rectangle to color.
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
static const qreal ContainerAnimationStartPosition
static const int QupbTotalDuration
static const qreal EllipseAnimationEndPosition
static const qreal ContainerAnimationEndPosition
static const qreal EllipseOffset
static const int VisibleDuration
static const int EllipseCount
static QT_BEGIN_NAMESPACE const int QupbPhaseCount
static const int QupbInterval
static const qreal EllipseAnimationWellPosition
static const qreal EllipseDiameter
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
static double elapsed(qint64 after, qint64 before)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent