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
deae689f
Commit
deae689f
authored
Nov 03, 2011
by
Ivan Ilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new changes
parent
fc593b1e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
351 additions
and
1034 deletions
+351
-1034
UBCFFSubsetAdaptor.cpp
src/adaptors/UBCFFSubsetAdaptor.cpp
+331
-970
UBCFFSubsetAdaptor.h
src/adaptors/UBCFFSubsetAdaptor.h
+16
-61
UBGraphicsItemDelegate.cpp
src/domain/UBGraphicsItemDelegate.cpp
+2
-0
UBGraphicsItemDelegate.h
src/domain/UBGraphicsItemDelegate.h
+2
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+0
-2
UBW3CWidget.cpp
src/domain/UBW3CWidget.cpp
+0
-1
No files found.
src/adaptors/UBCFFSubsetAdaptor.cpp
View file @
deae689f
This diff is collapsed.
Click to expand it.
src/adaptors/UBCFFSubsetAdaptor.h
View file @
deae689f
...
@@ -31,17 +31,8 @@ class UBGraphicsItemDelegate;
...
@@ -31,17 +31,8 @@ class UBGraphicsItemDelegate;
class
QTransform
;
class
QTransform
;
class
QPainter
;
class
QPainter
;
class
UBGraphicsItem
;
class
UBGraphicsItem
;
class
QGraphicsItem
;
struct
IwbExt
{
IwbExt
()
{;}
IwbExt
(
QDomNode
element
)
:
element
(
element
),
extAttr
(
*
(
new
QVector
<
QDomNode
>
()))
{;}
QDomNode
group
;
QDomNode
element
;
QVector
<
QDomNode
>
extAttr
;
QHash
<
QString
,
QString
>
textAttributes
;
operator
bool
()
const
{
return
!
group
.
isNull
()
||
!
element
.
isNull
();}
};
class
UBCFFSubsetAdaptor
class
UBCFFSubsetAdaptor
{
{
...
@@ -53,22 +44,9 @@ public:
...
@@ -53,22 +44,9 @@ public:
private
:
private
:
class
UBCFFSubsetReader
class
UBCFFSubsetReader
{
{
//xml parse states definition
enum
{
NONE
,
IWB
,
SVG
,
PAGESET
,
PAGE
,
TEXTAREA
,
TSPAN
};
public
:
public
:
UBCFFSubsetReader
(
UBDocumentProxy
*
proxy
,
QFile
*
content
);
UBCFFSubsetReader
(
UBDocumentProxy
*
proxy
,
QFile
*
content
);
QXmlStreamReader
mReader
;
UBDocumentProxy
*
mProxy
;
UBDocumentProxy
*
mProxy
;
QString
pwdContent
;
QString
pwdContent
;
...
@@ -87,8 +65,8 @@ private:
...
@@ -87,8 +65,8 @@ private:
// to kill
// to kill
QDomDocument
mDOMdoc
;
QDomDocument
mDOMdoc
;
QDomNode
mCurrentDOMElement
;
QDomNode
mCurrentDOMElement
;
QHash
<
QString
,
IwbExt
>
iwbExtProperties
;
QHash
<
QString
,
UBGraphicsItem
*>
persistedItems
;
QHash
<
QString
,
UBGraphicsItem
*>
persistedItems
;
QDir
mTmpFlashDir
;
bool
hashElements
();
bool
hashElements
();
void
addExtentionsToHash
(
QDomElement
*
parent
,
QDomElement
*
topGroup
);
void
addExtentionsToHash
(
QDomElement
*
parent
,
QDomElement
*
topGroup
);
...
@@ -100,6 +78,8 @@ private:
...
@@ -100,6 +78,8 @@ private:
bool
parseSvgPage
(
const
QDomElement
&
parent
);
bool
parseSvgPage
(
const
QDomElement
&
parent
);
bool
parseSvgPageset
(
const
QDomElement
&
parent
);
bool
parseSvgPageset
(
const
QDomElement
&
parent
);
bool
parseSvgElement
(
const
QDomElement
&
parent
);
bool
parseSvgElement
(
const
QDomElement
&
parent
);
bool
parseIwbMeta
(
const
QDomElement
&
element
);
bool
parseSvg
(
const
QDomElement
&
svgSection
);
inline
bool
parseSvgRect
(
const
QDomElement
&
element
);
inline
bool
parseSvgRect
(
const
QDomElement
&
element
);
inline
bool
parseSvgEllipse
(
const
QDomElement
&
element
);
inline
bool
parseSvgEllipse
(
const
QDomElement
&
element
);
...
@@ -108,8 +88,11 @@ private:
...
@@ -108,8 +88,11 @@ private:
inline
bool
parseSvgText
(
const
QDomElement
&
element
);
inline
bool
parseSvgText
(
const
QDomElement
&
element
);
inline
bool
parseSvgTextarea
(
const
QDomElement
&
element
);
inline
bool
parseSvgTextarea
(
const
QDomElement
&
element
);
inline
bool
parseSvgImage
(
const
QDomElement
&
element
);
inline
bool
parseSvgImage
(
const
QDomElement
&
element
);
// inline bool parseSvgTSpan(const QDomElement)
inline
bool
parseSvgFlash
(
const
QDomElement
&
element
);
bool
parseIwbGroup
(
QDomNode
*
element
);
inline
bool
parseSvgAudio
(
const
QDomElement
&
element
);
inline
bool
parseSvgVideo
(
const
QDomElement
&
element
);
inline
bool
parseIwbGroup
(
QDomElement
&
parent
);
inline
bool
parseIwbElement
(
QDomElement
&
element
);
inline
void
hashSceneItem
(
const
QDomElement
&
element
,
UBGraphicsItem
*
item
);
inline
void
hashSceneItem
(
const
QDomElement
&
element
,
UBGraphicsItem
*
item
);
// to kill
// to kill
...
@@ -117,52 +100,24 @@ private:
...
@@ -117,52 +100,24 @@ private:
QString
&
fontFamily
,
QString
&
fontStretch
,
bool
&
italic
,
QString
&
fontFamily
,
QString
&
fontStretch
,
bool
&
italic
,
int
&
fontWeight
,
int
&
textAlign
,
QTransform
&
fontTransform
);
int
&
fontWeight
,
int
&
textAlign
,
QTransform
&
fontTransform
);
//methods to store current xml parse state
int
PopState
();
void
PushState
(
int
state
);
//elements parsing methods
//elements parsing methods
bool
parseDoc
();
bool
parseDoc
();
bool
parseCurrentElementStart
();
bool
parseCurrentElementCharacters
();
bool
parseCurrentElementEnd
();
bool
parseIwb
();
bool
parseIwbMeta
();
bool
parseSvg
();
bool
parseRect
();
bool
parseEllipse
();
bool
parseTextArea
();
bool
parseText
();
bool
parsePolygon
();
bool
parsePolyline
();
bool
parsePage
();
bool
parsePageSet
();
bool
parseIwbElementRef
();
bool
createNewScene
();
bool
createNewScene
();
bool
persistCurrentScene
();
bool
persistCurrentScene
();
// helper methods
QStack
<
int
>
stateStack
;
// bool getCurElementTransorm(QTransform &transform);
void
repositionSvgItem
(
QGraphicsItem
*
item
,
qreal
width
,
qreal
height
,
int
currentState
;
qreal
x
,
qreal
y
,
bool
useTransform
,
QTransform
&
transform
);
//helper methods
bool
getCurElementTransorm
(
QTransform
&
transform
);
void
repositionSvgItem
(
UBGraphicsSvgItem
*
item
,
qreal
width
,
qreal
height
,
qreal
x
,
qreal
y
,
bool
useTransform
,
QTransform
&
transform
);
void
repositionPixmapItem
(
UBGraphicsPixmapItem
*
item
,
qreal
width
,
qreal
height
,
qreal
x
,
qreal
y
,
bool
useTransform
,
QTransform
&
transform
);
QColor
colorFromString
(
const
QString
&
clrString
);
QColor
colorFromString
(
const
QString
&
clrString
);
QTransform
transformFromString
(
const
QString
trString
);
QTransform
transformFromString
(
const
QString
trString
);
bool
getViewBoxDimenstions
(
const
QString
&
viewBox
);
bool
getViewBoxDimenstions
(
const
QString
&
viewBox
);
QSvgGenerator
*
createSvgGenerator
(
qreal
width
,
qreal
height
);
QSvgGenerator
*
createSvgGenerator
(
qreal
width
,
qreal
height
);
bool
getTempFileName
();
bool
getTempFileName
();
void
parseTextAttributes
(
qreal
&
fontSize
,
QColor
&
fontColor
,
inline
bool
strToBool
(
QString
);
QString
&
fontFamily
,
QString
&
fontStretch
,
bool
&
italic
,
bool
createTempFlashPath
();
int
&
fontWeight
,
int
&
textAlign
,
QTransform
&
fontTransform
);
};
};
};
};
...
...
src/domain/UBGraphicsItemDelegate.cpp
View file @
deae689f
...
@@ -319,10 +319,12 @@ void UBGraphicsItemDelegate::lock(bool locked)
...
@@ -319,10 +319,12 @@ void UBGraphicsItemDelegate::lock(bool locked)
if
(
locked
)
if
(
locked
)
{
{
mDelegated
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
QVariant
(
true
));
mDelegated
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
QVariant
(
true
));
qDebug
()
<<
"item's data is called for locked"
<<
mDelegated
->
data
(
UBGraphicsItemData
::
ItemLocked
);
}
}
else
else
{
{
mDelegated
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
QVariant
(
false
));
mDelegated
->
setData
(
UBGraphicsItemData
::
ItemLocked
,
QVariant
(
false
));
qDebug
()
<<
"item's data is called for unlocked"
<<
mDelegated
->
data
(
UBGraphicsItemData
::
ItemLocked
);
}
}
mDelegated
->
update
();
mDelegated
->
update
();
...
...
src/domain/UBGraphicsItemDelegate.h
View file @
deae689f
...
@@ -107,6 +107,8 @@ class UBGraphicsItemDelegate : public QObject
...
@@ -107,6 +107,8 @@ class UBGraphicsItemDelegate : public QObject
virtual
QVariant
itemChange
(
QGraphicsItem
::
GraphicsItemChange
change
,
virtual
QVariant
itemChange
(
QGraphicsItem
::
GraphicsItemChange
change
,
const
QVariant
&
value
);
const
QVariant
&
value
);
void
printMessage
(
const
QString
&
mess
)
{
qDebug
()
<<
mess
;}
QGraphicsItem
*
delegated
()
QGraphicsItem
*
delegated
()
{
{
return
mDelegated
;
return
mDelegated
;
...
...
src/domain/UBGraphicsScene.cpp
View file @
deae689f
...
@@ -165,8 +165,6 @@ void UBGraphicsScene::selectionChangedProcessing()
...
@@ -165,8 +165,6 @@ void UBGraphicsScene::selectionChangedProcessing()
nextItem
->
setZValue
(
2
);
nextItem
->
setZValue
(
2
);
qDebug
()
<<
QString
(
" >>> %1 <<< "
).
arg
(
i
)
<<
QString
(
" >>> %1 <<< "
).
arg
(
zValue
);
qDebug
()
<<
QString
(
" >>> %1 <<< "
).
arg
(
i
)
<<
QString
(
" >>> %1 <<< "
).
arg
(
zValue
);
}
}
}
}
// MARK: -
// MARK: -
...
...
src/domain/UBW3CWidget.cpp
View file @
deae689f
...
@@ -228,7 +228,6 @@ void UBW3CWidget::javaScriptWindowObjectCleared()
...
@@ -228,7 +228,6 @@ void UBW3CWidget::javaScriptWindowObjectCleared()
void
UBW3CWidget
::
votingSystemError
(
const
QString
&
error
)
void
UBW3CWidget
::
votingSystemError
(
const
QString
&
error
)
{
{
page
()
->
mainFrame
()
->
evaluateJavaScript
(
"if(voting.onerror) { voting.onerror('"
+
error
+
"');}"
);
page
()
->
mainFrame
()
->
evaluateJavaScript
(
"if(voting.onerror) { voting.onerror('"
+
error
+
"');}"
);
}
}
...
...
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