QElectroTech
0.70
|
#include <diagramposition.h>
Public Member Functions | |
DiagramPosition (const QString &="", unsigned int=0) | |
virtual | ~DiagramPosition () |
QPointF | position () const |
void | setPosition (const QPointF &) |
QString | toString () |
bool | isOutOfBounds () const |
unsigned int | number () const |
QString | letter () const |
Private Attributes | |
QString | letter_ |
unsigned int | number_ |
QPointF | position_ |
This class stores the position of an electrical element on its parent diagram. While exact coordinates can be stored for convenience, the concept of diagram position as implemented by this class simply designates the intersection between a column and a row, e.g. B2 or C4.
Definition at line 29 of file diagramposition.h.
DiagramPosition::DiagramPosition | ( | const QString & | letter = "" , |
unsigned int | number = 0 |
||
) |
Constructeur
letter | Lettre(s) composant la position |
number | Numero composant la position Si une chaine entierement invalide ou vide, ou bien un 0 est passe en parametre, il en resulte un objet DiagramPosition invalide, dont la methode isOutOfBounds renverra true. |
Definition at line 29 of file diagramposition.cpp.
|
virtual |
Destructeur
Definition at line 39 of file diagramposition.cpp.
bool DiagramPosition::isOutOfBounds | ( | ) | const |
Definition at line 75 of file diagramposition.cpp.
References letter_, and number_.
Referenced by toString().
|
inline |
Definition at line 42 of file diagramposition.h.
References letter_.
Referenced by DiagramPosition().
|
inline |
Definition at line 41 of file diagramposition.h.
References number_.
Referenced by DiagramPosition().
QPointF DiagramPosition::position | ( | ) | const |
Definition at line 45 of file diagramposition.cpp.
References position_.
Referenced by setPosition().
void DiagramPosition::setPosition | ( | const QPointF & | position | ) |
position | Position a stocker dans cet objet |
Definition at line 52 of file diagramposition.cpp.
References position(), and position_.
Referenced by Diagram::convertPosition().
QString DiagramPosition::toString | ( | ) |
Definition at line 59 of file diagramposition.cpp.
References isOutOfBounds(), letter_, and number_.
|
private |
Definition at line 46 of file diagramposition.h.
Referenced by DiagramPosition(), isOutOfBounds(), letter(), and toString().
|
private |
Definition at line 47 of file diagramposition.h.
Referenced by DiagramPosition(), isOutOfBounds(), number(), and toString().
|
private |
Definition at line 48 of file diagramposition.h.
Referenced by position(), and setPosition().