Terminal sections: show the AWG equivalent in the section lists
Linux build and tests / Build and test (Qt 6, Debug) (push) Failing after 1m42s

The section combo boxes of the terminal strip editor and of the
element editor now show the nearest AWG / kcmil size next to the
section in mm2, for example "2.5 mm² (AWG 14)".

The correspondence is approximate (the two systems don't have the
same steps) and is stored in TerminalCatalog::awgForSection().
The stored value is unchanged (terminal_section, in mm2).
This commit is contained in:
Laurent Trinques
2026-10-16 07:57:00 +02:00
parent 5cbc1c4b8d
commit 5e28ec4246
3 changed files with 52 additions and 3 deletions
@@ -440,7 +440,9 @@ void ElementPropertiesEditorWidget::populateTerminalSizeCombos(double section, d
ui->m_terminal_section_cb->clear();
ui->m_terminal_section_cb->addItem(tr("None (default)"), 0.0);
for (const auto section_ : TerminalCatalog::sections()) {
ui->m_terminal_section_cb->addItem(tr("%1 mm²").arg(QLocale().toString(section_, 'g', 6)), section_);
ui->m_terminal_section_cb->addItem(
TerminalCatalog::sectionText(section_, tr("%1 mm²").arg(QLocale().toString(section_, 'g', 6))),
section_);
}
setComboValue(ui->m_terminal_section_cb, section, tr(" mm²"));