2013-05-03 17:35:22 +00:00
|
|
|
/*
|
2014-02-04 18:03:02 +00:00
|
|
|
Copyright 2006-2014 The QElectroTech team
|
2013-05-03 17:35:22 +00:00
|
|
|
This file is part of QElectroTech.
|
|
|
|
|
|
|
|
QElectroTech is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
QElectroTech is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
2013-04-04 16:57:15 +00:00
|
|
|
#ifndef CONDUCTORAUTONUMEROTATION_H
|
|
|
|
#define CONDUCTORAUTONUMEROTATION_H
|
|
|
|
|
2014-07-31 19:44:25 +00:00
|
|
|
#include <QSet>
|
2013-04-04 16:57:15 +00:00
|
|
|
|
2014-07-31 19:44:25 +00:00
|
|
|
class Diagram;
|
|
|
|
class Conductor;
|
|
|
|
|
|
|
|
class ConductorAutoNumerotation {
|
2013-04-04 16:57:15 +00:00
|
|
|
public:
|
|
|
|
//constructors & destructor
|
2013-04-19 14:59:20 +00:00
|
|
|
ConductorAutoNumerotation (Conductor *);
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
//methods
|
|
|
|
void numerate();
|
2014-02-04 18:03:02 +00:00
|
|
|
static void checkPotential(Conductor *);
|
2013-04-19 13:22:30 +00:00
|
|
|
void applyText(QString);
|
|
|
|
|
2013-05-03 17:35:22 +00:00
|
|
|
private:
|
2013-04-04 16:57:15 +00:00
|
|
|
//methods
|
2013-05-03 17:35:22 +00:00
|
|
|
void numeratePotential ();
|
|
|
|
void numerateNewConductor ();
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
//attributes
|
2014-07-31 19:44:25 +00:00
|
|
|
Diagram *m_diagram;
|
|
|
|
Conductor *conductor_;
|
2013-04-04 16:57:15 +00:00
|
|
|
QSet <Conductor *> conductor_list;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONDUCTORAUTONUMEROTATION_H
|