2013-05-03 17:35:22 +00:00
|
|
|
/*
|
|
|
|
Copyright 2006-2013 The QElectroTech team
|
|
|
|
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
|
|
|
|
|
2013-04-10 19:35:47 +00:00
|
|
|
#include "conductor.h"
|
2013-05-03 17:35:22 +00:00
|
|
|
#include "numerotationcontext.h"
|
|
|
|
#include "autonumerotation.h"
|
2013-04-04 16:57:15 +00:00
|
|
|
|
2013-05-03 17:35:22 +00:00
|
|
|
class ConductorAutoNumerotation: public AutoNumerotation
|
2013-04-04 16:57:15 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
//constructors & destructor
|
2013-04-19 14:59:20 +00:00
|
|
|
ConductorAutoNumerotation (Conductor *);
|
|
|
|
ConductorAutoNumerotation (Diagram *);
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
//methods
|
|
|
|
void setConductor(Conductor *);
|
|
|
|
void numerate();
|
2013-05-03 17:35:22 +00:00
|
|
|
void numerateDiagram();
|
|
|
|
void removeNumOfDiagram();
|
2013-04-19 13:22:30 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
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
|
|
|
|
Conductor *conductor_;
|
|
|
|
QSet <Conductor *> conductor_list;
|
|
|
|
};
|
|
|
|
|
|
|
|
bool eachIsEqual (const QStringList &);
|
|
|
|
|
|
|
|
#endif // CONDUCTORAUTONUMEROTATION_H
|