mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 05:00:33 +01:00
add class for auto numerotation (for the time, only same potential)
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2087 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
49
sources/conductorautonumerotation.h
Normal file
49
sources/conductorautonumerotation.h
Normal file
@@ -0,0 +1,49 @@
|
||||
#ifndef CONDUCTORAUTONUMEROTATION_H
|
||||
#define CONDUCTORAUTONUMEROTATION_H
|
||||
|
||||
#include <conductor.h>
|
||||
|
||||
class NumStrategy;
|
||||
|
||||
class ConductorAutoNumerotation
|
||||
{
|
||||
public:
|
||||
//constructors & destructor
|
||||
ConductorAutoNumerotation ();
|
||||
ConductorAutoNumerotation(Conductor *);
|
||||
~ConductorAutoNumerotation();
|
||||
|
||||
//methods
|
||||
void setConductor(Conductor *);
|
||||
void numerate();
|
||||
|
||||
protected:
|
||||
//methods
|
||||
void setNumStrategy (NumStrategy *);
|
||||
|
||||
//attributes
|
||||
Conductor *conductor_;
|
||||
Diagram *diagram_;
|
||||
QSet <Conductor *> conductor_list;
|
||||
NumStrategy *strategy_;
|
||||
};
|
||||
|
||||
|
||||
class NumStrategy
|
||||
{
|
||||
public:
|
||||
NumStrategy ();
|
||||
virtual ~NumStrategy ();
|
||||
virtual void createNumerotation(Conductor *, Diagram *) = 0; //cree la numerotation en fonction de la strategie utilisé
|
||||
|
||||
};
|
||||
|
||||
|
||||
class SamePotential: public NumStrategy
|
||||
{
|
||||
virtual void createNumerotation(Conductor *, Diagram *);
|
||||
};
|
||||
|
||||
bool eachIsEqual (const QStringList &);
|
||||
|
||||
#endif // CONDUCTORAUTONUMEROTATION_H
|
||||
Reference in New Issue
Block a user