mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
forget file from previous commit
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5719 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
parent
0db73abd41
commit
13520e9f70
@ -99,6 +99,30 @@ void ConductorAutoNumerotation::applyText(const QString& t)
|
||||
m_diagram->undoStack().push(undo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
|
@ -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 @@ class ConductorAutoNumerotation
|
||||
//methods
|
||||
void numerate ();
|
||||
void applyText (const QString&);
|
||||
static void newProperties(Diagram *diagram, ConductorProperties &cp, autonum::sequentialNumbers &seq);
|
||||
|
||||
private:
|
||||
//methods
|
||||
|
Loading…
x
Reference in New Issue
Block a user