TreeFrogFramework 2.10
Loading...
Searching...
No Matches
tbackgroundprocess.h
Go to the documentation of this file.
1#pragma once
2#include <QProcess>
3#include <TBackgroundProcessHandler>
4#include <TGlobal>
5
6
7class T_CORE_EXPORT TBackgroundProcess : public QProcess {
8 Q_OBJECT
9public:
10 TBackgroundProcess(QObject *parent = nullptr);
11 virtual ~TBackgroundProcess() { }
12
13 void start(const QString &program, const QStringList &arguments, OpenMode mode = ReadWrite, TBackgroundProcessHandler *handler = nullptr);
14 void start(const QString &command, OpenMode mode = ReadWrite, TBackgroundProcessHandler *handler = nullptr);
15 void start(OpenMode mode = ReadWrite, TBackgroundProcessHandler *handler = nullptr);
16 bool autoDelete() const;
17 void setAutoDelete(bool autoDelete);
18
19protected slots:
20 void callStart(const QString &program, const QStringList &arguments, int mode);
21 void handleFinished();
22
23private:
24 void connectToSlots(TBackgroundProcessHandler *handler);
25
26 bool _autoDelete {true};
27
30};
31
The TBackgroundProcessHandler class is used to handle events of a backgound process.
Definition tbackgroundprocesshandler.h:9
The TBackgroundProcess class is used to start external programs in background.
Definition tbackgroundprocess.h:7
virtual ~TBackgroundProcess()
Definition tbackgroundprocess.h:11
#define T_CORE_EXPORT
Definition tdeclexport.h:28
#define T_DISABLE_COPY(Class)
Definition tdeclexport.h:37
#define T_DISABLE_MOVE(Class)
Definition tdeclexport.h:41