2014-02-15 18:49:35 +05:30
|
|
|
#pragma once
|
|
|
|
|
2014-02-16 15:16:14 +05:30
|
|
|
#include "logic/BaseExternalTool.h"
|
2014-02-15 18:49:35 +05:30
|
|
|
|
2014-02-16 02:56:44 +05:30
|
|
|
class BaseInstance;
|
2014-02-15 18:49:35 +05:30
|
|
|
class SettingsObject;
|
|
|
|
class MinecraftProcess;
|
2014-02-15 22:45:41 +05:30
|
|
|
class QProcess;
|
2014-02-15 18:49:35 +05:30
|
|
|
|
2014-02-16 15:16:14 +05:30
|
|
|
class BaseProfiler : public BaseExternalTool
|
2014-02-15 18:49:35 +05:30
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2014-02-16 02:56:44 +05:30
|
|
|
explicit BaseProfiler(BaseInstance *instance, QObject *parent = 0);
|
2014-02-15 18:49:35 +05:30
|
|
|
|
|
|
|
public
|
|
|
|
slots:
|
|
|
|
void beginProfiling(MinecraftProcess *process);
|
2014-02-16 13:24:52 +05:30
|
|
|
void abortProfiling();
|
2014-02-15 18:49:35 +05:30
|
|
|
|
|
|
|
protected:
|
2014-02-16 13:24:52 +05:30
|
|
|
QProcess *m_profilerProcess;
|
2014-02-15 18:49:35 +05:30
|
|
|
|
|
|
|
virtual void beginProfilingImpl(MinecraftProcess *process) = 0;
|
2014-02-16 13:24:52 +05:30
|
|
|
virtual void abortProfilingImpl();
|
2014-02-15 18:49:35 +05:30
|
|
|
|
|
|
|
signals:
|
|
|
|
void readyToLaunch(const QString &message);
|
2014-02-16 13:24:52 +05:30
|
|
|
void abortLaunch(const QString &message);
|
2014-02-15 18:49:35 +05:30
|
|
|
};
|
|
|
|
|
2014-02-16 15:16:14 +05:30
|
|
|
class BaseProfilerFactory : public BaseExternalToolFactory
|
2014-02-15 18:49:35 +05:30
|
|
|
{
|
|
|
|
public:
|
2014-02-16 15:16:14 +05:30
|
|
|
virtual BaseProfiler *createProfiler(BaseInstance *instance, QObject *parent = 0);
|
2014-02-15 18:49:35 +05:30
|
|
|
};
|