Add a new cross reference setting per xref type (coil, protection,
commutator, PLC), labelled "Afficher tous les esclaves definis par le
maitre" and persisted as showallconfiguredslaves. When it is enabled,
the contacts display is selected and the master declares contact
groups, the contact comb draws every contact group of the master in the
master's own order, even when no slave is linked to it yet. Masters
without declared contact groups and the option turned off keep the
previous behaviour exactly: linked slaves only, sorted by position.
- XRefProperties: new property stored in the settings and in the
project XML (attribute showallconfiguredslaves, absent means false so
old files are unaffected), included in operator==.
- XRefPropertiesWidget: new checkbox placed after the terminal names
one, enabled only while "Afficher en contacts" is selected; its
enabled state is now also set explicitly when a type is loaded (a
radio button that does not change emits no toggled()).
- For the PLC type the contacts/cross radios, the two display
checkboxes and the cross options group are hidden: a PLC master is
always drawn as its IO table, those settings have no effect there.
Positioning and label settings, which the table really uses, stay.
- CrossRefItem: free slots draw the symbol of the group plus the
terminal names the master defines (pairs swapped for a single pole
NO/NC contact, labels of a changeover contact rotated one step
counter-clockwise), without position text and without hover/click.
Linked slaves keep drawing from their own data at their assigned
group position; links without a group are appended at the end in
position order.
- Xref lifecycle: the item is created and kept without linked slaves
for snap-to-bottom (MasterElement::mustShowXrefWithoutSlave) and for
snap-to-label (DynamicElementTextItem::updateXref and
ElementTextItemGroup::updateXref, which now also run when the element
lands on the scene and re-establish their project connection), so a
freshly placed master shows its comb immediately instead of only
after the next settings change. updateLabel() resets its geometry
when the option is turned off again, so no stale ghost stays.
Two additional bugs found after the initial xref cleanup:
1. Undo after unlink did not restore PLC variables (PLC_TYPE,
PLC_ADDRESS, etc.) because PlcLinkWidget::on_m_unlink_pb_clicked()
never stored the current group index in the LinkElementCommand.
makeLink() only populates PLC fields when group_idx >= 0, so
the slave was re-linked but appeared empty. Fixed by reading the
group index from the master via groupIndexForElement() and calling
setGroupIndex() before unlinking.
2. m_update_slave_Xref_connection was only cleared inside the
if(m_slave_Xref_item) block in the updateXref() cleanup path.
For AlignHCenter (Text field) position, no m_slave_Xref_item
is ever created — the connections are stored in
m_update_slave_Xref_connection but never cleaned up on unlink.
On re-link, the old stale entries prevented new connections from
being established. Fixed by clearing the list unconditionally
in the cleanup path.
clazy is a compiler plugin which allows clang to understand Qt
semantics. You get more than 50 Qt related compiler warnings, ranging
from unneeded memory allocations to misusage of API, including fix-its
for automatic refactoring.
https://invent.kde.org/sdk/clazy
* terminal_strip:
Terminal strip item can saved / loaded to .qet file
See previous commit...
Move terminal strip drawer class in is own file
Fix wrong use of QStringLiteral and QLatin1String
Double click a TerminalStripItem open the editor
Minor change about checkable QAction of QetDiagramEditor
Minor : corrects a minor aesthetic defect when unbridge terminals
Revamp code
Add and move terminal strip item are now managed by undo command
TerminalStripItem : Draw terminal bridge
Terminal strip item can be added to diagram
Minor : add QGIUtility namespace
If the text is wider than the defined width, the text is broken into multiple line.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5220 bfdf4180-ca20-0410-9c96-a3a8aa849046
From now, the class ElementTextItem is not anymore use in qet. Every texts in a diagram are DynamicElementTextItem.
the Xref item was adapted to dynamic text.
Previously, the comment and location, displayed as a "static text" below the "old text" tagged "label" are now automaticaly converted to DynamicElementTextItem, so visually, these texts stay unchanged
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5216 bfdf4180-ca20-0410-9c96-a3a8aa849046
Dynamic element text item editor : Add new entry for edit the alignment, rotation and vertical adjustment of a group
Element Mover : Minor, remove the group texts from the moved content
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5165 bfdf4180-ca20-0410-9c96-a3a8aa849046
The keybord shortcut for texts group alignment change. Now it's ctrl + arrow-left/up/right
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5141 bfdf4180-ca20-0410-9c96-a3a8aa849046