Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquickmaterialripple_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKMATERIALRIPPLE_P_H
6
#
define
QQUICKMATERIALRIPPLE_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtQuick
/
qquickitem
.
h
>
20
#
include
<
QtGui
/
qcolor
.
h
>
21
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
22
23
QT_BEGIN_NAMESPACE
24
25
class
QQuickMaterialRipple :
public
QQuickItem
26
{
27
Q_OBJECT
28
Q_PROPERTY(QColor color READ color WRITE setColor FINAL)
29
Q_PROPERTY(qreal clipRadius READ clipRadius WRITE setClipRadius FINAL)
30
Q_PROPERTY(
bool
pressed READ isPressed WRITE setPressed FINAL)
31
Q_PROPERTY(
bool
active READ isActive WRITE setActive FINAL)
32
Q_PROPERTY(QQuickItem *anchor READ anchor WRITE setAnchor FINAL)
33
Q_PROPERTY(Trigger trigger READ trigger WRITE setTrigger FINAL)
34
QML_NAMED_ELEMENT(Ripple)
35
QML_ADDED_IN_VERSION(2, 0)
36
37
public
:
38
QQuickMaterialRipple(QQuickItem *parent =
nullptr
);
39
40
QColor color()
const
;
41
void
setColor(
const
QColor &color);
42
43
qreal clipRadius()
const
;
44
void
setClipRadius(qreal radius);
45
46
bool
isActive()
const
;
47
void
setActive(
bool
active);
48
49
bool
isPressed()
const
;
50
void
setPressed(
bool
pressed);
51
52
enum
Trigger { Press, Release };
53
Q_ENUM (Trigger)
54
55
Trigger trigger()
const
;
56
void
setTrigger(Trigger trigger);
57
58
QPointF anchorPoint()
const
;
59
60
QQuickItem *anchor()
const
;
61
void
setAnchor(QQuickItem *anchor);
62
63
qreal diameter()
const
;
64
65
protected
:
66
void
itemChange(ItemChange change,
const
ItemChangeData &data) override;
67
QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
68
void
timerEvent(QTimerEvent *event) override;
69
70
void
prepareWave();
71
void
enterWave();
72
void
exitWave();
73
74
private
:
75
bool
m_active =
false
;
76
bool
m_pressed =
false
;
77
int
m_waves = 0;
78
int
m_enterDelay = 0;
79
Trigger m_trigger = Press;
80
qreal m_clipRadius = 0.0;
81
QColor m_color;
82
QQuickItem *m_anchor =
nullptr
;
83
};
84
85
QT_END_NAMESPACE
86
87
#
endif
// QQUICKMATERIALRIPPLE_P_H
QQuickMaterialRippleBackgroundNode
Definition
qquickmaterialripple.cpp:147
QQuickMaterialRippleBackgroundNode::updateCurrentTime
void updateCurrentTime(int time) override
Definition
qquickmaterialripple.cpp:195
QQuickMaterialRippleBackgroundNode::sync
void sync(QQuickItem *item) override
Definition
qquickmaterialripple.cpp:206
QQuickMaterialRippleWaveNode
Definition
qquickmaterialripple.cpp:24
QQuickMaterialRippleWaveNode::updateCurrentTime
void updateCurrentTime(int time) override
Definition
qquickmaterialripple.cpp:88
QQuickMaterialRippleWaveNode::sync
void sync(QQuickItem *item) override
Definition
qquickmaterialripple.cpp:100
QQuickMaterialRippleWaveNode::exit
void exit()
Definition
qquickmaterialripple.cpp:79
QQuickMaterialRippleWaveNode::QQuickMaterialRippleWaveNode
QQuickMaterialRippleWaveNode(QQuickMaterialRipple *ripple)
Definition
qquickmaterialripple.cpp:51
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
WAVE_OPACITY_DECAY_DURATION
static const int WAVE_OPACITY_DECAY_DURATION
Definition
qquickmaterialripple.cpp:20
RIPPLE_ENTER_DELAY
static const int RIPPLE_ENTER_DELAY
Definition
qquickmaterialripple.cpp:18
OPACITY_ENTER_DURATION_FAST
static const int OPACITY_ENTER_DURATION_FAST
Definition
qquickmaterialripple.cpp:19
WavePhase
WavePhase
Definition
qquickmaterialripple.cpp:16
WaveEnter
@ WaveEnter
Definition
qquickmaterialripple.cpp:16
WaveExit
@ WaveExit
Definition
qquickmaterialripple.cpp:16
WAVE_TOUCH_DOWN_ACCELERATION
static const qreal WAVE_TOUCH_DOWN_ACCELERATION
Definition
qquickmaterialripple.cpp:21
qtdeclarative
src
quickcontrols
material
impl
qquickmaterialripple_p.h
Generated on
for Qt by
1.18.0