.TH "anonymous_namespace{cli_export.cpp}" 3 "Version 0.200.1-dev" "QElectroTech" \" -*- nroff -*-
.ad l
.nh
.SH NAME
anonymous_namespace{cli_export.cpp}
.SH SYNOPSIS
.br
.PP
.SS "Functions"

.in +1c
.ti -1c
.RI "QTextStream \fBout\fP (stdout)"
.br
.ti -1c
.RI "QTextStream \fBerr\fP (stderr)"
.br
.ti -1c
.RI "const QHash< QString, QString > & \fBexportFlags\fP ()"
.br
.RI "All CLI option flags, mapped to a short format name\&. "
.ti -1c
.RI "QString \fBelementLabel\fP (\fBElement\fP *element)"
.br
.RI "Device tag of an element ("K1", "Q55"), falling back to its name\&. "
.ti -1c
.RI "QRect \fBdiagramRect\fP (\fBDiagram\fP *diagram)"
.br
.RI "Pixel rect of a diagram's border + title block (the printable page area)\&. "
.ti -1c
.RI "QString \fBdiagramStem\fP (\fBDiagram\fP *diagram, int index)"
.br
.RI "A filesystem-safe per-diagram file stem: "01_Title"\&. "
.ti -1c
.RI "void \fBrenderDiagram\fP (\fBDiagram\fP *diagram, QPainter &painter, const QRectF &target, bool showTerminals=false)"
.br
.ti -1c
.RI "int \fBexportPdf\fP (\fBQETProject\fP &project, const QString &output, bool showTerminals=false)"
.br
.ti -1c
.RI "int \fBexportImages\fP (\fBQETProject\fP &project, const QString &format, const QString &out_dir, bool showTerminals=false)"
.br
.ti -1c
.RI "int \fBexportCsv\fP (\fBQETProject\fP &project, const QString &format, const QString &output)"
.br
.ti -1c
.RI "QString \fBcsvField\fP (const QString &value)"
.br
.RI "Quote a field for CSV output (RFC-4180 style, ';' delimiter)\&. "
.ti -1c
.RI "int \fBexportBom\fP (\fBQETProject\fP &project, const QString &output)"
.br
.ti -1c
.RI "int \fBfreeTerminals\fP (\fBElement\fP *element)"
.br
.RI "Count terminals on \fRelement\fP that no conductor connects to\&. "
.ti -1c
.RI "int \fBexportInfo\fP (\fBQETProject\fP &project, const QString &output)"
.br
.ti -1c
.RI "int \fBcheckOneElement\fP (const QString &path)"
.br
.ti -1c
.RI "int \fBcheckElements\fP (const QString &path)"
.br
.RI "Validate a single \&.elmt file or every \&.elmt under a directory\&. "
.ti -1c
.RI "QHash< \fBElement\fP *, int > \fBfolioIndex\fP (\fBQETProject\fP &project)"
.br
.RI "Map every element in the project to its 1-based folio (page) position\&. "
.ti -1c
.RI "int \fBexportNets\fP (\fBQETProject\fP &project, const QString &output)"
.br
.ti -1c
.RI "int \fBexportLinks\fP (\fBQETProject\fP &project, const QString &output)"
.br
.ti -1c
.RI "int \fBresaveProject\fP (\fBQETProject\fP &project, const QString &output)"
.br
.ti -1c
.RI "int \fBsetTitleBlock\fP (\fBQETProject\fP &project, const QString &output, const QStringList &assignments)"
.br
.in -1c
.SH "Function Documentation"
.PP 
.SS "int anonymous_namespace{cli_export\&.cpp}::checkElements (const QString & path)"

.PP
Validate a single \&.elmt file or every \&.elmt under a directory\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::checkOneElement (const QString & path)"
Validate one \&.elmt file against \fBQET\fP's element schema\&. 
.PP
\fBReturns\fP
.RS 4
0 = OK, 1 = warning (loads but suspicious), 2 = failure\&. 
.RE
.PP

.SS "QString anonymous_namespace{cli_export\&.cpp}::csvField (const QString & value)"

.PP
Quote a field for CSV output (RFC-4180 style, ';' delimiter)\&. 
.SS "QRect anonymous_namespace{cli_export\&.cpp}::diagramRect (\fBDiagram\fP * diagram)"

.PP
Pixel rect of a diagram's border + title block (the printable page area)\&. 
.SS "QString anonymous_namespace{cli_export\&.cpp}::diagramStem (\fBDiagram\fP * diagram, int index)"

.PP
A filesystem-safe per-diagram file stem: "01_Title"\&. 
.SS "QString anonymous_namespace{cli_export\&.cpp}::elementLabel (\fBElement\fP * element)"

.PP
Device tag of an element ("K1", "Q55"), falling back to its name\&. 
.SS "QTextStream anonymous_namespace{cli_export\&.cpp}::err (stderr )"

.SS "int anonymous_namespace{cli_export\&.cpp}::exportBom (\fBQETProject\fP & project, const QString & output)"
Bill of materials: one row per element, key component-data fields\&. Pulls from \fBQET\fP's own project database (the same source as the GUI BOM export), so the output matches what the editor produces\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::exportCsv (\fBQETProject\fP & project, const QString & format, const QString & output)"

.SS "const QHash< QString, QString > & anonymous_namespace{cli_export\&.cpp}::exportFlags ()"

.PP
All CLI option flags, mapped to a short format name\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::exportImages (\fBQETProject\fP & project, const QString & format, const QString & out_dir, bool showTerminals = \fRfalse\fP)"

.SS "int anonymous_namespace{cli_export\&.cpp}::exportInfo (\fBQETProject\fP & project, const QString & output)"
Structural ground-truth dump of a project, as JSON, to stdout (or a file)\&. Uses \fBQET\fP's own loaded model, so it reports what the editor actually sees: per-page element / conductor counts and unconnected terminals\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::exportLinks (\fBQETProject\fP & project, const QString & output)"
Cross-references: each linkable element (coil / contact / report) and the elements it links to, flagging masters/slaves with no link as unresolved\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::exportNets (\fBQETProject\fP & project, const QString & output)"
Electrical nets: groups of terminals joined into one potential\&. Walks \fBQET\fP's own potential graph, so each net is a connected component of terminals across all folios\&. The ground truth for connectivity\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::exportPdf (\fBQETProject\fP & project, const QString & output, bool showTerminals = \fRfalse\fP)"

.SS "QHash< \fBElement\fP *, int > anonymous_namespace{cli_export\&.cpp}::folioIndex (\fBQETProject\fP & project)"

.PP
Map every element in the project to its 1-based folio (page) position\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::freeTerminals (\fBElement\fP * element)"

.PP
Count terminals on \fRelement\fP that no conductor connects to\&. 
.SS "QTextStream anonymous_namespace{cli_export\&.cpp}::out (stdout )"

.SS "void anonymous_namespace{cli_export\&.cpp}::renderDiagram (\fBDiagram\fP * diagram, QPainter & painter, const QRectF & target, bool showTerminals = \fRfalse\fP)"
Render \fRdiagram\fP into \fRpainter\fP, fitting \fRtarget\fP to the page rect\&. \fRshowTerminals:\fP paint terminal markers (red stroke + blue docking dot) and terminal names, as the interactive editor does\&. Off by default — \fBTerminal::paint()\fP draws them whenever the diagram's drawTerminals()/drawTerminalNames() flags are set (default true, so headless export used to ship them as editor UI); the GUI export dialog already defaults to clearing them via \fBDiagram::applyProperties()\fP\&. Pass true (--show-terminals) to keep them, e\&.g\&. to visually debug an unconnected pin\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::resaveProject (\fBQETProject\fP & project, const QString & output)"
Round-trip: load the project and write its XML back out, so an external diff can reveal markup \fBQET\fP silently normalises (tolerated-but-invalid XML)\&. 
.SS "int anonymous_namespace{cli_export\&.cpp}::setTitleBlock (\fBQETProject\fP & project, const QString & output, const QStringList & assignments)"
Stamp title-block fields onto every folio (and the project default), then save\&. Each assignment is "key=value"\&. Standard keys map to the documented title-block fields; "date=today" uses the current date; any other key is stored as a custom title-block field\&. Aimed at CI/revision workflows (e\&.g\&. set revision + date before exporting a new revision)\&. 
.SH "Author"
.PP 
Generated automatically by Doxygen for QElectroTech from the source code\&.
