[qet] qet/qet: [5719] forget file from previous commit

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


Revision: 5719
Author:   blacksun
Date:     2019-01-27 18:06:38 +0100 (Sun, 27 Jan 2019)
Log Message:
-----------
forget file from previous commit

Modified Paths:
--------------
    trunk/sources/conductorautonumerotation.cpp
    trunk/sources/conductorautonumerotation.h

Modified: trunk/sources/conductorautonumerotation.cpp
===================================================================
--- trunk/sources/conductorautonumerotation.cpp	2019-01-27 17:04:13 UTC (rev 5718)
+++ trunk/sources/conductorautonumerotation.cpp	2019-01-27 17:06:38 UTC (rev 5719)
@@ -100,6 +100,30 @@
 }
 
 /**
+ * @brief ConductorAutoNumerotation::newProperties
+ * Create a new properties according to the current autonum rule of diagram
+ * @param d
+ * @param cp
+ * @param seq
+ */
+void ConductorAutoNumerotation::newProperties(Diagram *diagram, ConductorProperties &cp, autonum::sequentialNumbers &seq)
+{	
+	NumerotationContext context = diagram->project()->conductorAutoNum(diagram->conductorsAutonumName());
+	if (context.isEmpty()) {
+		return;
+	}
+
+	QString autoNum_name = diagram->project()->conductorCurrentAutoNum();
+	QString formula = autonum::numerotationContextToFormula(context);
+	cp.m_formula = formula;
+
+	autonum::setSequential(formula, seq, context, diagram, autoNum_name);
+
+	NumerotationContextCommands ncc (context, diagram);
+	diagram->project()->addConductorAutoNum(autoNum_name, ncc.next());
+}
+
+/**
  * @brief ConductorAutoNumerotation::numeratePotential
  * Numerate a conductor on an existing potential
  */

Modified: trunk/sources/conductorautonumerotation.h
===================================================================
--- trunk/sources/conductorautonumerotation.h	2019-01-27 17:04:13 UTC (rev 5718)
+++ trunk/sources/conductorautonumerotation.h	2019-01-27 17:06:38 UTC (rev 5719)
@@ -19,10 +19,12 @@
 #define CONDUCTORAUTONUMEROTATION_H
 
 #include <QList>
+#include "assignvariables.h"
 
 class Diagram;
 class Conductor;
 class QUndoCommand;
+class ConductorProperties;
 
 class ConductorAutoNumerotation
 {
@@ -33,6 +35,7 @@
 			//methods
 		void        numerate       ();
 		void        applyText      (const QString&);
+		static void newProperties(Diagram *diagram, ConductorProperties &cp, autonum::sequentialNumbers &seq);
 
 	private:
 			//methods


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