Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenBoard
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lifo
Nicolas Ollinger
OpenBoard
Commits
58cf72f5
Commit
58cf72f5
authored
Jan 31, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handlig system where the ',' is used to separate decimals
parent
65ffaf9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
UBCFFSubsetAdaptor.cpp
src/adaptors/UBCFFSubsetAdaptor.cpp
+18
-0
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+18
-0
No files found.
src/adaptors/UBCFFSubsetAdaptor.cpp
View file @
58cf72f5
...
...
@@ -280,6 +280,15 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgPolygon(const QDomElement &e
point
.
setY
(
sCoord
.
at
(
1
).
toFloat
());
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
{
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
());
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
{
qWarning
()
<<
"cannot make sense of a 'point' value"
<<
sCoord
;
}
...
...
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
58cf72f5
...
...
@@ -1301,6 +1301,15 @@ UBGraphicsPolygonItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItemFromPol
point
.
setY
(
sCoord
.
at
(
1
).
toFloat
());
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
{
qWarning
()
<<
"cannot make sense of a 'point' value"
<<
sCoord
;
...
...
@@ -1583,6 +1592,15 @@ QList<UBGraphicsPolygonItem*> UBSvgSubsetAdaptor::UBSvgSubsetReader::polygonItem
point
.
setY
(
sCoord
.
at
(
1
).
toFloat
());
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
{
qWarning
()
<<
"cannot make sense of a 'point' value"
<<
sCoord
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment