2013-04-04 16:57:15 +00:00
|
|
|
#ifndef CONDUCTORAUTONUMEROTATION_H
|
|
|
|
#define CONDUCTORAUTONUMEROTATION_H
|
|
|
|
|
2013-04-10 19:35:47 +00:00
|
|
|
#include <QObject>
|
|
|
|
#include "conductor.h"
|
|
|
|
#include "diagram.h"
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
class NumStrategy;
|
|
|
|
|
2013-04-19 13:22:30 +00:00
|
|
|
class ConductorAutoNumerotation: public QObject
|
2013-04-04 16:57:15 +00:00
|
|
|
{
|
2013-04-19 13:22:30 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2013-04-04 16:57:15 +00:00
|
|
|
public:
|
|
|
|
//constructors & destructor
|
|
|
|
ConductorAutoNumerotation ();
|
|
|
|
ConductorAutoNumerotation(Conductor *);
|
|
|
|
~ConductorAutoNumerotation();
|
|
|
|
|
|
|
|
//methods
|
|
|
|
void setConductor(Conductor *);
|
|
|
|
void numerate();
|
2013-04-18 08:00:09 +00:00
|
|
|
void removeNum_ofDiagram(Diagram *);
|
2013-04-19 13:22:30 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void applyText(QString);
|
|
|
|
|
2013-04-18 08:00:09 +00:00
|
|
|
|
2013-04-04 16:57:15 +00:00
|
|
|
protected:
|
|
|
|
//methods
|
2013-04-10 19:35:47 +00:00
|
|
|
void setNumStrategy ();
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
//attributes
|
|
|
|
Conductor *conductor_;
|
|
|
|
Diagram *diagram_;
|
|
|
|
QSet <Conductor *> conductor_list;
|
|
|
|
NumStrategy *strategy_;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-04-10 19:35:47 +00:00
|
|
|
class NumStrategy: public QObject
|
2013-04-04 16:57:15 +00:00
|
|
|
{
|
2013-04-10 19:35:47 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2013-04-04 16:57:15 +00:00
|
|
|
public:
|
2013-04-10 19:35:47 +00:00
|
|
|
NumStrategy (Conductor *);
|
2013-04-04 16:57:15 +00:00
|
|
|
virtual ~NumStrategy ();
|
2013-04-10 19:35:47 +00:00
|
|
|
virtual void createNumerotation() = 0; //cree la numerotation en fonction de la strategie utilisé
|
|
|
|
|
|
|
|
protected:
|
|
|
|
Conductor *conductor_;
|
|
|
|
QSet <Conductor *> c_list;
|
|
|
|
Diagram *diagram_;
|
2013-04-04 16:57:15 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
bool eachIsEqual (const QStringList &);
|
|
|
|
|
|
|
|
#endif // CONDUCTORAUTONUMEROTATION_H
|