mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-08 02:53:13 +02:00
Compare commits
5 Commits
be21604ad0
...
8b0b1d10d4
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b0b1d10d4 | |||
| 57dfa28674 | |||
| 3848c7821a | |||
| 1572c23d51 | |||
| e234f063f8 |
+1
-1
Submodule elements updated: f6a422ab00...3aab395fc4
@@ -25,7 +25,7 @@
|
|||||||
#include "titleblock/templatedeleter.h"
|
#include "titleblock/templatedeleter.h"
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include "element.h"
|
#include "qetgraphicsitem/element.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
When the ENABLE_PANEL_WIDGET_DND_CHECKS flag is set, the panel
|
When the ENABLE_PANEL_WIDGET_DND_CHECKS flag is set, the panel
|
||||||
|
|||||||
@@ -961,22 +961,21 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt, in
|
|||||||
painter.drawPolyline(p2, 3);
|
painter.drawPolyline(p2, 3);
|
||||||
|
|
||||||
// Draw terminal names for switch contact (3 terminals)
|
// Draw terminal names for switch contact (3 terminals)
|
||||||
// terminal_names[0] = NO side (top left)
|
// terminal_names[0] = NC (bottom-left)
|
||||||
// terminal_names[1] = NC side (bottom left)
|
// terminal_names[1] = NO (top-left)
|
||||||
// terminal_names[2] = common side (right)
|
// terminal_names[2] = Common (right)
|
||||||
if (!terminal_names.isEmpty() && m_properties.showTerminalName()) {
|
if (!terminal_names.isEmpty() && m_properties.showTerminalName()) {
|
||||||
painter.setFont(QETApp::diagramTextsFont(4));
|
painter.setFont(QETApp::diagramTextsFont(4));
|
||||||
// Sort order from parseTerminal (top->bottom, left->right):
|
// Storage order set above: [0]=NC, [1]=NO, [2]=Common
|
||||||
// [0]=12 (NO, top-left), [1]=14 (common, top-center), [2]=13 (NC, bottom-center)
|
|
||||||
if (terminal_names.size() >= 1)
|
|
||||||
painter.drawText(QRectF(0, offset, 8, 8),
|
|
||||||
Qt::AlignLeft|Qt::AlignTop, terminal_names[1]); // 12 NO left
|
|
||||||
if (terminal_names.size() >= 2)
|
if (terminal_names.size() >= 2)
|
||||||
painter.drawText(QRectF(16, offset+4, 8, 6),
|
painter.drawText(QRectF(0, offset, 8, 8),
|
||||||
Qt::AlignRight|Qt::AlignTop, terminal_names[2]); // 14 common right
|
Qt::AlignLeft|Qt::AlignTop, terminal_names[1]); // NO top-left
|
||||||
if (terminal_names.size() >= 3)
|
if (terminal_names.size() >= 3)
|
||||||
|
painter.drawText(QRectF(16, offset+4, 8, 6),
|
||||||
|
Qt::AlignRight|Qt::AlignTop, terminal_names[2]); // Common right
|
||||||
|
if (terminal_names.size() >= 1)
|
||||||
painter.drawText(QRectF(0, offset+9, 8, 6),
|
painter.drawText(QRectF(0, offset+9, 8, 6),
|
||||||
Qt::AlignLeft|Qt::AlignTop, terminal_names[0]); // 13 NC left-bottom
|
Qt::AlignLeft|Qt::AlignTop, terminal_names[0]); // NC bottom-left
|
||||||
painter.setFont(QETApp::diagramTextsFont(5));
|
painter.setFont(QETApp::diagramTextsFont(5));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user