comparison src/historywidget.h @ 370:b9c153e00e84

Move source files to src/
author Chris Cannam
date Thu, 24 Mar 2011 10:27:51 +0000
parents historywidget.h@4811eb34e819
children 1c05e7576ea5
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 HISTORYWIDGET_H
19 #define HISTORYWIDGET_H
20
21 #include "changeset.h"
22
23 #include <QWidget>
24 #include <QSet>
25
26 class Panned;
27 class Panner;
28 class UncommittedItem;
29 class QGraphicsScene;
30
31 class HistoryWidget : public QWidget
32 {
33 Q_OBJECT
34
35 public:
36 HistoryWidget();
37 virtual ~HistoryWidget();
38
39 void setCurrent(QStringList ids, QString branch, bool showUncommitted);
40
41 void parseNewLog(QString log);
42 void parseIncrementalLog(QString log);
43
44 bool haveNewItems() const { return !m_newIds.empty(); }
45
46 void update();
47
48 signals:
49 void commit();
50 void revert();
51 void diffWorkingFolder();
52 void showSummary();
53 void showWork();
54 void newBranch();
55 void noBranch();
56
57 void updateTo(QString id);
58 void diffToParent(QString id, QString parent);
59 void showSummary(Changeset *);
60 void diffToCurrent(QString id);
61 void mergeFrom(QString id);
62 void newBranch(QString id);
63 void tag(QString id);
64
65 private:
66 Changesets m_changesets;
67 QStringList m_currentIds;
68 QString m_currentBranch;
69 QSet<QString> m_newIds;
70 bool m_showUncommitted;
71 bool m_refreshNeeded;
72
73 Panned *m_panned;
74 Panner *m_panner;
75
76 QGraphicsScene *scene();
77 void clearChangesets();
78 void replaceChangesets(Changesets);
79 void addChangesets(Changesets);
80 void layoutAll();
81 void setChangesetParents();
82 void updateNewAndCurrentItems();
83 void connectSceneSignals();
84 };
85
86 #endif