~ubuntu-branches/debian/squeeze/kdesvn/squeeze

« back to all changes in this revision

Viewing changes to src/svnfrontend/fronthelpers/watchedprocess.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2009-02-19 16:20:26 UTC
  • mfrom: (1.3.1 upstream) (8.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090219162026-p0nvkburr0ta23e6
Tags: 1.2.4-1
* New upstream release.
  - Reduced debug output on stderr. Closes: #431616

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *   Copyright (C) 2008 by Rajko Albrecht                                  *
 
3
 *   ral@alwins-world.de                                                   *
 
4
 *                                                                         *
 
5
 *   This program is free software; you can redistribute it and/or modify  *
 
6
 *   it under the terms of the GNU General Public License as published by  *
 
7
 *   the Free Software Foundation; either version 2 of the License, or     *
 
8
 *   (at your option) any later version.                                   *
 
9
 *                                                                         *
 
10
 *   This program is distributed in the hope that it will be useful,       *
 
11
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 
12
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 
13
 *   GNU General Public License for more details.                          *
 
14
 *                                                                         *
 
15
 *   You should have received a copy of the GNU General Public License     *
 
16
 *   along with this program; if not, write to the                         *
 
17
 *   Free Software Foundation, Inc.,                                       *
 
18
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 
19
 ***************************************************************************/
 
20
#include <kprocess.h>
 
21
 
 
22
#ifndef _WATCHEDPROCESS_H
 
23
#define _WATCHEDPROCESS_H
 
24
 
 
25
class ProcessData;
 
26
 
 
27
class WatchedProcess:public KProcess
 
28
{
 
29
    Q_OBJECT
 
30
public:
 
31
    WatchedProcess(QObject*parent=0);
 
32
    virtual ~WatchedProcess();
 
33
 
 
34
    void appendTempFile(const QString&);
 
35
    void appendTempDir(const QString&);
 
36
    void setAutoDelete(bool);
 
37
    bool autoDelete()const;
 
38
 
 
39
private:
 
40
    ProcessData*m_Data;
 
41
 
 
42
protected Q_SLOTS:
 
43
    void slotError(QProcess::ProcessError);
 
44
    void slotFinished(int, QProcess::ExitStatus);
 
45
    void slotReadyReadStandardError();
 
46
    void slotReadyReadStandardOutput();
 
47
    void slotStarted();
 
48
    void slotStateChanged(QProcess::ProcessState);
 
49
 
 
50
Q_SIGNALS:
 
51
    void dataStderrRead(const QByteArray&,WatchedProcess*);
 
52
    void dataStdoutRead(const QByteArray&,WatchedProcess*);
 
53
 
 
54
    void error(QProcess::ProcessError,WatchedProcess*);
 
55
    void finished(int,QProcess::ExitStatus,WatchedProcess*);
 
56
    void started(WatchedProcess*);
 
57
    void stateChanged(QProcess::ProcessState newState,WatchedProcess*);
 
58
};
 
59
 
 
60
#endif