TreeFrogFramework 2.10
Loading...
Searching...
No Matches
tbackgroundprocesshandler.h
Go to the documentation of this file.
1#pragma once
2#include <QProcess>
3#include <TDatabaseContext>
4#include <TGlobal>
5
7
8
10 Q_OBJECT
11public:
12 TBackgroundProcessHandler(QObject *parent = nullptr);
14
15 bool autoDelete() const;
16 void setAutoDelete(bool autoDelete);
17 TBackgroundProcess *backgroundProcess() const { return _process; }
18
19protected slots:
20 virtual void handleFinished(int exitCode, QProcess::ExitStatus exitStatus) = 0;
23 virtual void handleStarted() { }
24 virtual void handleStateChanged(QProcess::ProcessState) { }
25 virtual void handleErrorOccurred(QProcess::ProcessError) { }
26 void deleteAutoDeleteHandler();
27
28private:
29 TBackgroundProcess *_process {nullptr};
30 bool _autoDelete {true};
31
32 friend class TBackgroundProcess;
35};
36
The TBackgroundProcessHandler class is used to handle events of a backgound process.
Definition tbackgroundprocesshandler.h:9
virtual void handleStarted()
Definition tbackgroundprocesshandler.h:23
virtual void handleReadyReadStandardError()
Definition tbackgroundprocesshandler.h:21
virtual ~TBackgroundProcessHandler()
Definition tbackgroundprocesshandler.h:13
virtual void handleErrorOccurred(QProcess::ProcessError)
Definition tbackgroundprocesshandler.h:25
TBackgroundProcess * backgroundProcess() const
Definition tbackgroundprocesshandler.h:17
virtual void handleStateChanged(QProcess::ProcessState)
Definition tbackgroundprocesshandler.h:24
virtual void handleReadyReadStandardOutput()
Definition tbackgroundprocesshandler.h:22
virtual void handleFinished(int exitCode, QProcess::ExitStatus exitStatus)=0
The TBackgroundProcess class is used to start external programs in background.
Definition tbackgroundprocess.h:7
The TDatabaseContext class is the base class of contexts for database access.
Definition tdatabasecontext.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