[qet] qet/qet: [5626] Add new fields "Quantity, Unity" onproperties of the selection widget

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


Revision: 5626
Author:   scorpio810
Date:     2018-12-02 16:54:08 +0100 (Sun, 02 Dec 2018)
Log Message:
-----------
Add new fields "Quantity, Unity" onproperties of the selection widget
and for csv export

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	2018-12-01 20:12:24 UTC (rev 5625)
+++ trunk/sources/autoNum/assignvariables.cpp	2018-12-02 15:54:08 UTC (rev 5626)
@@ -184,6 +184,8 @@
 		str.replace("%{manufacturer}", dc.value("manufacturer").toString());
 		str.replace("%{manufacturer-reference}", dc.value("manufacturer-reference").toString());
 		str.replace("%{provider}", dc.value("provider").toString());
+		str.replace("%{quantity}", dc.value("quantity").toString());
+		str.replace("%{unity}", dc.value("unity").toString());
 		str.replace("%{auxiliary1}", dc.value("auxiliary1").toString());
 		str.replace("%{auxiliary2}", dc.value("auxiliary2").toString());
 		str.replace("%{machine-manufacturer-reference}", dc.value("machine-manufacturer-reference").toString());

Modified: trunk/sources/diagramcontext.h
===================================================================
--- trunk/sources/diagramcontext.h	2018-12-01 20:12:24 UTC (rev 5625)
+++ trunk/sources/diagramcontext.h	2018-12-02 15:54:08 UTC (rev 5626)
@@ -38,6 +38,8 @@
  * 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
+ * quantity                       -> quantity of the element
+ * unity                          -> unity of the element
  * auxiliary1                     -> auxiliary 1 of element
  * auxiliary2                     -> auxiliary 2 of element
  * machine-manufacturer-reference -> reference of the manufacturer machine

Modified: trunk/sources/editor/ui/elementpropertieseditorwidget.cpp
===================================================================
--- trunk/sources/editor/ui/elementpropertieseditorwidget.cpp	2018-12-01 20:12:24 UTC (rev 5625)
+++ trunk/sources/editor/ui/elementpropertieseditorwidget.cpp	2018-12-02 15:54:08 UTC (rev 5626)
@@ -152,7 +152,7 @@
  */
 void ElementPropertiesEditorWidget::populateTree()
 {
-	QStringList keys{"label", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "provider", "machine-manufacturer-reference"};
+	QStringList keys{"label", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "provider", "quantity", "unity", "machine-manufacturer-reference"};
 	
 	for(const QString& key : keys)
 	{

Modified: trunk/sources/nomenclature.cpp
===================================================================
--- trunk/sources/nomenclature.cpp	2018-12-01 20:12:24 UTC (rev 5625)
+++ trunk/sources/nomenclature.cpp	2018-12-02 15:54:08 UTC (rev 5626)
@@ -96,7 +96,9 @@
     ""+ QObject::tr("I001") +";"      //:Don't translate this text!    //ID for comment
     ""+ QObject::tr("J001") +";"      //:Don't translate this text!    //ID for manufacturer
     ""+ QObject::tr("K001") +";"      //:Don't translate this text!    //ID for article number
-    ""+ QObject::tr("L001") +";"      //:Don't translate this text!    //ID for supplier
+    ""+ QObject::tr("L001") +";"      //:Don't translate this text!    //ID for quantity
+    ""+ QObject::tr("L002") +";"      //:Don't translate this text!    //ID for Unity
+    ""+ QObject::tr("L003") +";"      //:Don't translate this text!    //ID for supplier
     ""+ QObject::tr("M001") +";"      //:Don't translate this text!    //ID for auxiliary field 1
     ""+ QObject::tr("M002") +";"      //:Don't translate this text!    //ID for auciliary field 2
     ""+ QObject::tr("N001")+";"       //:Don't translate this text!    //ID for internal number
@@ -115,6 +117,8 @@
 	""+ QObject::tr("Fabricant") +";"
 	""+ QObject::tr("Reference Fabricant") +";"
 	""+ QObject::tr("Fournisseur") +";"
+	""+ QObject::tr("Quantité") +";"
+	""+ QObject::tr("Unité") +";"
 	""+ QObject::tr("Bloc auxiliaire 1") +";"
 	""+ QObject::tr("Bloc auxiliaire 2") +";"
 	""+ QObject::tr("Machine-reference") +";"
@@ -174,6 +178,8 @@
 	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) + ";";
 	info += autonum::AssignVariables::formulaToLabel(elmt_info["provider"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
+	info += autonum::AssignVariables::formulaToLabel(elmt_info["quantity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
+	info += autonum::AssignVariables::formulaToLabel(elmt_info["unity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
 	info += autonum::AssignVariables::formulaToLabel(elmt_info["auxiliary1"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
 	info += autonum::AssignVariables::formulaToLabel(elmt_info["auxiliary2"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";
 	info += autonum::AssignVariables::formulaToLabel(elmt_info["machine-manufacturer-reference"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";";

Modified: trunk/sources/qetapp.cpp
===================================================================
--- trunk/sources/qetapp.cpp	2018-12-01 20:12:24 UTC (rev 5625)
+++ trunk/sources/qetapp.cpp	2018-12-02 15:54:08 UTC (rev 5626)
@@ -300,6 +300,8 @@
 			  << "manufacturer"
 			  << "manufacturer-reference"
 			  << "provider"
+			  << "quantity"
+			  << "unity"
 			  << "auxiliary1"
 			  << "auxiliary2"
 			  << "machine-manufacturer-reference"
@@ -326,6 +328,8 @@
 	else if (info == "manufacturer") return tr("Fabricant");
 	else if (info == "manufacturer-reference") return tr("Numéro de commande");
 	else if (info == "provider") return tr("Fournisseur");
+	else if (info == "quantity") return tr("Quantité");
+	else if (info == "unity") return tr("Unité");
 	else if (info == "auxiliary1") return tr("Bloc auxiliaire 1");
 	else if (info == "auxiliary2") return tr("Bloc auxiliaire 2");
 	else if (info == "machine-manufacturer-reference") return tr("Numéro interne");
@@ -351,6 +355,8 @@
 	else if (info == "manufacturer")                   return QString("%{manufacturer}");
 	else if (info == "manufacturer-reference")         return QString("%{manufacturer-reference}");
 	else if (info == "provider")                       return QString("%{provider}");
+	else if (info == "quantity")                       return QString("%{quantity}");
+	else if (info == "unity")                          return QString("%{unity}");
 	else if (info == "auxiliary1")                     return QString("%{auxiliary1}");
 	else if (info == "auxiliary2")                     return QString("%{auxiliary2}");
 	else if (info == "machine-manufacturer-reference") return QString("%{machine-manufacturer-reference}");


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