Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquickfriction_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#ifndef FRICTIONAFFECTOR_H
5#define FRICTIONAFFECTOR_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
18
20
21class Q_QUICKPARTICLES_EXPORT QQuickFrictionAffector : public QQuickParticleAffector
22{
24 Q_PROPERTY(qreal factor READ factor WRITE setFactor NOTIFY factorChanged)
25 Q_PROPERTY(qreal threshold READ threshold WRITE setThreshold NOTIFY thresholdChanged)
26 QML_NAMED_ELEMENT(Friction)
28public:
30
31 qreal factor() const
32 {
33 return m_factor;
34 }
35
37 {
38 return m_threshold;
39 }
40
41protected:
42 bool affectParticle(QQuickParticleData *d, qreal dt) override;
43
45
48
49public Q_SLOTS:
50
52 {
53 if (m_factor != arg) {
54 m_factor = arg;
55 Q_EMIT factorChanged(arg);
56 }
57 }
58
60 {
61 if (m_threshold != arg) {
62 m_threshold = arg;
63 Q_EMIT thresholdChanged(arg);
64 }
65 }
66
67private:
68 qreal m_factor;
69 qreal m_threshold;
70};
71
73#endif // FRICTIONAFFECTOR_H
void setThreshold(qreal arg)
void factorChanged(qreal arg)
void setFactor(qreal arg)
void thresholdChanged(qreal arg)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
SSL_CTX int void * arg
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_EMIT
#define Q_SLOTS
#define Q_SIGNALS
double qreal
Definition qtypes.h:187
#define explicit