.TH "DiagramSortKeys" 3 "Version 0.200.1-dev" "QElectroTech" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DiagramSortKeys
.SH SYNOPSIS
.br
.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "QString \fBcoordinateKey\fP (double v)"
.br
.ti -1c
.RI "QString \fBpositionKey\fP (const QPointF &pos)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Sort-key helpers used by \fBDiagram::toXml()\fP to serialize elements and conductors in a deterministic order\&. Pulled into their own header (instead of an anonymous namespace in \fBdiagram\&.cpp\fP) so they can be unit-tested directly -- see tests/qttest/tst_diagramsortkeys\&.cpp\&. 
.SH "Function Documentation"
.PP 
.SS "QString DiagramSortKeys::coordinateKey (double v)\fR [inline]\fP"
Format a coordinate as a string that sorts the same way the number does\&. Plain fixed-precision formatting ("%\&.4f") does NOT do this -- e\&.g\&. "15\&.0000" sorts before "5\&.0000" as text even though 15 > 5 -- so shift into a non-negative range and zero-pad to a fixed width before comparing\&. 
.SS "QString DiagramSortKeys::positionKey (const QPointF & pos)\fR [inline]\fP"

.SH "Author"
.PP 
Generated automatically by Doxygen for QElectroTech from the source code\&.
