comparison src/hgrunner.h @ 561:1ff2a1bf0a40

Add a cancel button to the progress bar
author Chris Cannam
date Mon, 27 Feb 2012 17:25:50 +0000
parents 533519ebc0cb
children 39cac58b4f92
comparison
equal deleted inserted replaced
560:533519ebc0cb 561:1ff2a1bf0a40
18 #ifndef HGRUNNER_H 18 #ifndef HGRUNNER_H
19 #define HGRUNNER_H 19 #define HGRUNNER_H
20 20
21 #include "hgaction.h" 21 #include "hgaction.h"
22 22
23 #include <QProgressBar> 23 #include <QWidget>
24 #include <QProcess> 24 #include <QProcess>
25 #include <QByteArray> 25
26 #include <QRect> 26 class QProgressBar;
27 #include <QFile> 27 class QToolButton;
28 class QFile;
28 29
29 #include <deque> 30 #include <deque>
30 31
31 class HgRunner : public QProgressBar 32 class HgRunner : public QWidget
32 { 33 {
33 Q_OBJECT 34 Q_OBJECT
34 35
35 public: 36 public:
36 HgRunner(QString myDirPath, QWidget * parent = 0); 37 HgRunner(QString myDirPath, QWidget *parent = 0);
37 ~HgRunner(); 38 ~HgRunner();
38 39
40 public slots:
39 void requestAction(HgAction action); 41 void requestAction(HgAction action);
40 void killCurrentActions(); // kill anything running; clear the queue 42 void killCurrentActions(); // kill anything running; clear the queue
41 43
42 signals: 44 signals:
43 void commandStarting(HgAction action); 45 void commandStarting(HgAction action);
76 void pruneOldAuthFiles(); 78 void pruneOldAuthFiles();
77 79
78 QString getUnbundledFileName(); 80 QString getUnbundledFileName();
79 QString unbundleExtension(); 81 QString unbundleExtension();
80 82
83 QProgressBar *m_progress;
84 QToolButton *m_cancel;
85
81 QStringList addExtensionOptions(QStringList); 86 QStringList addExtensionOptions(QStringList);
82 87
83 int m_ptyMasterFd; 88 int m_ptyMasterFd;
84 int m_ptySlaveFd; 89 int m_ptySlaveFd;
85 QString m_ptySlaveFilename; 90 QString m_ptySlaveFilename;