1 #pragma once 2 3 #include "BaseExternalTool.h" 4 #include "QObjectPtr.h" 5 6 #include "multimc_logic_export.h" 7 8 class BaseInstance; 9 class SettingsObject; 10 class LaunchTask; 11 class QProcess; 12 13 class MULTIMC_LOGIC_EXPORT BaseProfiler : public BaseExternalTool 14 { 15 Q_OBJECT 16 public: 17 explicit BaseProfiler(SettingsObjectPtr settings, InstancePtr instance, QObject *parent = 0); 18 19 public 20 slots: 21 void beginProfiling(shared_qobject_ptr<LaunchTask> process); 22 void abortProfiling(); 23 24 protected: 25 QProcess *m_profilerProcess; 26 27 virtual void beginProfilingImpl(shared_qobject_ptr<LaunchTask> process) = 0; 28 virtual void abortProfilingImpl(); 29 30 signals: 31 void readyToLaunch(const QString &message); 32 void abortLaunch(const QString &message); 33 }; 34 35 class MULTIMC_LOGIC_EXPORT BaseProfilerFactory : public BaseExternalToolFactory 36 { 37 public: 38 virtual BaseProfiler *createProfiler(InstancePtr instance, QObject *parent = 0); 39 }; 40