2012-10-02 09:12:39 +02:00
|
|
|
/****************************************************************************
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2012-02-24 10:47:17 +01:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
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:
|
|
|
|
|
explicit QmlProfilerClientManager(QObject *parent = 0);
|
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
|