2014-02-15 13:19:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
2014-02-16 11:52:35 +00:00
|
|
|
#include "BaseExternalTool.h"
|
2019-04-07 22:59:04 +01:00
|
|
|
#include "QObjectPtr.h"
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2014-02-15 21:26:44 +00:00
|
|
|
class BaseInstance;
|
2014-02-15 13:19:35 +00:00
|
|
|
class SettingsObject;
|
2015-07-10 00:11:06 +01:00
|
|
|
class LaunchTask;
|
2014-02-15 17:15:41 +00:00
|
|
|
class QProcess;
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
class BaseProfiler : public BaseExternalTool {
|
2014-02-15 13:19:35 +00:00
|
|
|
Q_OBJECT
|
2023-08-02 17:35:35 +01:00
|
|
|
public:
|
|
|
|
explicit BaseProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject* parent = 0);
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
public slots:
|
2019-04-07 22:59:04 +01:00
|
|
|
void beginProfiling(shared_qobject_ptr<LaunchTask> process);
|
2014-02-16 07:54:52 +00:00
|
|
|
void abortProfiling();
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
protected:
|
|
|
|
QProcess* m_profilerProcess;
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2019-04-07 22:59:04 +01:00
|
|
|
virtual void beginProfilingImpl(shared_qobject_ptr<LaunchTask> process) = 0;
|
2014-02-16 07:54:52 +00:00
|
|
|
virtual void abortProfilingImpl();
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
signals:
|
|
|
|
void readyToLaunch(const QString& message);
|
|
|
|
void abortLaunch(const QString& message);
|
2014-02-15 13:19:35 +00:00
|
|
|
};
|
|
|
|
|
2023-08-02 17:35:35 +01:00
|
|
|
class BaseProfilerFactory : public BaseExternalToolFactory {
|
|
|
|
public:
|
|
|
|
virtual BaseProfiler* createProfiler(InstancePtr instance, QObject* parent = 0);
|
2014-02-15 13:19:35 +00:00
|
|
|
};
|