Chris@116
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@116
|
2
|
Chris@116
|
3 /*
|
Chris@116
|
4 EasyMercurial
|
Chris@116
|
5
|
Chris@116
|
6 Based on HgExplorer by Jari Korhonen
|
Chris@116
|
7 Copyright (c) 2010 Jari Korhonen
|
Chris@116
|
8 Copyright (c) 2010 Chris Cannam
|
Chris@116
|
9 Copyright (c) 2010 Queen Mary, University of London
|
Chris@116
|
10
|
Chris@116
|
11 This program is free software; you can redistribute it and/or
|
Chris@116
|
12 modify it under the terms of the GNU General Public License as
|
Chris@116
|
13 published by the Free Software Foundation; either version 2 of the
|
Chris@116
|
14 License, or (at your option) any later version. See the file
|
Chris@116
|
15 COPYING included with this distribution for more information.
|
Chris@116
|
16 */
|
Chris@116
|
17
|
Chris@116
|
18 #ifndef HISTORYWIDGET_H
|
Chris@116
|
19 #define HISTORYWIDGET_H
|
Chris@116
|
20
|
Chris@116
|
21 #include "changeset.h"
|
Chris@116
|
22
|
Chris@116
|
23 #include <QWidget>
|
Chris@133
|
24 #include <QSet>
|
Chris@116
|
25
|
Chris@116
|
26 class Panned;
|
Chris@116
|
27 class Panner;
|
Chris@129
|
28 class UncommittedItem;
|
Chris@116
|
29
|
Chris@116
|
30 class HistoryWidget : public QWidget
|
Chris@116
|
31 {
|
Chris@116
|
32 Q_OBJECT
|
Chris@116
|
33
|
Chris@116
|
34 public:
|
Chris@116
|
35 HistoryWidget();
|
Chris@116
|
36 virtual ~HistoryWidget();
|
Chris@116
|
37
|
Chris@128
|
38 void setCurrent(QStringList ids);
|
Chris@128
|
39 void showUncommittedChanges(bool);
|
Chris@128
|
40
|
Chris@120
|
41 void parseNewLog(QString log);
|
Chris@120
|
42 void parseIncrementalLog(QString log);
|
Chris@134
|
43
|
Chris@134
|
44 bool haveNewItems() const { return !m_newIds.empty(); }
|
Chris@141
|
45
|
Chris@141
|
46 signals:
|
Chris@141
|
47 void commit();
|
Chris@141
|
48 void revert();
|
Chris@141
|
49 void diffWorkingFolder();
|
Chris@141
|
50
|
Chris@141
|
51 void updateTo(QString id);
|
Chris@141
|
52 void diffToPrevious(QString id);
|
Chris@141
|
53 void diffToCurrent(QString id);
|
Chris@141
|
54 void mergeFrom(QString id);
|
Chris@141
|
55 void tag(QString id);
|
Chris@116
|
56
|
Chris@116
|
57 private:
|
Chris@116
|
58 Changesets m_changesets;
|
Chris@128
|
59 QStringList m_currentIds;
|
Chris@133
|
60 QSet<QString> m_newIds;
|
Chris@129
|
61 UncommittedItem *m_uncommitted;
|
Chris@134
|
62 bool m_uncommittedVisible;
|
Chris@116
|
63
|
Chris@116
|
64 Panned *m_panned;
|
Chris@116
|
65 Panner *m_panner;
|
Chris@116
|
66
|
Chris@116
|
67 void clearChangesets();
|
Chris@133
|
68 void replaceChangesets(Changesets);
|
Chris@133
|
69 void addChangesets(Changesets);
|
Chris@120
|
70 void layoutAll();
|
Chris@122
|
71 void setChangesetParents();
|
Chris@133
|
72 void updateNewAndCurrentItems();
|
Chris@141
|
73 void connectSceneSignals();
|
Chris@116
|
74 };
|
Chris@116
|
75
|
Chris@116
|
76 #endif
|