cvsprogressdlg.h 1.71 KB
Newer Older
1
/* 
2
 *  Copyright (C) 1999-2002 Bernd Gehrmann
Bernd Gehrmann's avatar
Bernd Gehrmann committed
3
 *                          bernd@mail.berlios.de
4
5
6
7
8
9
10
11
12
13
14
 *
 * This program may be distributed under the terms of the Q Public
 * License as defined by Trolltech AS of Norway and appearing in the
 * file LICENSE.QPL included in the packaging of this file.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 */


15
16
#ifndef CVSPROGRESSDLG_H
#define CVSPROGRESSDLG_H
17
18

#include <qsemimodal.h>
19
#include <qstringlist.h>
20
21
22
23
24
25
26
27
28
29
30
31
32
33


class KProcess;
class QListBox;
class QPushButton;
class QCString;
class KAnimWidget;


class CvsProgressDialog : public QSemiModal
{
    Q_OBJECT
    
public:
34
    CvsProgressDialog( const QString &text, QWidget *parent );
35
36
37
38
    ~CvsProgressDialog();
    
    bool execCommand(const QString &sandbox, const QString &repository,
                     const QString &cmdline, const QString &errindicator);
39
    bool getOneLine(QString *str);
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

protected:
    virtual void closeEvent(QCloseEvent *e);
    
private slots:
    void timeoutOccured();
    void cancelClicked();
    void childExited();
    void receivedOutputNongui(KProcess *proc, char *buffer, int buflen);
    void receivedOutput(KProcess *proc, char *buffer, int buflen);
    
private:
    void stopNonguiPart();
    void startGuiPart();
    void finish();
    bool processOutput();

    bool shown;
    bool cancelled;
59
    bool hasError;
60
61
62
63
64
65
    QString indic1, indic2;
    KProcess *childproc;
    QListBox *resultbox;
    QPushButton *cancelbutton;
    QTimer *timer;
    QString buf;
66
    QStringList output;
67
68
69
70
71
72
73
74
75
    KAnimWidget *gear;
};

#endif


// Local Variables:
// c-basic-offset: 4
// End: