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