comparison mainwindow.h @ 307:5b4aa1c24407 new-branches-with-status-outside-tabs

Merge branch status_outside_tabs into branch new-branches, and make a new branch
author Chris Cannam
date Mon, 28 Feb 2011 13:09:37 +0000
parents f7cdd5b31aed d40294e164da
children 4811eb34e819
comparison
equal deleted inserted replaced
278:f7cdd5b31aed 307:5b4aa1c24407
32 class QAction; 32 class QAction;
33 class QMenu; 33 class QMenu;
34 class QTimer; 34 class QTimer;
35 QT_END_NAMESPACE 35 QT_END_NAMESPACE
36 36
37 class WorkStatusWidget;
38
37 class MainWindow : public QMainWindow 39 class MainWindow : public QMainWindow
38 { 40 {
39 Q_OBJECT 41 Q_OBJECT
40 42
41 public: 43 public:
42 MainWindow(QString myDirPath); 44 MainWindow(QString myDirPath);
43 HgTabWidget *hgTabs;
44 void writeSettings();
45
46 //Paths to remote repo & workfolder
47 //Local repo is directory "./hg/" under work folder
48 QString remoteRepoPath;
49 QString workFolderPath;
50 QString currentBranch;
51 Changesets currentHeads;
52 Changesets currentParents;
53 int commitsSincePush;
54 bool stateUnknown;
55 bool hgIsOK;
56 bool needNewLog;
57 45
58 protected: 46 protected:
59 void closeEvent(QCloseEvent *event); 47 void closeEvent(QCloseEvent *event);
60 48
61 public slots: 49 public slots:
81 void hgStat(); 69 void hgStat();
82 void hgRemove(); 70 void hgRemove();
83 void hgAdd(); 71 void hgAdd();
84 void hgCommit(); 72 void hgCommit();
85 void hgShowSummary(); 73 void hgShowSummary();
74 void hgShowSummaryFor(Changeset *);
86 void hgFolderDiff(); 75 void hgFolderDiff();
87 void hgDiffToCurrent(QString); 76 void hgDiffToCurrent(QString);
88 void hgDiffToParent(QString, QString); 77 void hgDiffToParent(QString, QString);
89 void hgUpdate(); 78 void hgUpdate();
90 void hgRevert(); 79 void hgRevert();
125 void createStatusBar(); 114 void createStatusBar();
126 void readSettings(); 115 void readSettings();
127 void splitChangeSets(QStringList *list, QString hgLogOutput); 116 void splitChangeSets(QStringList *list, QString hgLogOutput);
128 void reportNewRemoteHeads(QString); 117 void reportNewRemoteHeads(QString);
129 void presentLongStdoutToUser(QString stdo); 118 void presentLongStdoutToUser(QString stdo);
119 void writeSettings();
130 120
131 QStringList listAllUpIpV4Addresses(); 121 QStringList listAllUpIpV4Addresses();
132 QString filterTag(QString tag); 122 QString filterTag(QString tag);
133 123
134 QString getUserInfo() const; 124 QString getUserInfo() const;
153 143
154 void showIncoming(QString); 144 void showIncoming(QString);
155 void showPullResult(QString); 145 void showPullResult(QString);
156 void showPushResult(QString); 146 void showPushResult(QString);
157 int extractChangeCount(QString); 147 int extractChangeCount(QString);
148 QString format1(QString);
158 QString format3(QString, QString, QString); 149 QString format3(QString, QString, QString);
159 150
160 void clearState(); 151 void clearState();
161 152
162 void updateFileSystemWatcher(); 153 void updateFileSystemWatcher();
163 void suspendFileSystemWatcher(); 154 void suspendFileSystemWatcher();
164 void restoreFileSystemWatcher(); 155 void restoreFileSystemWatcher();
165 156
166 bool firstStart; 157 void updateWorkFolderAndRepoNames();
167 158
168 bool showAllFiles; 159 WorkStatusWidget *m_workStatus;
160 HgTabWidget *m_hgTabs;
161
162 QString m_remoteRepoPath;
163 QString m_workFolderPath;
164 QString m_currentBranch;
165 Changesets m_currentHeads;
166 Changesets m_currentParents;
167 int m_commitsSincePush;
168 bool m_stateUnknown;
169 bool m_hgIsOK;
170 bool m_needNewLog;
171
172 bool m_firstStart;
173
174 bool m_showAllFiles;
169 175
170 //Actions enabled flags 176 //Actions enabled flags
171 bool remoteRepoActionsEnabled; 177 bool m_remoteRepoActionsEnabled;
172 bool localRepoActionsEnabled; 178 bool m_localRepoActionsEnabled;
173 179
174 QString m_myDirPath; 180 QString m_myDirPath;
175 181
176 //File menu actions 182 // File menu actions
177 QAction *openAct; 183 QAction *m_openAct;
178 QAction *changeRemoteRepoAct; 184 QAction *m_changeRemoteRepoAct;
179 QAction *settingsAct; 185 QAction *m_settingsAct;
180 QAction *exitAct; 186 QAction *m_exitAct;
181 187
182 //Repo actions 188 // Repo actions
183 QAction *hgIncomingAct; 189 QAction *m_hgIncomingAct;
184 QAction *hgPushAct; 190 QAction *m_hgPushAct;
185 QAction *hgPullAct; 191 QAction *m_hgPullAct;
186 QAction *hgRefreshAct; 192 QAction *m_hgRefreshAct;
187 QAction *hgFolderDiffAct; 193 QAction *m_hgFolderDiffAct;
188 QAction *hgChgSetDiffAct; 194 QAction *m_hgChgSetDiffAct;
189 QAction *hgRevertAct; 195 QAction *m_hgRevertAct;
190 QAction *hgAddAct; 196 QAction *m_hgAddAct;
191 QAction *hgRemoveAct; 197 QAction *m_hgRemoveAct;
192 QAction *hgUpdateAct; 198 QAction *m_hgUpdateAct;
193 QAction *hgCommitAct; 199 QAction *m_hgCommitAct;
194 QAction *hgMergeAct; 200 QAction *m_hgMergeAct;
195 QAction *hgUpdateToRevAct; 201 QAction *m_hgUpdateToRevAct;
196 QAction *hgAnnotateAct; 202 QAction *m_hgAnnotateAct;
197 QAction *hgIgnoreAct; 203 QAction *m_hgIgnoreAct;
198 QAction *hgServeAct; 204 QAction *m_hgServeAct;
199 205
200 //Menus 206 // Menus
201 QMenu *fileMenu; 207 QMenu *m_fileMenu;
202 QMenu *advancedMenu; 208 QMenu *m_advancedMenu;
203 QMenu *helpMenu; 209 QMenu *m_helpMenu;
204 210
205 //Help menu actions 211 // Help menu actions
206 QAction *aboutAct; 212 QAction *m_aboutAct;
207 213
208 QToolBar *fileToolBar; 214 QToolBar *m_fileToolBar;
209 QToolBar *repoToolBar; 215 QToolBar *m_repoToolBar;
210 QToolBar *workFolderToolBar; 216 QToolBar *m_workFolderToolBar;
211 217
212 HgRunner *runner; 218 HgRunner *m_runner;
213 219
214 bool shouldHgStat; 220 bool m_shouldHgStat;
215 221
216 QString getDiffBinaryName(); 222 QString getDiffBinaryName();
217 QString getMergeBinaryName(); 223 QString getMergeBinaryName();
218 QString getEditorBinaryName(); 224 QString getEditorBinaryName();
219 225
220 QFileSystemWatcher *fsWatcher; 226 QFileSystemWatcher *m_fsWatcher;
221 QTimer *m_fsWatcherGeneralTimer; 227 QTimer *m_fsWatcherGeneralTimer;
222 QTimer *m_fsWatcherRestoreTimer; 228 QTimer *m_fsWatcherRestoreTimer;
223 bool m_fsWatcherSuspended; 229 bool m_fsWatcherSuspended;
224 230
225 QString lastStatOutput; 231 QString m_lastStatOutput;
226 QStringList lastRevertedFiles; 232 QStringList m_lastRevertedFiles;
227 233
228 bool justMerged; 234 bool m_justMerged;
229 QString mergeTargetRevision; 235 QString m_mergeTargetRevision;
230 QString mergeCommitComment; 236 QString m_mergeCommitComment;
231 }; 237 };
232 238
233 #endif 239 #endif