Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquick3dparticlesystemlogging_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 GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#ifndef QQUICK3DPARTICLESYSTEMLOGGING_H
7#define QQUICK3DPARTICLESYSTEMLOGGING_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QObject>
21#include <QQmlEngine>
22#include <private/qglobal_p.h>
23
24#include <QtQuick3DParticles/qtquick3dparticlesglobal.h>
25
27
29{
30 Q_OBJECT
31 Q_PROPERTY(int loggingInterval READ loggingInterval WRITE setLoggingInterval NOTIFY loggingIntervalChanged)
32 Q_PROPERTY(int updates READ updates NOTIFY updatesChanged)
33 Q_PROPERTY(int particlesMax READ particlesMax NOTIFY particlesMaxChanged)
34 Q_PROPERTY(int particlesUsed READ particlesUsed NOTIFY particlesUsedChanged)
35 Q_PROPERTY(float time READ time NOTIFY timeChanged)
36 Q_PROPERTY(float timeAverage READ timeAverage NOTIFY timeAverageChanged)
37 Q_PROPERTY(float timeDeviation READ timeDeviation NOTIFY timeDeviationChanged REVISION(6, 3))
38 QML_ANONYMOUS
39 QML_ADDED_IN_VERSION(6, 2)
40
41public:
42 QQuick3DParticleSystemLogging(QObject *parent = nullptr);
43
44 int loggingInterval() const;
45 int updates() const;
46 int particlesMax() const;
47 int particlesUsed() const;
48 float time() const;
49 float timeAverage() const;
50 Q_REVISION(6, 3) float timeDeviation() const;
51
52public Q_SLOTS:
53 void setLoggingInterval(int interval);
54
55Q_SIGNALS:
56 void loggingIntervalChanged();
57 void updatesChanged();
58 void particlesMaxChanged();
59 void particlesUsedChanged();
60 void timeChanged();
61 void timeAverageChanged();
62 Q_REVISION(6, 3) void timeDeviationChanged();
63
64private:
65 void updateTimes(qint64 time);
66 void resetData();
67
68 friend class QQuick3DParticleSystem;
69 int m_loggingInterval = 1000;
70 int m_updates = 0;
71 int m_particlesMax = 0;
72 int m_particlesUsed = 0;
73 float m_time = 0.0f;
74 float m_timeAverage = 0.0f;
75 float m_timeDeviation = 0.0f;
76 QList<float> m_totalTimesList;
77};
78
79QT_END_NAMESPACE
80
81#endif // QQUICK3DPARTICLESYSTEMLOGGING_H
Combined button and popup list for selecting options.