comparison src/historywidget.cpp @ 397:61bde1f0ff0a item_appearance_adjustments

Replace DateItems (background items for date shading) with a date range list in the scene and dedicated rendering for it in the graphics view: this way we can ensure the shading spans the full width and the dates are always visible
author Chris Cannam
date Wed, 25 May 2011 14:32:32 +0100
parents f051d210521e
children 1c05e7576ea5
comparison
equal deleted inserted replaced
396:1e73b5911631 397:61bde1f0ff0a
16 */ 16 */
17 17
18 #include "historywidget.h" 18 #include "historywidget.h"
19 19
20 #include "changesetscene.h" 20 #include "changesetscene.h"
21 #include "panned.h" 21 #include "changesetview.h"
22 #include "panner.h" 22 #include "panner.h"
23 #include "grapher.h" 23 #include "grapher.h"
24 #include "debug.h" 24 #include "debug.h"
25 #include "uncommitteditem.h" 25 #include "uncommitteditem.h"
26 26
30 30
31 HistoryWidget::HistoryWidget() : 31 HistoryWidget::HistoryWidget() :
32 m_showUncommitted(false), 32 m_showUncommitted(false),
33 m_refreshNeeded(false) 33 m_refreshNeeded(false)
34 { 34 {
35 m_panned = new Panned; 35 m_panned = new ChangesetView;
36 m_panner = new Panner; 36 m_panner = new Panner;
37 37
38 m_panned->setDragMode(QGraphicsView::ScrollHandDrag); 38 m_panned->setDragMode(QGraphicsView::ScrollHandDrag);
39 m_panned->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate); 39 m_panned->setViewportUpdateMode(QGraphicsView::BoundingRectViewportUpdate);
40 m_panned->setCacheMode(QGraphicsView::CacheNone);
40 41
41 QGridLayout *layout = new QGridLayout; 42 QGridLayout *layout = new QGridLayout;
42 layout->addWidget(m_panned, 0, 0); 43 layout->addWidget(m_panned, 0, 0);
43 layout->addWidget(m_panner, 0, 1); 44 layout->addWidget(m_panner, 0, 1);
44 m_panner->setMaximumWidth(80); 45 m_panner->setMaximumWidth(80);