summaryrefslogtreecommitdiffstats
path: root/src/svnfrontend/stopdlg.h
blob: 0aaa948b8c3faacf7062230f5fcdc095b43259e5 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/***************************************************************************
 *   Copyright (C) 2005-2007 by Rajko Albrecht                             *
 *   ral@alwins-world.de                                                   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   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.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
 ***************************************************************************/
#ifndef STOPDLG_H
#define STOPDLG_H

#include "cursorstack.h"

#include <kdialogbase.h>

#include <tqdatetime.h>
#include <tqobject.h>

class TQTimer;

class CContextListener;
class TQLabel;
class KProgress;
class KTextBrowser;
class TQVBoxLayout;

/**
@author Rajko Albrecht
*/
class StopDlg : public KDialogBase
{
Q_OBJECT
  
public:
    StopDlg(TQObject*,TQWidget *parent = 0, const char *name = 0,const TQString&caption=TQString(),const TQString&text=TQString());
    virtual ~StopDlg();

    bool cancelld();

protected:
    TQObject*m_Context;
    int m_MinDuration;
    bool mCancelled;
    TQTimer * mShowTimer;
    TQString mCancelText;
    bool mShown,mWait;
    TQLabel*mLabel;
    KProgress*m_ProgressBar;
    KProgress*m_NetBar;
    bool m_BarShown;
    bool m_netBarShown;
    TQTime m_StopTick;
    KTextBrowser*m_LogWindow;
    TQVBoxLayout*layout;

    TQString m_lastLog;
    unsigned int m_lastLogLines;
    CursorStack * cstack;

    virtual void showEvent(TQShowEvent*);
    virtual void hideEvent(TQHideEvent*);

public slots:
    virtual void slotTick();
    virtual void slotWait(bool);
    virtual void slotExtraMessage(const TQString&);

protected slots:
    virtual void slotAutoShow();
    virtual void slotCancel();
    virtual void slotNetProgres(long long int, long long int);
signals:
    void sigCancel(bool how);
};

class StopSimpleDlg:public StopDlg
{
    Q_OBJECT
  
public:
    StopSimpleDlg(TQWidget *parent = 0, const char *name = 0,const TQString&caption=TQString(),const TQString&text=TQString());
    virtual ~StopSimpleDlg(){}

    bool isCanceld()const{return cancelld;}

public slots:
    virtual void makeCancel();

protected slots:
    virtual void slotSimpleCancel(bool);

protected:
    bool cancelld;
};

#endif