mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Minor : The Xref (draw as contact) of temporised switch contact are not represented with the parachute
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5845 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -652,6 +652,7 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt)
|
||||
QRectF r(10, offset+7.5, 5, 3);
|
||||
painter.drawArc(r, 0, 180*16);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,17 +695,29 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt)
|
||||
};
|
||||
painter.drawPolyline(p2, 3);
|
||||
|
||||
//Draw the half ellipse off delay
|
||||
if (flags &Delay)
|
||||
{
|
||||
painter.drawLine(12, offset+13, 12, offset+16);
|
||||
if (flags &DelayOn) {
|
||||
QRectF r(9.5, offset+14, 5, 3);
|
||||
painter.drawArc(r, 180*16, 180*16);
|
||||
}
|
||||
else if (flags &DelayOff) {
|
||||
QRectF r(9.5, offset+16.5, 5, 3);
|
||||
painter.drawArc(r, 0, 180*16);
|
||||
}
|
||||
}
|
||||
|
||||
//Draw position text
|
||||
QRectF text_rect = painter.boundingRect(QRectF(30, offset+5, 5, 10), Qt::AlignLeft | Qt::AlignVCenter, str);
|
||||
painter.drawText(text_rect, Qt::AlignLeft | Qt::AlignVCenter, str);
|
||||
bounding_rect = bounding_rect.united(text_rect);
|
||||
|
||||
if (m_hovered_contacts_map.contains(elmt))
|
||||
{
|
||||
if (m_hovered_contacts_map.contains(elmt)) {
|
||||
m_hovered_contacts_map.insertMulti(elmt, bounding_rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
m_hovered_contacts_map.insert(elmt, bounding_rect);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user