2014-02-15 13:19:35 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
class OneSixInstance;
|
|
|
|
class SettingsObject;
|
|
|
|
class MinecraftProcess;
|
2014-02-15 17:15:41 +00:00
|
|
|
class QProcess;
|
2014-02-15 13:19:35 +00:00
|
|
|
|
|
|
|
class BaseProfiler : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit BaseProfiler(OneSixInstance *instance, QObject *parent = 0);
|
|
|
|
virtual ~BaseProfiler();
|
|
|
|
|
|
|
|
public
|
|
|
|
slots:
|
|
|
|
void beginProfiling(MinecraftProcess *process);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
OneSixInstance *m_instance;
|
|
|
|
|
|
|
|
virtual void beginProfilingImpl(MinecraftProcess *process) = 0;
|
|
|
|
|
2014-02-15 17:15:41 +00:00
|
|
|
qint64 pid(QProcess *process);
|
|
|
|
|
2014-02-15 13:19:35 +00:00
|
|
|
signals:
|
|
|
|
void readyToLaunch(const QString &message);
|
|
|
|
};
|
|
|
|
|
|
|
|
class BaseProfilerFactory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~BaseProfilerFactory();
|
|
|
|
|
|
|
|
virtual void registerSettings(SettingsObject *settings) = 0;
|
|
|
|
|
|
|
|
virtual BaseProfiler *createProfiler(OneSixInstance *instance, QObject *parent = 0) = 0;
|
|
|
|
|
|
|
|
virtual bool check(const QString &path, QString *error) = 0;
|
|
|
|
};
|