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
qquickgravity_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 GRAVITYAFFECTOR_H
5
#define GRAVITYAFFECTOR_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
//
17
#include "
qquickparticleaffector_p.h
"
18
#include <QtQml/qqml.h>
19
20
QT_BEGIN_NAMESPACE
21
22
class
Q_QUICKPARTICLES_EXPORT
QQuickGravityAffector
:
public
QQuickParticleAffector
23
{
24
Q_OBJECT
25
Q_PROPERTY
(
qreal
magnitude READ magnitude WRITE setMagnitude NOTIFY magnitudeChanged)
26
Q_PROPERTY
(
qreal
acceleration READ magnitude WRITE setAcceleration NOTIFY magnitudeChanged)
27
Q_PROPERTY
(
qreal
angle
READ
angle
WRITE setAngle NOTIFY angleChanged)
28
QML_NAMED_ELEMENT
(Gravity)
29
QML_ADDED_IN_VERSION
(2, 0)
30
public:
31
explicit
QQuickGravityAffector
(
QQuickItem
*parent =
nullptr
);
32
qreal
magnitude() const;
33
qreal
angle
() const;
34
35
protected:
36
bool
affectParticle(
QQuickParticleData
*
d
,
qreal
dt) override;
37
38
Q_SIGNALS
:
39
void
magnitudeChanged(
qreal
arg
);
40
void
angleChanged(
qreal
arg
);
41
42
public
Q_SLOTS
:
43
void
setMagnitude(
qreal
arg
);
44
void
setAcceleration(
qreal
arg
);
45
void
setAngle(
qreal
arg
);
46
47
private
:
48
qreal
m_magnitude;
49
qreal
m_angle;
50
51
bool
m_needRecalc;
52
qreal
m_dx;
53
qreal
m_dy;
54
};
55
56
QT_END_NAMESPACE
57
#endif
// GRAVITYAFFECTOR_H
QQuickGravityAffector
Definition
qquickgravity_p.h:23
QQuickItem
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition
qquickitem.h:63
QQuickParticleAffector
Definition
qquickparticleaffector_p.h:27
QQuickParticleData
Definition
qquickparticlesystem_p.h:214
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
QT_END_NAMESPACE
Definition
qsharedpointer.cpp:1590
angle
GLfloat angle
Definition
qopengles2ext.h:3231
QML_NAMED_ELEMENT
#define QML_NAMED_ELEMENT(NAME)
Definition
qqmlintegration.h:60
QML_ADDED_IN_VERSION
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
Definition
qqmlintegration.h:100
qquickparticleaffector_p.h
arg
SSL_CTX int void * arg
Definition
qsslsocket_openssl_symbols.cpp:402
Q_PROPERTY
#define Q_PROPERTY(...)
Definition
qtmetamacros.h:56
Q_OBJECT
#define Q_OBJECT
Definition
qtmetamacros.h:119
Q_SLOTS
#define Q_SLOTS
Definition
qtmetamacros.h:44
Q_SIGNALS
#define Q_SIGNALS
Definition
qtmetamacros.h:45
qreal
double qreal
Definition
qtypes.h:187
explicit
#define explicit
Definition
qxcbconnection.cpp:33
d
double d
Definition
src_corelib_text_qlocale.cpp:9
private
#define private
Definition
vsp2hardwarelayerintegration.cpp:7
qtdeclarative
src
particles
qquickgravity_p.h
Generated by
1.10.0