2007-06-30 17:41:07 +00:00
|
|
|
#ifndef _QET_H
|
|
|
|
#define _QET_H
|
|
|
|
#include <QtXml>
|
|
|
|
/**
|
|
|
|
Ce fichier contient des fonctions utiles pouvant etre appelees depuis
|
|
|
|
n'importe ou. Il contient egalement des enums utilises dans plusieurs
|
|
|
|
classes de l'application
|
|
|
|
*/
|
|
|
|
namespace QET {
|
2007-10-21 16:10:21 +00:00
|
|
|
/// version de QElectroTech
|
2007-10-04 17:32:41 +00:00
|
|
|
const QString version = "0.1";
|
2007-10-21 16:10:21 +00:00
|
|
|
/// Orientation (utilise pour les bornes mais aussi pour les elements)
|
2007-06-30 17:41:07 +00:00
|
|
|
enum Orientation {North, East, South, West};
|
2007-10-21 16:10:21 +00:00
|
|
|
/// Types de segment de conducteurs
|
2007-10-03 17:02:39 +00:00
|
|
|
enum ConductorSegmentType { Horizontal = 1, Vertical = 2, Both = 3 };
|
2007-06-30 17:41:07 +00:00
|
|
|
QET::Orientation nextOrientation(QET::Orientation);
|
|
|
|
QET::Orientation previousOrientation(QET::Orientation);
|
|
|
|
QET::Orientation orientationFromString(const QString &);
|
|
|
|
QString orientationToString(QET::Orientation);
|
|
|
|
bool surLeMemeAxe(QET::Orientation, QET::Orientation);
|
|
|
|
bool estHorizontale(QET::Orientation);
|
|
|
|
bool estVerticale(QET::Orientation);
|
|
|
|
bool attributeIsAnInteger(const QDomElement &, QString , int * = NULL);
|
|
|
|
bool attributeIsAReal(const QDomElement &, QString , double * = NULL);
|
2007-10-27 13:18:17 +00:00
|
|
|
QString ElementsAndConductorsSentence(int, int, int = 0);
|
|
|
|
QList<QDomElement> findInDomElement(const QDomElement &, const QString &, const QString &);
|
2007-06-30 17:41:07 +00:00
|
|
|
}
|
|
|
|
#endif
|