comparison grapher.h @ 119:005a54380502

* Make scene remember which item has its details showing, and remove the previous one when a new one is clicked
author Chris Cannam
date Sun, 28 Nov 2010 21:52:00 +0000
parents f583e44d9d31
children 644bd31e8301
comparison
equal deleted inserted replaced
118:9734fb0d6fff 119:005a54380502
18 #ifndef GRAPHER_H 18 #ifndef GRAPHER_H
19 #define GRAPHER_H 19 #define GRAPHER_H
20 20
21 #include "changeset.h" 21 #include "changeset.h"
22 #include "changesetitem.h" 22 #include "changesetitem.h"
23 #include "changesetscene.h"
23 24
24 #include <QSet> 25 #include <QSet>
25 #include <QMap> 26 #include <QMap>
26 #include <QPair> 27 #include <QPair>
27 28
28 #include <exception> 29 #include <exception>
29 30
30 class Grapher 31 class Grapher
31 { 32 {
32 public: 33 public:
33 Grapher(QGraphicsScene *scene) { m_scene = scene; } 34 Grapher(ChangesetScene *scene) { m_scene = scene; }
34 35
35 void layout(Changesets csets); 36 void layout(Changesets csets);
36 37
37 ChangesetItem *getItemFor(Changeset *cs); 38 ChangesetItem *getItemFor(Changeset *cs);
38 39
46 protected: 47 protected:
47 QString m_message; 48 QString m_message;
48 }; 49 };
49 50
50 private: 51 private:
51 QGraphicsScene *m_scene; 52 ChangesetScene *m_scene;
52 53
53 typedef QMap<QString, Changeset *> IdChangesetMap; 54 typedef QMap<QString, Changeset *> IdChangesetMap;
54 IdChangesetMap m_changesets; 55 IdChangesetMap m_changesets;
55 56
56 typedef QMap<QString, ChangesetItem *> IdItemMap; 57 typedef QMap<QString, ChangesetItem *> IdItemMap;