diff --git a/sources/autoNum/assignvariables.cpp b/sources/autoNum/assignvariables.cpp index b89d02aca..b6a4c16bb 100644 --- a/sources/autoNum/assignvariables.cpp +++ b/sources/autoNum/assignvariables.cpp @@ -167,6 +167,7 @@ namespace autonum QString str = formula; str.replace("%{label}", dc.value("label").toString()); str.replace("%{comment}", dc.value("comment").toString()); + str.replace("%{description}", dc.value("description").toString()); str.replace("%{designation}", dc.value("designation").toString()); str.replace("%{manufacturer}", dc.value("manufacturer").toString()); str.replace("%{manufacturer-reference}", dc.value("manufacturer-reference").toString()); diff --git a/sources/diagramcontext.h b/sources/diagramcontext.h index 5af5fbeaf..88caba05b 100644 --- a/sources/diagramcontext.h +++ b/sources/diagramcontext.h @@ -34,6 +34,7 @@ * label -> label or identification of element * formula -> formula used to create the label (formula is make with variable) * designation -> exhaustive comment used to explain what the element does. + * description -> exhaustive description used to explain what the element does. * comment -> a little comment wich can be displayed in the folio * manufacturer -> the manufacturer of the element * manufacturer-reference -> the manufacturer reference of the element diff --git a/sources/editor/ui/elementpropertieseditorwidget.cpp b/sources/editor/ui/elementpropertieseditorwidget.cpp index b8b9f148d..7814b0249 100644 --- a/sources/editor/ui/elementpropertieseditorwidget.cpp +++ b/sources/editor/ui/elementpropertieseditorwidget.cpp @@ -152,7 +152,7 @@ void ElementPropertiesEditorWidget::updateTree() */ void ElementPropertiesEditorWidget::populateTree() { - QStringList keys{"label", "comment", "designation", "manufacturer", "manufacturer-reference", "machine-manufacturer-reference"}; + QStringList keys{"label", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "machine-manufacturer-reference"}; for(QString key : keys) { diff --git a/sources/nomenclature.cpp b/sources/nomenclature.cpp index 0d44e51fd..0cc8b4719 100644 --- a/sources/nomenclature.cpp +++ b/sources/nomenclature.cpp @@ -91,6 +91,7 @@ QString nomenclature::getNomenclature() ""+ QObject::tr("Position") +";" ""+ QObject::tr("Label") +";" ""+ QObject::tr("Désignation") +";" + ""+ QObject::tr("Description") +";" ""+ QObject::tr("Commentaire") +";" ""+ QObject::tr("Fabricant") +";" ""+ QObject::tr("Reference") +";" @@ -147,6 +148,7 @@ QString nomenclature::getElementInfo(Element *elmt) { info += elmt-> diagram()-> convertPosition(elmt -> scenePos()).toString() + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["label"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["designation"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; + info += autonum::AssignVariables::formulaToLabel(elmt_info["description"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["comment"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer-reference"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index 9c6ef0d12..9d84a0e3b 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -284,6 +284,7 @@ QStringList QETApp::elementInfoKeys() info_list << "formula" << "label" << "comment" + << "description" << "designation" << "manufacturer" << "manufacturer-reference" @@ -307,6 +308,7 @@ QString QETApp::elementTranslatedInfoKey(const QString &info) if (info == "formula") return tr("formule du label"); else if (info == "label") return tr("Label"); else if (info == "comment") return tr("Commentaire"); + else if (info == "descrition") return tr("Descrition"); else if (info == "designation") return tr("Désignation"); else if (info == "manufacturer") return tr("Fabricant"); else if (info == "manufacturer-reference") return tr("Référence fabricant"); @@ -330,6 +332,7 @@ QString QETApp::elementInfoToVar(const QString &info) if (info == "formula") return QString("%{formula}"); else if (info == "label") return QString("%{label}"); else if (info == "comment") return QString("%{comment}"); + else if (info == "description") return QString("%{description}"); else if (info == "designation") return QString("%{designation}"); else if (info == "manufacturer") return QString("%{manufacturer}"); else if (info == "manufacturer-reference") return QString("%{manufacturer-reference}");