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