QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
DiagramPosition Class Reference

#include <diagramposition.h>

Collaboration diagram for DiagramPosition:
Collaboration graph

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_
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ DiagramPosition()

DiagramPosition::DiagramPosition ( const QString &  letter = "",
unsigned int  number = 0 
)

Constructeur

Parameters
letterLettre(s) composant la position
numberNumero 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.
Here is the call graph for this function:

◆ ~DiagramPosition()

DiagramPosition::~DiagramPosition ( )
virtual

Destructeur

Member Function Documentation

◆ isOutOfBounds()

bool DiagramPosition::isOutOfBounds ( ) const
Returns
true si l'element est en dehors des bords du schema
Here is the caller graph for this function:

◆ letter()

QString DiagramPosition::letter ( ) const
inline
Here is the caller graph for this function:

◆ number()

unsigned int DiagramPosition::number ( ) const
inline
Here is the caller graph for this function:

◆ position()

QPointF DiagramPosition::position ( ) const
Returns
les coordonnees stockees dans cet objet, ou un QPointF nul sinon.
Here is the caller graph for this function:

◆ setPosition()

void DiagramPosition::setPosition ( const QPointF &  position)
Parameters
positionPosition a stocker dans cet objet
Here is the call graph for this function:
Here is the caller graph for this function:

◆ toString()

QString DiagramPosition::toString ( )
Returns
une representation textuelle de la position
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ letter_

QString DiagramPosition::letter_
private

◆ number_

unsigned int DiagramPosition::number_
private

◆ position_

QPointF DiagramPosition::position_
private

The documentation for this class was generated from the following files: