[qet] [750] Modifications permettant la compilation de QElectroTech sur architecture ARM .

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 750
Author:   xavier
Date:     2009-09-12 12:23:44 +0200 (Sat, 12 Sep 2009)
Log Message:
-----------
Modifications permettant la compilation de QElectroTech sur architecture ARM.

Modified Paths:
--------------
    trunk/sources/borderinset.cpp
    trunk/sources/customelement.cpp
    trunk/sources/elementtextitem.cpp
    trunk/sources/qet.cpp
    trunk/sources/qet.h

Modified: trunk/sources/borderinset.cpp
===================================================================
--- trunk/sources/borderinset.cpp	2009-09-12 10:17:44 UTC (rev 749)
+++ trunk/sources/borderinset.cpp	2009-09-12 10:23:44 UTC (rev 750)
@@ -351,7 +351,7 @@
 	@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 @@
 	@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 @@
 	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();
 }
 

Modified: trunk/sources/customelement.cpp
===================================================================
--- trunk/sources/customelement.cpp	2009-09-12 10:17:44 UTC (rev 749)
+++ trunk/sources/customelement.cpp	2009-09-12 10:23:44 UTC (rev 750)
@@ -284,7 +284,7 @@
 */
 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::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::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::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::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);
@@ -597,7 +597,7 @@
 */
 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);

Modified: trunk/sources/elementtextitem.cpp
===================================================================
--- trunk/sources/elementtextitem.cpp	2009-09-12 10:17:44 UTC (rev 749)
+++ trunk/sources/elementtextitem.cpp	2009-09-12 10:23:44 UTC (rev 750)
@@ -86,7 +86,7 @@
 */
 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");
 	}

Modified: trunk/sources/qet.cpp
===================================================================
--- trunk/sources/qet.cpp	2009-09-12 10:17:44 UTC (rev 749)
+++ trunk/sources/qet.cpp	2009-09-12 10:23:44 UTC (rev 750)
@@ -131,7 +131,7 @@
 	@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

Modified: trunk/sources/qet.h
===================================================================
--- trunk/sources/qet.h	2009-09-12 10:17:44 UTC (rev 749)
+++ trunk/sources/qet.h	2009-09-12 10:23:44 UTC (rev 750)
@@ -105,7 +105,7 @@
 	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();


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/