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
|
|
|
|
2015-09-05 17:46:57 +01:00
|
|
|
#include "multimc_logic_export.h"
|
|
|
|
|
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
|
|
|
|
2015-09-05 17:46:57 +01:00
|
|
|
class MULTIMC_LOGIC_EXPORT BaseProfiler : public BaseExternalTool
|
2014-02-15 13:19:35 +00:00
|
|
|
{
|
2018-07-15 13:51:05 +01:00
|
|
|
Q_OBJECT
|
2014-02-15 13:19:35 +00:00
|
|
|
public:
|
2018-07-15 13:51:05 +01:00
|
|
|
explicit BaseProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject *parent = 0);
|
2014-02-15 13:19:35 +00:00
|
|
|
|
|
|
|
public
|
|
|
|
slots:
|
2018-07-15 13:51:05 +01:00
|
|
|
void beginProfiling(std::shared_ptr<LaunchTask> process);
|
|
|
|
void abortProfiling();
|
2014-02-15 13:19:35 +00:00
|
|
|
|
|
|
|
protected:
|
2018-07-15 13:51:05 +01:00
|
|
|
QProcess *m_profilerProcess;
|
2014-02-15 13:19:35 +00:00
|
|
|
|
2018-07-15 13:51:05 +01:00
|
|
|
virtual void beginProfilingImpl(std::shared_ptr<LaunchTask> process) = 0;
|
|
|
|
virtual void abortProfilingImpl();
|
2014-02-15 13:19:35 +00:00
|
|
|
|
|
|
|
signals:
|
2018-07-15 13:51:05 +01:00
|
|
|
void readyToLaunch(const QString &message);
|
|
|
|
void abortLaunch(const QString &message);
|
2014-02-15 13:19:35 +00:00
|
|
|
};
|
|
|
|
|
2015-09-05 17:46:57 +01:00
|
|
|
class MULTIMC_LOGIC_EXPORT BaseProfilerFactory : public BaseExternalToolFactory
|
2014-02-15 13:19:35 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-07-15 13:51:05 +01:00
|
|
|
virtual BaseProfiler *createProfiler(InstancePtr instance, QObject *parent = 0);
|
2014-02-15 13:19:35 +00:00
|
|
|
};
|