comparison src/mainwindow.h @ 540:fc2df97920e8 fswatcher

Introduce FsWatcher into main window (though it isn't fully rigged up yet)
author Chris Cannam
date Mon, 13 Feb 2012 17:29:06 +0000
parents a4e699d32a9a
children 0a16db274f2c
comparison
equal deleted inserted replaced
539:3935a7e621ca 540:fc2df97920e8
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 fsWatcherChanged();
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
255 249
256 QString getDiffBinaryName(); 250 QString getDiffBinaryName();
257 QString getMergeBinaryName(); 251 QString getMergeBinaryName();
258 QString getEditorBinaryName(); 252 QString getEditorBinaryName();
259 253
260 QFileSystemWatcher *m_fsWatcher; 254 FsWatcher *m_fsWatcher;
261 QTimer *m_fsWatcherGeneralTimer; 255 int m_fsWatcherToken;
262 QTimer *m_fsWatcherRestoreTimer; 256 bool m_commandSequenceInProgress;
263 bool m_fsWatcherSuspended;
264 257
265 QString m_lastStatOutput; 258 QString m_lastStatOutput;
266 QStringList m_lastRevertedFiles; 259 QStringList m_lastRevertedFiles;
267 260
268 bool m_justMerged; 261 bool m_justMerged;