|
@@ -42,6 +42,16 @@ void CLineItem::setLineType(CLineItem::CLineType type)
|
|
|
updatePath();
|
|
|
}
|
|
|
|
|
|
+bool CLineItem::showArrow() const
|
|
|
+{
|
|
|
+ return m_showArrow;
|
|
|
+}
|
|
|
+
|
|
|
+void CLineItem::setShowArrow(bool s)
|
|
|
+{
|
|
|
+ m_showArrow = s;
|
|
|
+}
|
|
|
+
|
|
|
void CLineItem::updatePath()
|
|
|
{
|
|
|
QPainterPath path;
|
|
@@ -77,5 +87,12 @@ void CLineItem::updatePath()
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (m_showArrow && m_startPos != m_endPos) {
|
|
|
+ path.moveTo(m_endPos + QPointF(-10, -5));
|
|
|
+ path.lineTo(m_endPos);
|
|
|
+ path.lineTo(m_endPos + QPointF(-10, 5));
|
|
|
+ }
|
|
|
+
|
|
|
setPath(path);
|
|
|
}
|