summaryrefslogtreecommitdiffstats
path: root/libk9copy/k9processlist.h
blob: 5ee0c31efd4a7c7a99464c1384a471a9701968b8 (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
//
// C++ Interface:
//
// Description:
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef K9PROCESSLIST_H
#define K9PROCESSLIST_H
#include "k9common.h"
#include "../libk9copy/processList.h"
#include "k9process.h"
#include <tqmap.h>
#include <tqtimer.h>
class k9ProcessList : public processList {
    Q_OBJECT
  TQ_OBJECT

public:
    k9ProcessList(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
    ~k9ProcessList();
    /*$PUBLIC_FUNCTIONS$*/
    void execute();
    void addProgress(const TQString &_text);
    void setProgress (k9Process * _process,int _position, int _total);
    void setText(k9Process *_process, const TQString &_text,int _col);
    void setFileName(k9Process *_process,const TQString &_fileName);
    void setPos(k9Process *_process,double _pos);
    k9Process *addProcess(const TQString &label);

    void setMaxProcess(int _value);
    int getMaxProcess() const;
    bool getCancel() const;
    void clear();

	bool getError() const;
	
public slots:
    /*$PUBLIC_SLOTS$*/

protected:
    /*$PROTECTED_FUNCTIONS$*/
    int m_maxProcess;
    TQMap <k9Process*,TQListViewItem*> m_items;
    TQPtrList <k9Process> m_processes;
    TQTimer m_timer;
    bool m_cancel;
    bool m_error;
    bool m_waitSync;
    int getNbRunning();
    void wait(int _msec);

protected slots:
    /*$PROTECTED_SLOTS$*/
    void timeout();
    virtual void bCancelClick();
    virtual void processExited(KProcess *);
};

#endif