mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-09 21:54:13 +02:00
Merge pull request #1399 from IBSYSLevi/feature/information-fields-visibility
Show all element information fields for terminals
This commit is contained in:
@@ -437,16 +437,3 @@ QStringList QETInformation::elementEditorElementInfoKeys()
|
|||||||
ELMT_UNITY_AUX4 };
|
ELMT_UNITY_AUX4 };
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList QETInformation::terminalElementInfoKeys()
|
|
||||||
{
|
|
||||||
QStringList list = { ELMT_FORMULA,
|
|
||||||
ELMT_LABEL,
|
|
||||||
ELMT_COMMENT,
|
|
||||||
ELMT_DESIGNATION,
|
|
||||||
ELMT_MANUFACTURER,
|
|
||||||
ELMT_MANUFACTURER_REF,
|
|
||||||
ELMT_MACHINE_MANUFACTURER_REF,
|
|
||||||
ELMT_SUPPLIER };
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -184,8 +184,6 @@ namespace QETInformation
|
|||||||
State validate(QString &input, int &pos) const override;
|
State validate(QString &input, int &pos) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QStringList terminalElementInfoKeys();
|
|
||||||
|
|
||||||
QString infoToVar(const QString &info);
|
QString infoToVar(const QString &info);
|
||||||
QString translatedInfoKey(const QString &info);
|
QString translatedInfoKey(const QString &info);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -285,12 +285,7 @@ void ElementInfoWidget::disableLiveEdit()
|
|||||||
*/
|
*/
|
||||||
void ElementInfoWidget::buildInterface()
|
void ElementInfoWidget::buildInterface()
|
||||||
{
|
{
|
||||||
QStringList keys;
|
QStringList keys = QETInformation::elementInfoKeys();
|
||||||
if (m_element.data()->elementData().m_type == ElementData::Terminal) {
|
|
||||||
keys = QETInformation::terminalElementInfoKeys();
|
|
||||||
} else {
|
|
||||||
keys = QETInformation::elementInfoKeys();
|
|
||||||
}
|
|
||||||
|
|
||||||
//"exclude_from_bom" is part of elementInfoKeys() because the project
|
//"exclude_from_bom" is part of elementInfoKeys() because the project
|
||||||
//database builds the element_info table from that list, but it is not
|
//database builds the element_info table from that list, but it is not
|
||||||
@@ -354,9 +349,7 @@ void ElementInfoWidget::buildInterface()
|
|||||||
*/
|
*/
|
||||||
QStringList ElementInfoWidget::predefinedKeys() const
|
QStringList ElementInfoWidget::predefinedKeys() const
|
||||||
{
|
{
|
||||||
QStringList keys = (m_element.data()->elementData().m_type == ElementData::Terminal)
|
QStringList keys = QETInformation::elementInfoKeys();
|
||||||
? QETInformation::terminalElementInfoKeys()
|
|
||||||
: QETInformation::elementInfoKeys();
|
|
||||||
|
|
||||||
keys << QETInformation::ELMT_FORMULA_ID
|
keys << QETInformation::ELMT_FORMULA_ID
|
||||||
<< QStringLiteral("auto_num_locked")
|
<< QStringLiteral("auto_num_locked")
|
||||||
|
|||||||
Reference in New Issue
Block a user