6#include <QtCore/qmath.h>
7#include <QtQuick/private/qquickitem_p.h>
8#include <QtQuick/private/qsgadaptationlayer_p.h>
9#include <QtQuickControls2Impl/private/qquickanimatednode_p.h>
10#include <QtQuickTemplates2/private/qquickabstractbutton_p.h>
11#include <QtQuickTemplates2/private/qquickabstractbutton_p_p.h>
69 m_value = m_from + (m_to - m_from) *
p;
72 const qreal dx = (1.0 -
p) * (m_anchor.
x() - m_bounds.
width() / 2);
73 const qreal dy = (1.0 -
p) * (m_anchor.
y() - m_bounds.
height() / 2);
76 m.translate(
qRound((m_bounds.
width() - m_value) / 2 + dx),
120 bool m_active =
false;
142 opacity = 1.0 - opacity;
152 if (m_active != ripple->
isActive()) {
210 if (m_color ==
color)
227 m_clipRadius = radius;
249 if (m_trigger ==
Press)
333 if (!backgroundNode) {
338 backgroundNode->
sync(
this);
348 enterNode->
sync(
this);
358 exitNode->
sync(
this);
369 if (
event->timerId() == m_enterDelay)
375 if (m_enterDelay <= 0)
381 if (m_enterDelay > 0) {
392 if (m_enterDelay > 0) {
405#include "moc_qquickmaterialripple_p.cpp"
407#include "qquickmaterialripple.moc"
The QColor class provides colors based on RGB, HSV or CMYK values.
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.
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 mi...
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QString objectName
the name of this object
virtual void timerEvent(QTimerEvent *event)
This event handler can be reimplemented in a subclass to receive timer events for the object.
Q_WEAK_OVERLOAD void setObjectName(const QString &name)
Sets the object's name to name.
void killTimer(int id)
Kills the timer with timer identifier, id.
void deleteLater()
\threadsafe
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
void setDuration(int duration)
void setRect(const QRectF &)
void setRadius(qreal radius)
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Q_INVOKABLE QPointF mapFromItem(const QQuickItem *item, const QPointF &point) const
Maps the given point in item's coordinate system to the equivalent point within this item's coordinat...
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...
virtual QRectF boundingRect() const
Returns the extents of the item in its own coordinate system: a rectangle from {0,...
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.
QQuickMaterialRippleBackgroundNode(QQuickMaterialRipple *ripple)
void updateCurrentTime(int time) override
void sync(QQuickItem *item) override
void updateCurrentTime(int time) override
void sync(QQuickItem *item) override
QQuickMaterialRippleWaveNode(QQuickMaterialRipple *ripple)
void setPressed(bool pressed)
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 setClipRadius(qreal radius)
void setActive(bool active)
void setAnchor(QQuickItem *anchor)
void itemChange(ItemChange change, const ItemChangeData &data) override
Called when change occurs for this item.
void setColor(const QColor &color)
void setTrigger(Trigger trigger)
void timerEvent(QTimerEvent *event) override
This event handler can be reimplemented in a subclass to receive timer events for the object.
QPointF anchorPoint() const
QQuickMaterialRipple(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 QPointF center() const noexcept
Returns the center point of the rectangle.
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.
int childCount() const
Returns the number of child nodes.
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.
Combined button and popup list for selecting options.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull(qfloat16 f) noexcept
qfloat16 qSqrt(qfloat16 f)
int qRound(qfloat16 d) noexcept
GLfloat GLfloat GLfloat w
[0]
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfloat GLfloat GLfloat GLfloat h
static const int WAVE_OPACITY_DECAY_DURATION
static const qreal WAVE_TOUCH_DOWN_ACCELERATION
static const int RIPPLE_ENTER_DELAY
static const int OPACITY_ENTER_DURATION_FAST
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent