QElectroTech  0.70
Public Types | Static Public Member Functions | List of all members
Qet Class Reference

#include <qet.h>

Public Types

enum  EndType {
  None, Simple, Triangle, Circle,
  Diamond
}
 This enum lists the various available endings for line primitives when drawing an electrical element. More...
 
enum  Orientation { North, East, South, West }
 Orientation (used for electrical elements and their terminals) More...
 

Static Public Member Functions

static QString endTypeToString (const Qet::EndType &)
 
static Qet::EndType endTypeFromString (const QString &)
 
static Qet::Orientation nextOrientation (Qet::Orientation)
 
static Qet::Orientation previousOrientation (Qet::Orientation)
 
static Qet::Orientation orientationFromString (const QString &)
 
static QString orientationToString (Qet::Orientation)
 
static bool surLeMemeAxe (Qet::Orientation, Qet::Orientation)
 
static bool isOpposed (Qet::Orientation a, Qet::Orientation b)
 Qet::isOpposed. More...
 
static bool isHorizontal (Qet::Orientation)
 Qet::isHorizontal. More...
 
static bool isVertical (Qet::Orientation)
 Qet::isVertical. More...
 

Detailed Description

Definition at line 185 of file qet.h.

Member Enumeration Documentation

◆ EndType

This enum lists the various available endings for line primitives when drawing an electrical element.

Enumerator
None 

Regular line.

Simple 

Base-less triangle.

Triangle 

Triangle.

Circle 

Circle.

Diamond 

Diamond.

Definition at line 191 of file qet.h.

◆ Orientation

Orientation (used for electrical elements and their terminals)

Enumerator
North 
East 
South 
West 

Definition at line 204 of file qet.h.

Member Function Documentation

◆ endTypeFromString()

Qet::EndType Qet::endTypeFromString ( const QString &  string)
static
Parameters
stringune chaine representant un type d'extremite
Returns
le type d'extremite correspondant ; si la chaine est invalide, QET::None est retourne.

Definition at line 466 of file qet.cpp.

References Circle, Diamond, None, Simple, and Triangle.

Referenced by PartLine::fromXml(), and ElementPictureFactory::parseLine().

◆ endTypeToString()

QString Qet::endTypeToString ( const Qet::EndType end_type)
static
Parameters
end_typeun type d'extremite
Returns
une chaine representant le type d'extremite

Definition at line 449 of file qet.cpp.

References Circle, Diamond, None, Simple, and Triangle.

Referenced by PartLine::toXml().

◆ isHorizontal()

bool Qet::isHorizontal ( Qet::Orientation  a)
static

Qet::isHorizontal.

Parameters
a
Returns
true if is horizontal, else false.

Definition at line 106 of file qet.cpp.

References East, and West.

Referenced by Terminal::paint().

◆ isOpposed()

bool Qet::isOpposed ( Qet::Orientation  a,
Qet::Orientation  b 
)
static

Qet::isOpposed.

Parameters
a
b
Returns
true if a and b is opposed, else false;

Definition at line 76 of file qet.cpp.

References East, North, South, and West.

Referenced by Terminal::alignedWithTerminal().

◆ isVertical()

bool Qet::isVertical ( Qet::Orientation  a)
static

Qet::isVertical.

Parameters
a
Returns
true if is vertical, else false.

Definition at line 115 of file qet.cpp.

References North, and South.

◆ nextOrientation()

Qet::Orientation Qet::nextOrientation ( Qet::Orientation  o)
static

Permet de connaitre l'orientation suivante apres celle donnee en parametre. Les orientations sont generalement presentees dans l'ordre suivant : Nord, Est, Sud, Ouest.

Parameters
oune orientation
Returns
l'orientation suivante

Definition at line 126 of file qet.cpp.

References North.

◆ orientationFromString()

Qet::Orientation Qet::orientationFromString ( const QString &  s)
static

Permet de convertir une chaine de caracteres ("n", "s", "e" ou "w") en orientation. Si la chaine fait plusieurs caracteres, seul le premier est pris en compte. En cas d'incoherence, Qet::North est retourne.

Parameters
sChaine de caractere cense representer une orientation
Returns
l'orientation designee par la chaine de caractere

Definition at line 35 of file qet.cpp.

References East, North, South, and West.

Referenced by PartTerminal::fromXml().

◆ orientationToString()

QString Qet::orientationToString ( Qet::Orientation  o)
static
Parameters
oune orientation
Returns
une chaine de caractere representant l'orientation

Definition at line 47 of file qet.cpp.

References East, North, South, and West.

Referenced by PartTerminal::toXml().

◆ previousOrientation()

Qet::Orientation Qet::previousOrientation ( Qet::Orientation  o)
static

Permet de connaitre l'orientation precedant celle donnee en parametre. Les orientations sont generalement presentees dans l'ordre suivant : Nord, Est, Sud, Ouest.

Parameters
oune orientation
Returns
l'orientation precedente

Definition at line 138 of file qet.cpp.

References North, and West.

◆ surLeMemeAxe()

bool Qet::surLeMemeAxe ( Qet::Orientation  a,
Qet::Orientation  b 
)
static

Indique si deux orientations de Borne sont sur le meme axe (Vertical / Horizontal).

Parameters
aLa premiere orientation de Borne
bLa seconde orientation de Borne
Returns
Un booleen a true si les deux orientations de bornes sont sur le meme axe

Definition at line 64 of file qet.cpp.

References East, North, South, and West.


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