mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Modifications permettant la compilation de QElectroTech sur architecture ARM.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@749 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -351,7 +351,7 @@ void BorderInset::setColumnsWidth(const qreal &new_cw) {
|
||||
@param new_chh nouvelle hauteur des en-tetes de colonnes
|
||||
*/
|
||||
void BorderInset::setColumnsHeaderHeight(const qreal &new_chh) {
|
||||
columns_header_height = qBound(5.0, new_chh, 50.0);
|
||||
columns_header_height = qBound(qreal(5.0), new_chh, qreal(50.0));
|
||||
updateRectangles();
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ void BorderInset::setRowsHeight(const qreal &new_rh) {
|
||||
@param new_rhw nouvelle largeur des en-tetes des lignes
|
||||
*/
|
||||
void BorderInset::setRowsHeaderWidth(const qreal &new_rhw) {
|
||||
rows_header_width = qBound(5.0, new_rhw, 50.0);
|
||||
rows_header_width = qBound(qreal(5.0), new_rhw, qreal(50.0));
|
||||
updateRectangles();
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ void BorderInset::setInsetWidth(const qreal &new_iw) {
|
||||
20px et la hauteur du schema.
|
||||
*/
|
||||
void BorderInset::setInsetHeight(const qreal &new_ih) {
|
||||
inset_height = qMax(20.0, qMin(diagramHeight(), new_ih));
|
||||
inset_height = qMax(qreal(20.0), qMin(diagramHeight(), new_ih));
|
||||
updateRectangles();
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ bool CustomElement::parseElement(QDomElement &e, QPainter &qp) {
|
||||
*/
|
||||
bool CustomElement::parseLine(QDomElement &e, QPainter &qp) {
|
||||
// verifie la presence et la validite des attributs obligatoires
|
||||
double x1, y1, x2, y2;
|
||||
qreal x1, y1, x2, y2;
|
||||
if (!QET::attributeIsAReal(e, QString("x1"), &x1)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("y1"), &y1)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("x2"), &x2)) return(false);
|
||||
@@ -393,7 +393,7 @@ bool CustomElement::parseLine(QDomElement &e, QPainter &qp) {
|
||||
*/
|
||||
bool CustomElement::parseRect(QDomElement &e, QPainter &qp) {
|
||||
// verifie la presence des attributs obligatoires
|
||||
double rect_x, rect_y, rect_w, rect_h;
|
||||
qreal rect_x, rect_y, rect_w, rect_h;
|
||||
if (!QET::attributeIsAReal(e, QString("x"), &rect_x)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("y"), &rect_y)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("width"), &rect_w)) return(false);
|
||||
@@ -425,7 +425,7 @@ bool CustomElement::parseRect(QDomElement &e, QPainter &qp) {
|
||||
*/
|
||||
bool CustomElement::parseCircle(QDomElement &e, QPainter &qp) {
|
||||
// verifie la presence des attributs obligatoires
|
||||
double cercle_x, cercle_y, cercle_r;
|
||||
qreal cercle_x, cercle_y, cercle_r;
|
||||
if (!QET::attributeIsAReal(e, QString("x"), &cercle_x)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("y"), &cercle_y)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("diameter"), &cercle_r)) return(false);
|
||||
@@ -451,7 +451,7 @@ bool CustomElement::parseCircle(QDomElement &e, QPainter &qp) {
|
||||
*/
|
||||
bool CustomElement::parseEllipse(QDomElement &e, QPainter &qp) {
|
||||
// verifie la presence des attributs obligatoires
|
||||
double ellipse_x, ellipse_y, ellipse_l, ellipse_h;
|
||||
qreal ellipse_x, ellipse_y, ellipse_l, ellipse_h;
|
||||
if (!QET::attributeIsAReal(e, QString("x"), &ellipse_x)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("y"), &ellipse_y)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("width"), &ellipse_l)) return(false);
|
||||
@@ -479,7 +479,7 @@ bool CustomElement::parseEllipse(QDomElement &e, QPainter &qp) {
|
||||
*/
|
||||
bool CustomElement::parseArc(QDomElement &e, QPainter &qp) {
|
||||
// verifie la presence des attributs obligatoires
|
||||
double arc_x, arc_y, arc_l, arc_h, arc_s, arc_a;
|
||||
qreal arc_x, arc_y, arc_l, arc_h, arc_s, arc_a;
|
||||
if (!QET::attributeIsAReal(e, QString("x"), &arc_x)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("y"), &arc_y)) return(false);
|
||||
if (!QET::attributeIsAReal(e, QString("width"), &arc_l)) return(false);
|
||||
@@ -625,7 +625,7 @@ ElementTextItem *CustomElement::parseInput(QDomElement &e) {
|
||||
*/
|
||||
Terminal *CustomElement::parseTerminal(QDomElement &e) {
|
||||
// verifie la presence et la validite des attributs obligatoires
|
||||
double terminalx, terminaly;
|
||||
qreal terminalx, terminaly;
|
||||
QET::Orientation terminalo;
|
||||
if (!QET::attributeIsAReal(e, QString("x"), &terminalx)) return(0);
|
||||
if (!QET::attributeIsAReal(e, QString("y"), &terminaly)) return(0);
|
||||
|
||||
@@ -86,7 +86,7 @@ QPointF ElementTextItem::pos() const {
|
||||
*/
|
||||
void ElementTextItem::fromXml(const QDomElement &e) {
|
||||
QPointF _pos = pos();
|
||||
if (qFuzzyCompare(e.attribute("x").toDouble(), _pos.x()) && qFuzzyCompare(e.attribute("y").toDouble(), _pos.y())) {
|
||||
if (qFuzzyCompare(qreal(e.attribute("x").toDouble()), _pos.x()) && qFuzzyCompare(qreal(e.attribute("y").toDouble()), _pos.y())) {
|
||||
setPlainText(e.attribute("text"));
|
||||
previous_text = e.attribute("text");
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ bool QET::attributeIsAnInteger(const QDomElement &e, QString nom_attribut, int *
|
||||
@param reel Pointeur facultatif vers un double
|
||||
@return true si l'attribut est bien un reel, false sinon
|
||||
*/
|
||||
bool QET::attributeIsAReal(const QDomElement &e, QString nom_attribut, double *reel) {
|
||||
bool QET::attributeIsAReal(const QDomElement &e, QString nom_attribut, qreal *reel) {
|
||||
// verifie la presence de l'attribut
|
||||
if (!e.hasAttribute(nom_attribut)) return(false);
|
||||
// verifie la validite de l'attribut
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace QET {
|
||||
bool estHorizontale(QET::Orientation);
|
||||
bool estVerticale(QET::Orientation);
|
||||
bool attributeIsAnInteger(const QDomElement &, QString , int * = NULL);
|
||||
bool attributeIsAReal(const QDomElement &, QString , double * = NULL);
|
||||
bool attributeIsAReal(const QDomElement &, QString , qreal * = NULL);
|
||||
QString ElementsAndConductorsSentence(int, int, int = 0);
|
||||
QList<QDomElement> findInDomElement(const QDomElement &, const QString &, const QString &);
|
||||
QList<QChar> forbiddenCharacters();
|
||||
|
||||
Reference in New Issue
Block a user