comparison src/mainwindow.h @ 548:dca5bd5b2a06

Merge from branch "fswatcher"
author Chris Cannam
date Tue, 14 Feb 2012 17:55:39 +0000
parents a220f99f1134
children 930462068dcc
comparison
equal deleted inserted replaced
537:a4e699d32a9a 548:dca5bd5b2a06
25 #include "hgaction.h" 25 #include "hgaction.h"
26 #include "settingsdialog.h" 26 #include "settingsdialog.h"
27 27
28 #include <QMainWindow> 28 #include <QMainWindow>
29 #include <QListWidget> 29 #include <QListWidget>
30 #include <QFileSystemWatcher>
31 30
32 QT_BEGIN_NAMESPACE 31 QT_BEGIN_NAMESPACE
33 class QAction; 32 class QAction;
34 class QMenu; 33 class QMenu;
35 class QTimer; 34 class QTimer;
36 QT_END_NAMESPACE 35 QT_END_NAMESPACE
37 36
38 class WorkStatusWidget; 37 class WorkStatusWidget;
38 class FsWatcher;
39 39
40 class MainWindow : public QMainWindow 40 class MainWindow : public QMainWindow
41 { 41 {
42 Q_OBJECT 42 Q_OBJECT
43 43
111 void hgRedoFileMerges(QStringList); 111 void hgRedoFileMerges(QStringList);
112 void hgMarkFilesResolved(QStringList); 112 void hgMarkFilesResolved(QStringList);
113 void hgIgnoreFiles(QStringList); 113 void hgIgnoreFiles(QStringList);
114 void hgUnIgnoreFiles(QStringList); 114 void hgUnIgnoreFiles(QStringList);
115 115
116 void fsDirectoryChanged(QString); 116 void updateFsWatcher();
117 void fsFileChanged(QString);
118 void checkFilesystem(); 117 void checkFilesystem();
119 void actuallyRestoreFileSystemWatcher();
120 118
121 void newerVersionAvailable(QString); 119 void newerVersionAvailable(QString);
122 120
123 private: 121 private:
124 void hgQueryBranch(); 122 void hgQueryBranch();
173 int extractChangeCount(QString); 171 int extractChangeCount(QString);
174 QString format1(QString); 172 QString format1(QString);
175 QString format3(QString, QString, QString); 173 QString format3(QString, QString, QString);
176 174
177 void clearState(); 175 void clearState();
178
179 void updateFileSystemWatcher();
180 void suspendFileSystemWatcher();
181 void restoreFileSystemWatcher();
182 176
183 void updateClosedHeads(); 177 void updateClosedHeads();
184 178
185 void updateWorkFolderAndRepoNames(); 179 void updateWorkFolderAndRepoNames();
186 180
241 235
242 // Help menu actions 236 // Help menu actions
243 QAction *m_aboutAct; 237 QAction *m_aboutAct;
244 QAction *m_helpAct; 238 QAction *m_helpAct;
245 239
246 QToolBar *m_fileToolBar;
247 QToolBar *m_repoToolBar; 240 QToolBar *m_repoToolBar;
248 QToolBar *m_workFolderToolBar; 241 QToolBar *m_workFolderToolBar;
249 242
250 QDialog *m_helpDialog; 243 QDialog *m_helpDialog;
251 244
255 248
256 QString getDiffBinaryName(); 249 QString getDiffBinaryName();
257 QString getMergeBinaryName(); 250 QString getMergeBinaryName();
258 QString getEditorBinaryName(); 251 QString getEditorBinaryName();
259 252
260 QFileSystemWatcher *m_fsWatcher; 253 FsWatcher *m_fsWatcher;
261 QTimer *m_fsWatcherGeneralTimer; 254 int m_fsWatcherToken;
262 QTimer *m_fsWatcherRestoreTimer; 255 bool m_commandSequenceInProgress;
263 bool m_fsWatcherSuspended;
264 256
265 QString m_lastStatOutput; 257 QString m_lastStatOutput;
266 QStringList m_lastRevertedFiles; 258 QStringList m_lastRevertedFiles;
267 259
268 bool m_justMerged; 260 bool m_justMerged;