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
qqmlabstractprofileradapter_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 QQMLABSTRACTPROFILERADAPTER_P_H
5#define QQMLABSTRACTPROFILERADAPTER_P_H
6
7#include <private/qtqmlglobal_p.h>
8#include <private/qqmlprofilerdefinitions_p.h>
9
10#include <QtCore/QObject>
11#include <QtCore/QElapsedTimer>
12
13//
14// W A R N I N G
15// -------------
16//
17// This file is not part of the Qt API. It exists purely as an
18// implementation detail. This header file may change from version to
19// version without notice, or even be removed.
20//
21// We mean it.
22//
23
25
27
29class Q_QML_EXPORT QQmlAbstractProfilerAdapter : public QObject, public QQmlProfilerDefinitions {
31
32public:
33 static const int s_numMessagesPerBatch = 1000;
34
36 QObject(parent), service(nullptr), waiting(true), featuresEnabled(0) {}
38 void setService(QQmlProfilerService *new_service) { service = new_service; }
39
40 virtual qint64 sendMessages(qint64 until, QList<QByteArray> &messages) = 0;
41
42 void startProfiling(quint64 features);
43
44 void stopProfiling();
45
46 void reportData() { Q_EMIT dataRequested(); }
47
48 void stopWaiting() { waiting = false; }
49 void startWaiting() { waiting = true; }
50
51 bool isRunning() const { return featuresEnabled != 0; }
52 quint64 features() const { return featuresEnabled; }
53
54 void synchronize(const QElapsedTimer &t) { Q_EMIT referenceTimeKnown(t); }
55
57 void profilingEnabled(quint64 features);
59
62
65
66protected:
68
69private:
70 bool waiting;
71 quint64 featuresEnabled;
72};
73
75{
77public:
79};
80
81#define QQmlAbstractProfilerAdapterFactory_iid "org.qt-project.Qt.QQmlAbstractProfilerAdapterFactory"
82
84
85#endif // QQMLABSTRACTPROFILERADAPTER_P_H
\inmodule QtCore
\inmodule QtCore
Definition qobject.h:103
virtual QQmlAbstractProfilerAdapter * create(const QString &key)=0
void setService(QQmlProfilerService *new_service)
void profilingEnabled(quint64 features)
QQmlAbstractProfilerAdapter(QObject *parent=nullptr)
void profilingEnabledWhileWaiting(quint64 features)
virtual qint64 sendMessages(qint64 until, QList< QByteArray > &messages)=0
void referenceTimeKnown(const QElapsedTimer &timer)
void synchronize(const QElapsedTimer &t)
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
Combined button and popup list for selecting options.
GLuint64 key
GLdouble GLdouble t
Definition qopenglext.h:243
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
#define Q_EMIT
#define Q_SIGNALS
unsigned long long quint64
Definition qtypes.h:61
long long qint64
Definition qtypes.h:60
QObject::connect nullptr
QTimer * timer
[3]