Revert "Revert "Add terminalStripModel class""

This reverts commit 4615e6d060.
This commit is contained in:
joshua
2021-09-10 23:30:49 +02:00
parent 374805d6ab
commit 895417c98c
11 changed files with 325 additions and 23 deletions

View File

@@ -339,6 +339,22 @@ ElementData::TerminalType ElementData::terminalTypeFromString(const QString &str
return ElementData::TTGeneric;
}
QString ElementData::translatedTerminalType(ElementData::TerminalType type)
{
switch (type) {
case ElementData::TTGeneric :
return QObject::tr("generique", "generic terminal element type");
case ElementData::TTFuse :
return QObject::tr("fusible", "fuse terminal element type");
case ElementData::TTSectional:
return QObject::tr("sectionable", "sectional terminal element type");
case ElementData::TTDiode:
return QObject::tr("diode", "diode terminal element type");
case ElementData::TTGround:
return QObject::tr("terre", "ground terminal element type");
}
}
QString ElementData::terminalFunctionToString(ElementData::TerminalFunction function)
{
switch (function) {