mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-15 01:54:14 +02:00
Merge master into feat/qetz-db-truth-v2
The .qetz files take this branch's side: it already holds #1473, and adds the folio parts to join(). qetscriptapi.cpp: #1456 gave setConductorProperty() the voltage that crosses a function separated terminal element; here that function hands its work to applyConductorProperties(), so the change goes there, with the properties captured before the pushes. The database path for folios not built already gives up at such a terminal, so it builds the folio and takes the same route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -283,7 +283,8 @@ int exportPdf(QETProject &project, const QString &output,
|
||||
}
|
||||
|
||||
int exportImages(QETProject &project, const QString &format,
|
||||
const QString &out_dir, bool showTerminals = false)
|
||||
const QString &out_dir, bool showTerminals = false,
|
||||
bool svgSmallPictures = false)
|
||||
{
|
||||
const QList<Diagram *> diagrams = project.diagrams();
|
||||
if (diagrams.isEmpty()) {
|
||||
@@ -306,8 +307,10 @@ int exportImages(QETProject &project, const QString &format,
|
||||
gen.setViewBox(QRect(0, 0, r.width(), r.height()));
|
||||
gen.setTitle(diagram->title());
|
||||
QPainter painter(&gen);
|
||||
diagram->setSmallPictures(svgSmallPictures);
|
||||
renderDiagram(diagram, painter, QRectF(QPointF(0, 0), r.size()),
|
||||
showTerminals);
|
||||
diagram->setSmallPictures(false);
|
||||
painter.end();
|
||||
} else { // png
|
||||
QImage image(r.size(), QImage::Format_ARGB32);
|
||||
@@ -1012,6 +1015,7 @@ int run(const QStringList &args)
|
||||
const bool showTerminals = filtered.removeAll("--show-terminals") > 0;
|
||||
const bool dxfBlocks = filtered.removeAll("--dxf-blocks") > 0;
|
||||
const bool dxfAttributes = filtered.removeAll("--dxf-attributes") > 0;
|
||||
const bool svgSmallPictures = filtered.removeAll("--svg-small-pictures") > 0;
|
||||
// --no-slaves and --no-junctions leave rows out of --export-bom.
|
||||
const bool includeSlaves = filtered.removeAll("--no-slaves") == 0;
|
||||
const bool includeJunctions = filtered.removeAll("--no-junctions") == 0;
|
||||
@@ -1083,7 +1087,8 @@ int run(const QStringList &args)
|
||||
return resaveProject(project, output);
|
||||
if (format == "settb")
|
||||
return setTitleBlock(project, output, rest.mid(2));
|
||||
return exportImages(project, format, output, showTerminals);
|
||||
return exportImages(project, format, output, showTerminals,
|
||||
svgSmallPictures);
|
||||
}
|
||||
|
||||
} // namespace CLIExport
|
||||
|
||||
Reference in New Issue
Block a user