Mercurial > hg > easyhg
comparison grapher.cpp @ 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 | bb2d2eecdd60 |
children | c3e8342d2de9 |
comparison
equal
deleted
inserted
replaced
118:9734fb0d6fff | 119:005a54380502 |
---|---|
17 | 17 |
18 #include "grapher.h" | 18 #include "grapher.h" |
19 #include "connectionitem.h" | 19 #include "connectionitem.h" |
20 #include "dateitem.h" | 20 #include "dateitem.h" |
21 #include "debug.h" | 21 #include "debug.h" |
22 | 22 #include "changesetscene.h" |
23 #include <QGraphicsScene> | |
24 | 23 |
25 #include <iostream> | 24 #include <iostream> |
26 | 25 |
27 int Grapher::findAvailableColumn(int row, int parent, bool preferParentCol) | 26 int Grapher::findAvailableColumn(int row, int parent, bool preferParentCol) |
28 { | 27 { |
344 ChangesetItem *item = new ChangesetItem(cs); | 343 ChangesetItem *item = new ChangesetItem(cs); |
345 item->setX(0); | 344 item->setX(0); |
346 item->setY(0); | 345 item->setY(0); |
347 m_items[id] = item; | 346 m_items[id] = item; |
348 m_scene->addItem(item); | 347 m_scene->addItem(item); |
348 QObject::connect(item, SIGNAL(detailShown()), | |
349 m_scene, SLOT(changesetDetailShown())); | |
349 } | 350 } |
350 | 351 |
351 // Add the connecting lines | 352 // Add the connecting lines |
352 | 353 |
353 foreach (Changeset *cs, csets) { | 354 foreach (Changeset *cs, csets) { |