Mercurial > hg > easyhg
comparison mainwindow.h @ 109:1721c580c10e
* Add a queueing mechanism for Hg actions, instead of refusing to start an action if something else is already happening. This is essential now that actions can be prompted by asynchronous events (e.g. filesystem watcher).
* Make Revert behave sensibly
author | Chris Cannam |
---|---|
date | Fri, 26 Nov 2010 12:48:29 +0000 |
parents | 8ae3b44c0073 |
children | 4bd17f36d059 |
comparison
equal
deleted
inserted
replaced
108:8ae3b44c0073 | 109:1721c580c10e |
---|---|
20 | 20 |
21 #include "hgtabwidget.h" | 21 #include "hgtabwidget.h" |
22 #include "hgrunner.h" | 22 #include "hgrunner.h" |
23 #include "common.h" | 23 #include "common.h" |
24 #include "changeset.h" | 24 #include "changeset.h" |
25 #include "hgaction.h" | |
25 | 26 |
26 #include <QMainWindow> | 27 #include <QMainWindow> |
27 #include <QListWidget> | 28 #include <QListWidget> |
28 #include <QFileSystemWatcher> | 29 #include <QFileSystemWatcher> |
29 | 30 |
30 QT_BEGIN_NAMESPACE | 31 QT_BEGIN_NAMESPACE |
31 class QAction; | 32 class QAction; |
32 class QMenu; | 33 class QMenu; |
33 QT_END_NAMESPACE | 34 QT_END_NAMESPACE |
34 | |
35 enum HGACTIONS | |
36 { | |
37 ACT_NONE, | |
38 ACT_PATHS, | |
39 ACT_BRANCH, | |
40 ACT_STAT, | |
41 ACT_HEADS, | |
42 ACT_PARENTS, | |
43 ACT_LOG, | |
44 ACT_REMOVE, | |
45 ACT_ADD, | |
46 ACT_INCOMING, | |
47 ACT_PUSH, | |
48 ACT_PULL, | |
49 ACT_CLONEFROMREMOTE, | |
50 ACT_INIT, | |
51 ACT_COMMIT, | |
52 ACT_ANNOTATE, | |
53 ACT_FILEDIFF, | |
54 ACT_FOLDERDIFF, | |
55 ACT_CHGSETDIFF, | |
56 ACT_UPDATE, | |
57 ACT_REVERT, | |
58 ACT_MERGE, | |
59 ACT_RESOLVE_LIST, | |
60 ACT_SERVE, | |
61 ACT_RESOLVE_MARK, | |
62 ACT_RETRY_MERGE, | |
63 ACT_TAG, | |
64 ACT_HG_IGNORE, | |
65 }; | |
66 | |
67 | 35 |
68 class MainWindow : public QMainWindow | 36 class MainWindow : public QMainWindow |
69 { | 37 { |
70 Q_OBJECT | 38 Q_OBJECT |
71 | 39 |
84 | 52 |
85 protected: | 53 protected: |
86 void closeEvent(QCloseEvent *event); | 54 void closeEvent(QCloseEvent *event); |
87 | 55 |
88 public slots: | 56 public slots: |
89 void hgPaths(); | 57 void hgQueryPaths(); |
90 void hgStat(); | 58 void hgStat(); |
91 void tabChanged(int currTab); | 59 // void tabChanged(int currTab); |
92 void commandCompleted(); | 60 void commandCompleted(HgAction action, QString stdout); |
93 void commandFailed(); | 61 void commandFailed(HgAction action, QString stdout); |
94 void enableDisableActions(); | 62 void enableDisableActions(); |
95 | 63 |
96 private slots: | 64 private slots: |
97 void about(); | 65 void about(); |
98 void settings(); | 66 void settings(); |
125 | 93 |
126 void fsDirectoryChanged(QString); | 94 void fsDirectoryChanged(QString); |
127 void fsFileChanged(QString); | 95 void fsFileChanged(QString); |
128 | 96 |
129 private: | 97 private: |
130 void hgBranch(); | 98 void hgQueryBranch(); |
131 void hgHeads(); | 99 void hgQueryHeads(); |
132 void hgParents(); | 100 void hgQueryParents(); |
133 void hgLog(); | 101 void hgLog(); |
134 void createActions(); | 102 void createActions(); |
135 void connectActions(); | 103 void connectActions(); |
136 void createMenus(); | 104 void createMenus(); |
137 void createToolBars(); | 105 void createToolBars(); |
214 | 182 |
215 QToolBar *fileToolBar; | 183 QToolBar *fileToolBar; |
216 QToolBar *repoToolBar; | 184 QToolBar *repoToolBar; |
217 QToolBar *workFolderToolBar; | 185 QToolBar *workFolderToolBar; |
218 | 186 |
219 HGACTIONS runningAction; | 187 HgRunner *runner; |
220 HgRunner *runner; | |
221 | 188 |
222 QFileSystemWatcher *fsWatcher; | 189 QFileSystemWatcher *fsWatcher; |
223 | 190 |
224 int tabPage; | 191 // int tabPage; |
225 unsigned char initialFileTypesBits; | 192 // unsigned char initialFileTypesBits; |
226 bool justMerged; | 193 bool justMerged; |
227 }; | 194 }; |
228 | 195 |
229 #endif | 196 #endif |