QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
anonymous_namespace{cli_export.cpp} Namespace Reference

Functions

QTextStream out (stdout)
QTextStream err (stderr)
const QHash< QString, QString > & exportFlags ()
 All CLI option flags, mapped to a short format name.
QString elementLabel (Element *element)
 Device tag of an element ("K1", "Q55"), falling back to its name.
QRect diagramRect (Diagram *diagram)
 Pixel rect of a diagram's border + title block (the printable page area).
QString diagramStem (Diagram *diagram, int index)
 A filesystem-safe per-diagram file stem: "01_Title".
void renderDiagram (Diagram *diagram, QPainter &painter, const QRectF &target, bool showTerminals=false)
int exportPdf (QETProject &project, const QString &output, bool showTerminals=false)
int exportImages (QETProject &project, const QString &format, const QString &out_dir, bool showTerminals=false)
int exportCsv (QETProject &project, const QString &format, const QString &output)
QString csvField (const QString &value)
 Quote a field for CSV output (RFC-4180 style, ';' delimiter).
int exportBom (QETProject &project, const QString &output)
int freeTerminals (Element *element)
 Count terminals on element that no conductor connects to.
int exportInfo (QETProject &project, const QString &output)
int checkOneElement (const QString &path)
int checkElements (const QString &path)
 Validate a single .elmt file or every .elmt under a directory.
QHash< Element *, int > folioIndex (QETProject &project)
 Map every element in the project to its 1-based folio (page) position.
int exportNets (QETProject &project, const QString &output)
int exportLinks (QETProject &project, const QString &output)
int resaveProject (QETProject &project, const QString &output)
int setTitleBlock (QETProject &project, const QString &output, const QStringList &assignments)

Function Documentation

◆ checkElements()

int anonymous_namespace{cli_export.cpp}::checkElements ( const QString & path)

Validate a single .elmt file or every .elmt under a directory.

Here is the call graph for this function:

◆ checkOneElement()

int anonymous_namespace{cli_export.cpp}::checkOneElement ( const QString & path)

Validate one .elmt file against QET's element schema.

Returns
0 = OK, 1 = warning (loads but suspicious), 2 = failure.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ csvField()

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

Quote a field for CSV output (RFC-4180 style, ';' delimiter).

Here is the caller graph for this function:

◆ diagramRect()

QRect anonymous_namespace{cli_export.cpp}::diagramRect ( Diagram * diagram)

Pixel rect of a diagram's border + title block (the printable page area).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ diagramStem()

QString anonymous_namespace{cli_export.cpp}::diagramStem ( Diagram * diagram,
int index )

A filesystem-safe per-diagram file stem: "01_Title".

Here is the call graph for this function:
Here is the caller graph for this function:

◆ elementLabel()

QString anonymous_namespace{cli_export.cpp}::elementLabel ( Element * element)

Device tag of an element ("K1", "Q55"), falling back to its name.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ err()

QTextStream anonymous_namespace{cli_export.cpp}::err ( stderr )
Here is the caller graph for this function:

◆ exportBom()

int anonymous_namespace{cli_export.cpp}::exportBom ( QETProject & project,
const QString & output )

Bill of materials: one row per element, key component-data fields. Pulls from QET's own project database (the same source as the GUI BOM export), so the output matches what the editor produces.

Here is the call graph for this function:

◆ exportCsv()

int anonymous_namespace{cli_export.cpp}::exportCsv ( QETProject & project,
const QString & format,
const QString & output )
Here is the call graph for this function:

◆ exportFlags()

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

All CLI option flags, mapped to a short format name.

◆ exportImages()

int anonymous_namespace{cli_export.cpp}::exportImages ( QETProject & project,
const QString & format,
const QString & out_dir,
bool showTerminals = false )
Here is the call graph for this function:

◆ exportInfo()

int anonymous_namespace{cli_export.cpp}::exportInfo ( QETProject & project,
const QString & output )

Structural ground-truth dump of a project, as JSON, to stdout (or a file). Uses QET's own loaded model, so it reports what the editor actually sees: per-page element / conductor counts and unconnected terminals.

Here is the call graph for this function:

◆ exportLinks()

int anonymous_namespace{cli_export.cpp}::exportLinks ( QETProject & 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.

Here is the call graph for this function:

◆ exportNets()

int anonymous_namespace{cli_export.cpp}::exportNets ( QETProject & project,
const QString & output )

Electrical nets: groups of terminals joined into one potential. Walks QET's own potential graph, so each net is a connected component of terminals across all folios. The ground truth for connectivity.

Here is the call graph for this function:

◆ exportPdf()

int anonymous_namespace{cli_export.cpp}::exportPdf ( QETProject & project,
const QString & output,
bool showTerminals = false )
Here is the call graph for this function:

◆ folioIndex()

QHash< Element *, int > anonymous_namespace{cli_export.cpp}::folioIndex ( QETProject & project)

Map every element in the project to its 1-based folio (page) position.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeTerminals()

int anonymous_namespace{cli_export.cpp}::freeTerminals ( Element * element)

Count terminals on element that no conductor connects to.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ out()

QTextStream anonymous_namespace{cli_export.cpp}::out ( stdout )
Here is the caller graph for this function:

◆ renderDiagram()

void anonymous_namespace{cli_export.cpp}::renderDiagram ( Diagram * diagram,
QPainter & painter,
const QRectF & target,
bool showTerminals = false )

Render diagram into painter, fitting target to the page rect. showTerminals: paint terminal markers (red stroke + blue docking dot) and terminal names, as the interactive editor does. Off by default — Terminal::paint() 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 Diagram::applyProperties(). Pass true (–show-terminals) to keep them, e.g. to visually debug an unconnected pin.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resaveProject()

int anonymous_namespace{cli_export.cpp}::resaveProject ( QETProject & project,
const QString & output )

Round-trip: load the project and write its XML back out, so an external diff can reveal markup QET silently normalises (tolerated-but-invalid XML).

Here is the call graph for this function:

◆ setTitleBlock()

int anonymous_namespace{cli_export.cpp}::setTitleBlock ( QETProject & 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).

Here is the call graph for this function: