handlig system where the ',' is used to separate decimals

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 65ffaf9f7d
commit 58cf72f526
  1. 18
      src/adaptors/UBCFFSubsetAdaptor.cpp
  2. 18
      src/adaptors/UBSvgSubsetAdaptor.cpp

@ -280,6 +280,15 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolygon(const QDomElement &e
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
polygon << point; polygon << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
polygon << point;
}
else { else {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;
} }
@ -354,6 +363,15 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolyline(const QDomElement &
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
polygon << point; polygon << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
polygon << point;
}
else { else {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;
} }

@ -1301,6 +1301,15 @@ UBGraphicsPolygonItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItemFromPol
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
polygon << point; polygon << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
polygon << point;
}
else else
{ {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;
@ -1583,6 +1592,15 @@ QList<UBGraphicsPolygonItem*> UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItem
point.setY(sCoord.at(1).toFloat()); point.setY(sCoord.at(1).toFloat());
points << point; points << point;
} }
else if (sCoord.size() == 4){
//This is the case on system were the "," is used to seperate decimal
QPointF point;
QString x = sCoord.at(0) + "." + sCoord.at(1);
QString y = sCoord.at(2) + "." + sCoord.at(3);
point.setX(x.toFloat());
point.setY(y.toFloat());
points << point;
}
else else
{ {
qWarning() << "cannot make sense of a 'point' value" << sCoord; qWarning() << "cannot make sense of a 'point' value" << sCoord;

Loading…
Cancel
Save