~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to vcs/cvsservice/cvsprocesswidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright (C) 2003 by KDevelop Authors                                *
3
 
 *   www.kdevelop.org                                                      *
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
 
 ***************************************************************************/
11
 
 
12
 
#ifndef _CVSPROCESSWIDGET_H_
13
 
#define _CVSPROCESSWIDGET_H_
14
 
 
15
 
#include <qtextedit.h>
16
 
#include <qstringlist.h>
17
 
 
18
 
#include "cvsservicedcopIface.h"
19
 
#include "bufferedstringreader.h"
20
 
 
21
 
class CvsServicePart;
22
 
class DCOPRef;
23
 
class CvsJob_stub;
24
 
class CvsService_stub;
25
 
class QStyleSheetItem;
26
 
 
27
 
class CvsProcessWidget : public QTextEdit, virtual public CVSServiceDCOPIface
28
 
{
29
 
    Q_OBJECT
30
 
public:
31
 
    CvsProcessWidget( CvsService_stub *service, CvsServicePart *part,
32
 
        QWidget *parent, const char *name );
33
 
    virtual ~CvsProcessWidget();
34
 
 
35
 
    bool startJob( const DCOPRef &aJob );
36
 
 
37
 
    /**
38
 
    * @return true if there is already a job pending, false otherwise
39
 
    * (another job can be requested)
40
 
    */
41
 
    bool isAlreadyWorking() const;
42
 
    void cancelJob();
43
 
 
44
 
    virtual void clear();
45
 
 
46
 
    QStringList output() const { return m_output; }
47
 
    QStringList errors() const { return m_errors; }
48
 
 
49
 
//private slots:
50
 
    //! DCOP Iface
51
 
    virtual void slotJobExited( bool normalExit, int exitStatus );
52
 
    virtual void slotReceivedOutput( QString someOutput );
53
 
    virtual void slotReceivedErrors( QString someErrors );
54
 
 
55
 
signals:
56
 
    void jobFinished( bool normalExit, int exitStatus );
57
 
 
58
 
private:
59
 
    void showInfo( const QStringList &msg );
60
 
    void showError( const QStringList &msg  );
61
 
    void showOutput( const QStringList &msg  );
62
 
 
63
 
    CvsServicePart *m_part;
64
 
    CvsService_stub *m_service;
65
 
    CvsJob_stub *m_job;
66
 
 
67
 
    //! Buffered reader for safely reading stdout and stderr from cvs
68
 
    //! commands' output
69
 
    BufferedStringReader m_outputBuffer,
70
 
        m_errorBuffer;
71
 
 
72
 
    QStringList m_output,
73
 
        m_errors;
74
 
};
75
 
 
76
 
#endif
77