QElectroTech  0.70
conductorautonumerotation.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2014 The QElectroTech team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef CONDUCTORAUTONUMEROTATION_H
19 #define CONDUCTORAUTONUMEROTATION_H
20 
21 #include <QList>
22 #include "assignvariables.h"
23 
24 class Diagram;
25 class Conductor;
26 class QUndoCommand;
28 
30 {
31  public:
32  //constructors & destructor
33  ConductorAutoNumerotation (Conductor *conductor, Diagram *diagram, QUndoCommand *undo_parent = nullptr);
34 
35  //methods
36  void numerate ();
37  void applyText (const QString&);
39 
40  private:
41  //methods
42  void numeratePotential ();
43  void numerateNewConductor ();
44 
45  //attributes
48  QList <Conductor *> conductor_list;
49  QUndoCommand *m_parent_undo;
50 };
51 
52 #endif // CONDUCTORAUTONUMEROTATION_H
void numerateNewConductor()
ConductorAutoNumerotation::numerateNewConductor create and apply a new numerotation to ...
static void newProperties(Diagram *diagram, ConductorProperties &cp, autonum::sequentialNumbers &seq)
ConductorAutoNumerotation::newProperties Create a new properties according to the current autonum rul...
void numeratePotential()
ConductorAutoNumerotation::numeratePotential Numerate a conductor on an existing potential.
void applyText(const QString &)
ConductorAutoNumerotation::applyText apply the text to and all conductors at the same potential...
void numerate()
ConductorAutoNumerotation::numerate execute the automatic numerotation.
ConductorAutoNumerotation(Conductor *conductor, Diagram *diagram, QUndoCommand *undo_parent=nullptr)
ConductorAutoNumerotation::ConductorAutoNumerotation Constructor of autonum, after create a class...