mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-08-13 10:04:13 +02:00
show terminalnames in export
This commit is contained in:
+2
-1
@@ -2397,9 +2397,10 @@ QPointF Diagram::snapToGrid(const QPointF &p)
|
||||
\~French true pour afficher les bornes, false sinon
|
||||
*/
|
||||
void Diagram::setDrawTerminals(bool dt) {
|
||||
draw_terminals_ = dt;
|
||||
foreach(QGraphicsItem *qgi, items()) {
|
||||
if (Terminal *t = qgraphicsitem_cast<Terminal *>(qgi)) {
|
||||
t -> setVisible(dt);
|
||||
t -> update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,6 +199,7 @@ void Terminal::paint(
|
||||
|
||||
// dessin de la borne en rouge
|
||||
// draw the terminal in red
|
||||
if (!diagram() || diagram()->drawTerminals()) {
|
||||
t.setColor(Qt::red);
|
||||
painter -> setPen(t);
|
||||
painter -> drawLine(c, e);
|
||||
@@ -212,6 +213,7 @@ void Terminal::paint(
|
||||
painter -> setRenderHint(QPainter::Antialiasing, true);
|
||||
painter -> drawEllipse(QRectF(c.x() - 2.5, c.y() - 2.5, 5.0, 5.0));
|
||||
} else painter -> drawPoint(c);
|
||||
}
|
||||
|
||||
//Draw help line if needed,
|
||||
if (diagram() && m_draw_help_line)
|
||||
|
||||
Reference in New Issue
Block a user