comparison src/connectionitem.cpp @ 400:07eaf4e6003a

Merge from branch "item_appearance_adjustments"
author Chris Cannam
date Wed, 25 May 2011 14:59:09 +0100
parents ef31a55c86b6
children 470829a21f98
comparison
equal deleted inserted replaced
385:5cc0d897eb26 400:07eaf4e6003a
39 } else { 39 } else {
40 c_col = m_uncommitted->column(); c_row = m_uncommitted->row(); 40 c_col = m_uncommitted->column(); c_row = m_uncommitted->row();
41 } 41 }
42 42
43 return QRectF(xscale * c_col + size/2 - 2, 43 return QRectF(xscale * c_col + size/2 - 2,
44 yscale * c_row + size - 2, 44 yscale * c_row + size - 22,
45 xscale * p_col - xscale * c_col + 4, 45 xscale * p_col - xscale * c_col + 6,
46 yscale * p_row - yscale * c_row - size + 4) 46 yscale * p_row - yscale * c_row - size + 44)
47 .normalized(); 47 .normalized();
48 } 48 }
49 49
50 void 50 void
51 ConnectionItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *) 51 ConnectionItem::paint(QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *)
123 if (abs(p_row - c_row) > 1) { 123 if (abs(p_row - c_row) > 1) {
124 p.lineTo(p_x, yscale * p_row); 124 p.lineTo(p_x, yscale * p_row);
125 } 125 }
126 } 126 }
127 127
128 // ensure line reaches the node -- again doesn't matter if we
129 // overshoot
130 p.lineTo(p_x, yscale * p_row + 20);
131
128 paint->drawPath(p); 132 paint->drawPath(p);
129 paint->restore(); 133 paint->restore();
130 } 134 }
131 135
132 136