1
/***************************************************************************
2
* Copyright (C) 2003 by KDevelop Authors *
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. *
10
***************************************************************************/
12
#ifndef _CVSPROCESSWIDGET_H_
13
#define _CVSPROCESSWIDGET_H_
15
#include <qtextedit.h>
16
#include <qstringlist.h>
18
#include "cvsservicedcopIface.h"
19
#include "bufferedstringreader.h"
24
class CvsService_stub;
25
class QStyleSheetItem;
27
class CvsProcessWidget : public QTextEdit, virtual public CVSServiceDCOPIface
31
CvsProcessWidget( CvsService_stub *service, CvsServicePart *part,
32
QWidget *parent, const char *name );
33
virtual ~CvsProcessWidget();
35
bool startJob( const DCOPRef &aJob );
38
* @return true if there is already a job pending, false otherwise
39
* (another job can be requested)
41
bool isAlreadyWorking() const;
46
QStringList output() const { return m_output; }
47
QStringList errors() const { return m_errors; }
51
virtual void slotJobExited( bool normalExit, int exitStatus );
52
virtual void slotReceivedOutput( QString someOutput );
53
virtual void slotReceivedErrors( QString someErrors );
56
void jobFinished( bool normalExit, int exitStatus );
59
void showInfo( const QStringList &msg );
60
void showError( const QStringList &msg );
61
void showOutput( const QStringList &msg );
63
CvsServicePart *m_part;
64
CvsService_stub *m_service;
67
//! Buffered reader for safely reading stdout and stderr from cvs
69
BufferedStringReader m_outputBuffer,