2014-02-15 13:19:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
2014-02-16 11:52:35 +00:00
|
|
|
#include "BaseExternalTool.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-05-11 21:21:37 +01:00
|
|
|
class BaseLauncher;
|
2014-02-15 17:15:41 +00:00
|
|
|
class QProcess;
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2014-02-16 09:46:14 +00:00
|
|
|
class BaseProfiler : public BaseExternalTool
|
2014-02-15 13:19:35 +00:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2015-02-09 00:51:14 +00:00
|
|
|
explicit BaseProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject *parent = 0);
|
2014-02-15 13:19:35 +00:00
|
|
|
|
|
|
|
public
|
|
|
|
slots:
|
2015-07-04 19:02:43 +01:00
|
|
|
void beginProfiling(std::shared_ptr<BaseLauncher> process);
|
2014-02-16 07:54:52 +00:00
|
|
|
void abortProfiling();
|
2014-02-15 13:19:35 +00:00
|
|
|
|
|
|
|
protected:
|
2014-02-16 07:54:52 +00:00
|
|
|
QProcess *m_profilerProcess;
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2015-07-04 19:02:43 +01:00
|
|
|
virtual void beginProfilingImpl(std::shared_ptr<BaseLauncher> process) = 0;
|
2014-02-16 07:54:52 +00:00
|
|
|
virtual void abortProfilingImpl();
|
2014-02-15 13:19:35 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void readyToLaunch(const QString &message);
|
2014-02-16 07:54:52 +00:00
|
|
|
void abortLaunch(const QString &message);
|
2014-02-15 13:19:35 +00:00
|
|
|
};
|
|
|
|
|
2014-02-16 09:46:14 +00:00
|
|
|
class BaseProfilerFactory : public BaseExternalToolFactory
|
2014-02-15 13:19:35 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-03-30 19:11:05 +01:00
|
|
|
virtual BaseProfiler *createProfiler(InstancePtr instance, QObject *parent = 0);
|
2014-02-15 13:19:35 +00:00
|
|
|
};
|