mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-18 04:54:38 +03:00
upload code
This commit is contained in:
37
sys/ExternalProcess.hpp
Normal file
37
sys/ExternalProcess.hpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#pragma once
|
||||
|
||||
#include "main/NekoRay.hpp"
|
||||
|
||||
#include <QProcess>
|
||||
|
||||
namespace NekoRay::sys {
|
||||
class ExternalProcess : public QProcess {
|
||||
public:
|
||||
QString tag;
|
||||
QString program;
|
||||
QStringList arguments;
|
||||
QStringList env;
|
||||
|
||||
bool show_log = true;
|
||||
QList<ExternalProcess *> *running_list;
|
||||
|
||||
ExternalProcess(const QString &tag,
|
||||
const QString &program,
|
||||
const QStringList &arguments,
|
||||
const QStringList &env);
|
||||
|
||||
// start & kill is one time
|
||||
|
||||
void Start();
|
||||
|
||||
void Kill();
|
||||
|
||||
private:
|
||||
bool started = false;
|
||||
bool killed = false;
|
||||
bool crashed = false;
|
||||
};
|
||||
|
||||
// start & kill change this list
|
||||
inline QList<ExternalProcess *> running_ext;
|
||||
}
|
||||
Reference in New Issue
Block a user