[qet] qet/qet: [5059] Add new description field

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 5059
Author:   scorpio810
Date:     2017-10-02 18:59:53 +0200 (Mon, 02 Oct 2017)
Log Message:
-----------
Add new description field

Modified Paths:
--------------
    trunk/sources/autoNum/assignvariables.cpp
    trunk/sources/diagramcontext.h
    trunk/sources/editor/ui/elementpropertieseditorwidget.cpp
    trunk/sources/nomenclature.cpp
    trunk/sources/qetapp.cpp

Modified: trunk/sources/autoNum/assignvariables.cpp
===================================================================
--- trunk/sources/autoNum/assignvariables.cpp	2017-10-02 14:46:26 UTC (rev 5058)
+++ trunk/sources/autoNum/assignvariables.cpp	2017-10-02 16:59:53 UTC (rev 5059)
@@ -167,6 +167,7 @@
 		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());

Modified: trunk/sources/diagramcontext.h
===================================================================
--- trunk/sources/diagramcontext.h	2017-10-02 14:46:26 UTC (rev 5058)
+++ trunk/sources/diagramcontext.h	2017-10-02 16:59:53 UTC (rev 5059)
@@ -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

Modified: trunk/sources/editor/ui/elementpropertieseditorwidget.cpp
===================================================================
--- trunk/sources/editor/ui/elementpropertieseditorwidget.cpp	2017-10-02 14:46:26 UTC (rev 5058)
+++ trunk/sources/editor/ui/elementpropertieseditorwidget.cpp	2017-10-02 16:59:53 UTC (rev 5059)
@@ -152,7 +152,7 @@
  */
 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)
 	{

Modified: trunk/sources/nomenclature.cpp
===================================================================
--- trunk/sources/nomenclature.cpp	2017-10-02 14:46:26 UTC (rev 5058)
+++ trunk/sources/nomenclature.cpp	2017-10-02 16:59:53 UTC (rev 5059)
@@ -91,6 +91,7 @@
 	""+ 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 @@
 	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) + ";";

Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp	2017-10-02 14:46:26 UTC (rev 5058)
+++ trunk/sources/qetapp.cpp	2017-10-02 16:59:53 UTC (rev 5059)
@@ -284,6 +284,7 @@
 	info_list << "formula"
 			  << "label"
 			  << "comment"
+			  << "description"
 			  << "designation"
 			  << "manufacturer"
 			  << "manufacturer-reference"
@@ -307,6 +308,7 @@
 	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 @@
 	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}");


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/