Mercurial > hg > easyhg
comparison src/hgtabwidget.h @ 370:b9c153e00e84
Move source files to src/
author | Chris Cannam |
---|---|
date | Thu, 24 Mar 2011 10:27:51 +0000 |
parents | hgtabwidget.h@4cd753e083cc |
children | ad106f5fe75f |
comparison
equal
deleted
inserted
replaced
369:19cce6d2c470 | 370:b9c153e00e84 |
---|---|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ | |
2 | |
3 /* | |
4 EasyMercurial | |
5 | |
6 Based on HgExplorer by Jari Korhonen | |
7 Copyright (c) 2010 Jari Korhonen | |
8 Copyright (c) 2011 Chris Cannam | |
9 Copyright (c) 2011 Queen Mary, University of London | |
10 | |
11 This program is free software; you can redistribute it and/or | |
12 modify it under the terms of the GNU General Public License as | |
13 published by the Free Software Foundation; either version 2 of the | |
14 License, or (at your option) any later version. See the file | |
15 COPYING included with this distribution for more information. | |
16 */ | |
17 | |
18 #ifndef HGTABWIDGET_H | |
19 #define HGTABWIDGET_H | |
20 | |
21 #include "changeset.h" | |
22 #include "common.h" | |
23 #include "filestates.h" | |
24 | |
25 #include <QMenu> | |
26 #include <QListWidget> | |
27 #include <QGroupBox> | |
28 #include <QVBoxLayout> | |
29 #include <QCheckBox> | |
30 #include <QLabel> | |
31 #include <QTabWidget> | |
32 | |
33 class FileStatusWidget; | |
34 class HistoryWidget; | |
35 | |
36 class HgTabWidget: public QTabWidget | |
37 { | |
38 Q_OBJECT | |
39 | |
40 public: | |
41 HgTabWidget(QWidget *parent, QString workFolderPath); | |
42 | |
43 void updateWorkFolderFileList(QString fileList); | |
44 | |
45 void setNewLog(QString hgLogList); | |
46 void addIncrementalLog(QString hgLogList); | |
47 | |
48 void setLocalPath(QString workFolderPath); | |
49 | |
50 void setCurrent(QStringList ids, QString branch); | |
51 | |
52 void updateFileStates(); | |
53 void updateHistory(); | |
54 | |
55 FileStates getFileStates() { return m_fileStates; } | |
56 | |
57 bool canDiff() const; | |
58 bool canCommit() const; | |
59 bool canRevert() const; | |
60 bool canAdd() const; | |
61 bool canRemove() const; | |
62 bool canResolve() const; | |
63 bool haveChangesToCommit() const; | |
64 | |
65 QStringList getAllCommittableFiles() const; | |
66 QStringList getAllRevertableFiles() const; | |
67 QStringList getAllUnresolvedFiles() const; | |
68 | |
69 QStringList getSelectedAddableFiles() const; | |
70 QStringList getSelectedRemovableFiles() const; | |
71 | |
72 signals: | |
73 void selectionChanged(); | |
74 void showAllChanged(bool); | |
75 | |
76 void commit(); | |
77 void revert(); | |
78 void diffWorkingFolder(); | |
79 void showSummary(); | |
80 void newBranch(); | |
81 void noBranch(); | |
82 | |
83 void updateTo(QString id); | |
84 void diffToParent(QString id, QString parent); | |
85 void showSummary(Changeset *); | |
86 void diffToCurrent(QString id); | |
87 void mergeFrom(QString id); | |
88 void newBranch(QString id); | |
89 void tag(QString id); | |
90 | |
91 void annotateFiles(QStringList); | |
92 void diffFiles(QStringList); | |
93 void commitFiles(QStringList); | |
94 void revertFiles(QStringList); | |
95 void renameFiles(QStringList); | |
96 void copyFiles(QStringList); | |
97 void addFiles(QStringList); | |
98 void removeFiles(QStringList); | |
99 void redoFileMerges(QStringList); | |
100 void markFilesResolved(QStringList); | |
101 void ignoreFiles(QStringList); | |
102 void unIgnoreFiles(QStringList); | |
103 | |
104 public slots: | |
105 void clearSelections(); | |
106 void showWorkTab(); | |
107 void showHistoryTab(); | |
108 | |
109 private: | |
110 FileStatusWidget *m_fileStatusWidget; | |
111 HistoryWidget *m_historyWidget; | |
112 FileStates m_fileStates; | |
113 | |
114 Changesets parseChangeSets(QString changeSetsStr); | |
115 }; | |
116 | |
117 #endif // HGTABWIDGET_H |