2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2016-07-14 09:41:04 +02:00
|
|
|
#include "qmlprofilertraceclient.h"
|
|
|
|
|
|
|
|
|
|
#include <qmldebug/qmldebugclient.h>
|
2017-09-27 18:23:53 +02:00
|
|
|
#include <qmldebug/qmldebugconnectionmanager.h>
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2016-07-14 09:41:04 +02:00
|
|
|
#include <QPointer>
|
|
|
|
|
#include <QTimer>
|
2017-06-13 11:43:04 +02:00
|
|
|
#include <QUrl>
|
2013-07-30 18:35:51 +02:00
|
|
|
|
2012-02-24 10:47:17 +01:00
|
|
|
namespace QmlProfiler {
|
2013-08-08 13:28:08 +02:00
|
|
|
class QmlProfilerModelManager;
|
2016-07-14 09:41:04 +02:00
|
|
|
class QmlProfilerStateManager;
|
2013-08-08 13:28:08 +02:00
|
|
|
|
2012-02-24 10:47:17 +01:00
|
|
|
namespace Internal {
|
|
|
|
|
|
2017-09-27 18:23:53 +02:00
|
|
|
class QmlProfilerClientManager : public QmlDebug::QmlDebugConnectionManager
|
2012-02-24 10:47:17 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2018-04-12 10:04:55 +02:00
|
|
|
explicit QmlProfilerClientManager(QObject *parent = nullptr);
|
2016-06-10 11:15:53 +02:00
|
|
|
void setProfilerStateManager(QmlProfilerStateManager *profilerState);
|
2018-01-03 13:40:48 +01:00
|
|
|
void clearEvents();
|
2017-09-27 18:23:53 +02:00
|
|
|
void setModelManager(QmlProfilerModelManager *modelManager);
|
2015-08-28 12:50:46 +02:00
|
|
|
void setFlushInterval(quint32 flushInterval);
|
2017-09-27 18:23:53 +02:00
|
|
|
void clearBufferedData();
|
2016-08-04 17:29:05 +02:00
|
|
|
void stopRecording();
|
|
|
|
|
|
2017-09-27 18:23:53 +02:00
|
|
|
protected:
|
|
|
|
|
void createClients() override;
|
|
|
|
|
void destroyClients() override;
|
|
|
|
|
void logState(const QString &message) override;
|
2012-02-24 10:47:17 +01:00
|
|
|
|
2016-07-14 09:41:04 +02:00
|
|
|
private:
|
2017-09-27 18:23:53 +02:00
|
|
|
QPointer<QmlProfilerTraceClient> m_clientPlugin;
|
2016-07-14 09:41:04 +02:00
|
|
|
QPointer<QmlProfilerStateManager> m_profilerState;
|
|
|
|
|
QPointer<QmlProfilerModelManager> m_modelManager;
|
|
|
|
|
quint32 m_flushInterval = 0;
|
2012-02-24 10:47:17 +01:00
|
|
|
};
|
|
|
|
|
|
2016-04-28 16:02:54 +02:00
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace QmlProfiler
|