2014-02-15 18:49:35 +05:30
|
|
|
#pragma once
|
|
|
|
|
2014-02-16 17:22:35 +05:30
|
|
|
#include "BaseExternalTool.h"
|
2019-04-08 03:29:04 +05:30
|
|
|
#include "QObjectPtr.h"
|
2014-02-15 18:49:35 +05:30
|
|
|
|
2015-09-05 22:16:57 +05:30
|
|
|
#include "multimc_logic_export.h"
|
|
|
|
|
2014-02-16 02:56:44 +05:30
|
|
|
class BaseInstance;
|
2014-02-15 18:49:35 +05:30
|
|
|
class SettingsObject;
|
2015-07-10 04:41:06 +05:30
|
|
|
class LaunchTask;
|
2014-02-15 22:45:41 +05:30
|
|
|
class QProcess;
|
2014-02-15 18:49:35 +05:30
|
|
|
|
2015-09-05 22:16:57 +05:30
|
|
|
class MULTIMC_LOGIC_EXPORT BaseProfiler : public BaseExternalTool
|
2014-02-15 18:49:35 +05:30
|
|
|
{
|
2018-07-15 18:21:05 +05:30
|
|
|
Q_OBJECT
|
2014-02-15 18:49:35 +05:30
|
|
|
public:
|
2018-07-15 18:21:05 +05:30
|
|
|
explicit BaseProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject *parent = 0);
|
2014-02-15 18:49:35 +05:30
|
|
|
|
|
|
|
public
|
|
|
|
slots:
|
2019-04-08 03:29:04 +05:30
|
|
|
void beginProfiling(shared_qobject_ptr<LaunchTask> process);
|
2018-07-15 18:21:05 +05:30
|
|
|
void abortProfiling();
|
2014-02-15 18:49:35 +05:30
|
|
|
|
|
|
|
protected:
|
2018-07-15 18:21:05 +05:30
|
|
|
QProcess *m_profilerProcess;
|
2014-02-15 18:49:35 +05:30
|
|
|
|
2019-04-08 03:29:04 +05:30
|
|
|
virtual void beginProfilingImpl(shared_qobject_ptr<LaunchTask> process) = 0;
|
2018-07-15 18:21:05 +05:30
|
|
|
virtual void abortProfilingImpl();
|
2014-02-15 18:49:35 +05:30
|
|
|
|
|
|
|
signals:
|
2018-07-15 18:21:05 +05:30
|
|
|
void readyToLaunch(const QString &message);
|
|
|
|
void abortLaunch(const QString &message);
|
2014-02-15 18:49:35 +05:30
|
|
|
};
|
|
|
|
|
2015-09-05 22:16:57 +05:30
|
|
|
class MULTIMC_LOGIC_EXPORT BaseProfilerFactory : public BaseExternalToolFactory
|
2014-02-15 18:49:35 +05:30
|
|
|
{
|
|
|
|
public:
|
2018-07-15 18:21:05 +05:30
|
|
|
virtual BaseProfiler *createProfiler(InstancePtr instance, QObject *parent = 0);
|
2014-02-15 18:49:35 +05:30
|
|
|
};
|