Chris@119
|
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
|
Chris@119
|
2
|
Chris@119
|
3 /*
|
Chris@119
|
4 EasyMercurial
|
Chris@119
|
5
|
Chris@119
|
6 Based on HgExplorer by Jari Korhonen
|
Chris@119
|
7 Copyright (c) 2010 Jari Korhonen
|
Chris@244
|
8 Copyright (c) 2011 Chris Cannam
|
Chris@244
|
9 Copyright (c) 2011 Queen Mary, University of London
|
Chris@119
|
10
|
Chris@119
|
11 This program is free software; you can redistribute it and/or
|
Chris@119
|
12 modify it under the terms of the GNU General Public License as
|
Chris@119
|
13 published by the Free Software Foundation; either version 2 of the
|
Chris@119
|
14 License, or (at your option) any later version. See the file
|
Chris@119
|
15 COPYING included with this distribution for more information.
|
Chris@119
|
16 */
|
Chris@119
|
17
|
Chris@119
|
18 #ifndef CHANGESETSCENE_H
|
Chris@119
|
19 #define CHANGESETSCENE_H
|
Chris@119
|
20
|
Chris@119
|
21 #include <QGraphicsScene>
|
Chris@119
|
22
|
Chris@119
|
23 class ChangesetItem;
|
Chris@141
|
24 class UncommittedItem;
|
Chris@168
|
25 class DateItem;
|
Chris@119
|
26
|
Chris@119
|
27 class ChangesetScene : public QGraphicsScene
|
Chris@119
|
28 {
|
Chris@119
|
29 Q_OBJECT
|
Chris@119
|
30
|
Chris@119
|
31 public:
|
Chris@119
|
32 ChangesetScene();
|
Chris@119
|
33
|
Chris@141
|
34 void addChangesetItem(ChangesetItem *item);
|
Chris@141
|
35 void addUncommittedItem(UncommittedItem *item);
|
Chris@168
|
36 void addDateItem(DateItem *item);
|
Chris@141
|
37
|
Chris@281
|
38 ChangesetItem *getItemById(QString id); // Slow: traversal required
|
Chris@281
|
39
|
Chris@141
|
40 signals:
|
Chris@141
|
41 void commit();
|
Chris@141
|
42 void revert();
|
Chris@141
|
43 void diffWorkingFolder();
|
Chris@168
|
44 void showSummary();
|
Chris@153
|
45 void showWork();
|
Chris@141
|
46
|
Chris@141
|
47 void updateTo(QString id);
|
Chris@148
|
48 void diffToParent(QString id, QString parent);
|
Chris@288
|
49 void showSummaryToParent(QString id, QString parent);
|
Chris@141
|
50 void diffToCurrent(QString id);
|
Chris@141
|
51 void mergeFrom(QString id);
|
Chris@141
|
52 void tag(QString id);
|
Chris@141
|
53
|
Chris@168
|
54 private slots:
|
Chris@119
|
55 void changesetDetailShown();
|
Chris@168
|
56 void changesetDetailHidden();
|
Chris@168
|
57 void dateItemClicked();
|
Chris@119
|
58
|
Chris@119
|
59 private:
|
Chris@119
|
60 ChangesetItem *m_detailShown;
|
Chris@119
|
61 };
|
Chris@119
|
62
|
Chris@119
|
63 #endif
|