2013-05-03 17:35:22 +00:00
|
|
|
/*
|
2021-02-20 12:13:46 +01:00
|
|
|
Copyright 2006-2021 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
|
|
|
|
|
2020-12-08 19:57:35 +01:00
|
|
|
#include "autoNum/assignvariables.h"
|
|
|
|
|
2016-12-06 19:49:18 +00:00
|
|
|
#include <QList>
|
2013-04-04 16:57:15 +00:00
|
|
|
|
2014-07-31 19:44:25 +00:00
|
|
|
class Diagram;
|
|
|
|
class Conductor;
|
2015-01-09 17:18:16 +00:00
|
|
|
class QUndoCommand;
|
2019-01-27 17:06:38 +00:00
|
|
|
class ConductorProperties;
|
2014-07-31 19:44:25 +00:00
|
|
|
|
2020-07-16 21:46:19 +02:00
|
|
|
/**
|
|
|
|
@brief The ConductorAutoNumerotation class
|
|
|
|
*/
|
2015-01-09 17:18:16 +00:00
|
|
|
class ConductorAutoNumerotation
|
|
|
|
{
|
2013-04-04 16:57:15 +00:00
|
|
|
public:
|
2015-01-09 17:18:16 +00:00
|
|
|
//constructors & destructor
|
2020-07-16 21:46:19 +02:00
|
|
|
ConductorAutoNumerotation (Conductor *conductor,
|
|
|
|
Diagram *diagram,
|
|
|
|
QUndoCommand *undo_parent = nullptr);
|
2013-04-04 16:57:15 +00:00
|
|
|
|
2020-07-16 21:46:19 +02:00
|
|
|
//methods
|
2015-01-09 17:18:16 +00:00
|
|
|
void numerate ();
|
2018-07-19 14:14:31 +00:00
|
|
|
void applyText (const QString&);
|
2020-07-16 21:46:19 +02:00
|
|
|
static void newProperties(Diagram *diagram,
|
|
|
|
ConductorProperties &cp,
|
|
|
|
autonum::sequentialNumbers &seq);
|
2013-04-19 13:22:30 +00:00
|
|
|
|
2013-05-03 17:35:22 +00:00
|
|
|
private:
|
2020-07-16 21:46:19 +02:00
|
|
|
//methods
|
2015-01-09 17:18:16 +00:00
|
|
|
void numeratePotential ();
|
|
|
|
void numerateNewConductor ();
|
|
|
|
|
|
|
|
//attributes
|
|
|
|
Diagram *m_diagram;
|
2016-12-06 19:49:18 +00:00
|
|
|
Conductor *m_conductor;
|
|
|
|
QList <Conductor *> conductor_list;
|
2015-01-09 17:18:16 +00:00
|
|
|
QUndoCommand *m_parent_undo;
|
2013-04-04 16:57:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONDUCTORAUTONUMEROTATION_H
|