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
2f34f5e5
Commit
2f34f5e5
authored
Oct 31, 2011
by
Ivan Ilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit berore new branch created
parent
d7b5c0b6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
UBCFFSubsetAdaptor.cpp
src/adaptors/UBCFFSubsetAdaptor.cpp
+14
-1
UBCFFSubsetAdaptor.h
src/adaptors/UBCFFSubsetAdaptor.h
+3
-1
UBGraphicsProxyWidget.h
src/domain/UBGraphicsProxyWidget.h
+1
-1
No files found.
src/adaptors/UBCFFSubsetAdaptor.cpp
View file @
2f34f5e5
...
@@ -240,6 +240,7 @@ UBCFFSubsetAdaptor::UBCFFSubsetReader::UBCFFSubsetReader(UBDocumentProxy *proxy,
...
@@ -240,6 +240,7 @@ UBCFFSubsetAdaptor::UBCFFSubsetReader::UBCFFSubsetReader(UBDocumentProxy *proxy,
// QTextStream out(&tfile);
// QTextStream out(&tfile);
// out << content;
// out << content;
// tfile.close();
// tfile.close();
qDebug
()
<<
"tmp path is"
<<
pwdContent
;
}
}
bool
UBCFFSubsetAdaptor
::
UBCFFSubsetReader
::
parse
()
bool
UBCFFSubsetAdaptor
::
UBCFFSubsetReader
::
parse
()
...
@@ -798,6 +799,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele
...
@@ -798,6 +799,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele
if
(
!
QFile
::
exists
(
imagePath
))
{
if
(
!
QFile
::
exists
(
imagePath
))
{
qDebug
()
<<
"can't load file"
<<
pwdContent
+
"/"
+
itemRefPath
<<
"maybe file corrupted"
;
qDebug
()
<<
"can't load file"
<<
pwdContent
+
"/"
+
itemRefPath
<<
"maybe file corrupted"
;
return
false
;
return
false
;
}
else
{
qDebug
()
<<
"size of file"
<<
itemRefPath
<<
QFileInfo
(
itemRefPath
).
size
();
}
}
pix
.
load
(
imagePath
);
pix
.
load
(
imagePath
);
if
(
pix
.
isNull
())
{
if
(
pix
.
isNull
())
{
...
@@ -814,7 +817,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele
...
@@ -814,7 +817,8 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgImage(const QDomElement &ele
hastransform
=
true
;
hastransform
=
true
;
}
}
// repositionSvgItem(svgItem, rx * 2 + 10, ry * 2 + 10, cx - rx - 5, cy - ry -5, hastransform, transform);
// repositionSvgItem(svgItem, rx * 2 + 10, ry * 2 + 10, cx - rx - 5, cy - ry -5, hastransform, transform);
repositionPixmapItem
(
pixItem
,
width
,
height
,
x
,
y
,
hastransform
,
transform
);
repositionPixmapItem
(
pixItem
,
width
,
height
,
x
,
y
,
hastransform
,
transform
);
// hashSceneItem(element, pixItem->);
return
true
;
return
true
;
}
}
...
@@ -848,6 +852,14 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseIwbGroup(QDomNode *group)
...
@@ -848,6 +852,14 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseIwbGroup(QDomNode *group)
return
true
;
return
true
;
}
}
//void UBCFFSubsetAdaptor::UBCFFSubsetReader::hashSceneItem(QDomNode &element, UBGraphicsItemDelegate *item)
//{
//// adding element pointer to hash to refer if needed
// QString key = element.attribute(aId);
// if (!key.isNull())
// persistedItems.insert(key, item);
//}
bool
UBCFFSubsetAdaptor
::
UBCFFSubsetReader
::
parseSvgElement
(
const
QDomElement
&
parent
)
bool
UBCFFSubsetAdaptor
::
UBCFFSubsetReader
::
parseSvgElement
(
const
QDomElement
&
parent
)
{
{
QString
tagName
=
parent
.
tagName
();
QString
tagName
=
parent
.
tagName
();
...
@@ -856,6 +868,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgElement(const QDomElement &p
...
@@ -856,6 +868,7 @@ bool UBCFFSubsetAdaptor::UBCFFSubsetReader::parseSvgElement(const QDomElement &p
return
false
;
return
false
;
}
}
if
(
tagName
==
tRect
&&
!
parseSvgRect
(
parent
))
return
false
;
if
(
tagName
==
tRect
&&
!
parseSvgRect
(
parent
))
return
false
;
else
if
(
tagName
==
tEllipse
&&
!
parseSvgEllipse
(
parent
))
return
false
;
else
if
(
tagName
==
tEllipse
&&
!
parseSvgEllipse
(
parent
))
return
false
;
else
if
(
tagName
==
tPolygon
&&
!
parseSvgPolygon
(
parent
))
return
false
;
else
if
(
tagName
==
tPolygon
&&
!
parseSvgPolygon
(
parent
))
return
false
;
...
...
src/adaptors/UBCFFSubsetAdaptor.h
View file @
2f34f5e5
...
@@ -27,6 +27,7 @@ class UBGraphicsScene;
...
@@ -27,6 +27,7 @@ class UBGraphicsScene;
class
QSvgGenerator
;
class
QSvgGenerator
;
class
UBGraphicsSvgItem
;
class
UBGraphicsSvgItem
;
class
UBGraphicsPixmapItem
;
class
UBGraphicsPixmapItem
;
class
UBGraphicsItemDelegate
;
class
QTransform
;
class
QTransform
;
class
QPainter
;
class
QPainter
;
...
@@ -86,6 +87,7 @@ private:
...
@@ -86,6 +87,7 @@ private:
QDomDocument
mDOMdoc
;
QDomDocument
mDOMdoc
;
QDomNode
mCurrentDOMElement
;
QDomNode
mCurrentDOMElement
;
QHash
<
QString
,
IwbExt
>
iwbExtProperties
;
QHash
<
QString
,
IwbExt
>
iwbExtProperties
;
QHash
<
QString
,
UBGraphicsItemDelegate
*>
persistedItems
;
bool
hashElements
();
bool
hashElements
();
void
addExtentionsToHash
(
QDomElement
*
parent
,
QDomElement
*
topGroup
);
void
addExtentionsToHash
(
QDomElement
*
parent
,
QDomElement
*
topGroup
);
...
@@ -107,7 +109,7 @@ private:
...
@@ -107,7 +109,7 @@ private:
inline
bool
parseSvgImage
(
const
QDomElement
&
element
);
inline
bool
parseSvgImage
(
const
QDomElement
&
element
);
// inline bool parseSvgTSpan(const QDomElement)
// inline bool parseSvgTSpan(const QDomElement)
bool
parseIwbGroup
(
QDomNode
*
element
);
bool
parseIwbGroup
(
QDomNode
*
element
);
inline
void
hashSceneItem
(
QDomNode
*
element
,
UBGraphicsItemDelegate
*
item
);
// to kill
// to kill
void
parseTextAttributes
(
const
QDomElement
&
element
,
qreal
&
fontSize
,
QColor
&
fontColor
,
void
parseTextAttributes
(
const
QDomElement
&
element
,
qreal
&
fontSize
,
QColor
&
fontColor
,
...
...
src/domain/UBGraphicsProxyWidget.h
View file @
2f34f5e5
...
@@ -41,7 +41,7 @@ class UBGraphicsProxyWidget: public QGraphicsProxyWidget, public UBItem, public
...
@@ -41,7 +41,7 @@ class UBGraphicsProxyWidget: public QGraphicsProxyWidget, public UBItem, public
virtual
void
remove
();
virtual
void
remove
();
UBGraphicsItemDelegate
*
delegate
(){
return
mDelegate
;}
;
UBGraphicsItemDelegate
*
delegate
(){
return
mDelegate
;}
protected
:
protected
:
...
...
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