summaryrefslogtreecommitdiffstats
path: root/kdpkg-install/process.h
blob: c2cbe8b7f9a5a416e184eae3cdda113b1b03f3e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef PROCESS_H
#define PROCESS_H

#include <kprocess.h>
#include <iostream>
#include <fstream>



class Process;



class Process : public QObject {
	Q_OBJECT

public:
	Process();
	~Process();

	QString getBuffer();
	int exitStatus();
	bool normalExit();
	void setCommand(QString command);
	void start(bool block=true);

protected:
	KProcess* _process;
	QString _buffer;

protected slots:
	void slotProcessOutput(KProcess* process, char* buffer, int buflen);
};



#endif