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
ad61fdd6
Commit
ad61fdd6
authored
Apr 26, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
2a1ff6ad
28e88c6b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
8 deletions
+32
-8
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+26
-3
UBPersistenceManager.cpp
src/core/UBPersistenceManager.cpp
+0
-1
UBDocumentProxy.cpp
src/document/UBDocumentProxy.cpp
+2
-0
UBTeacherGuideWidget.cpp
src/gui/UBTeacherGuideWidget.cpp
+4
-4
No files found.
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
ad61fdd6
...
...
@@ -29,6 +29,7 @@
#include "domain/UBGraphicsTextItem.h"
#include "domain/UBAbstractWidget.h"
#include "domain/UBGraphicsStroke.h"
#include "domain/UBGraphicsStrokesGroup.h"
#include "domain/UBItem.h"
#include "tools/UBGraphicsRuler.h"
...
...
@@ -42,6 +43,7 @@
#include "board/UBBoardView.h"
#include "board/UBBoardController.h"
#include "board/UBDrawingController.h"
#include "frameworks/UBFileSystemUtils.h"
#include "frameworks/UBStringUtils.h"
...
...
@@ -311,6 +313,8 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
mFileVersion
=
40100
;
// default to 4.1.0
UBGraphicsStroke
*
annotationGroup
=
0
;
UBGraphicsStrokesGroup
*
strokesGroup
=
0
;
UBDrawingController
*
dc
=
UBDrawingController
::
drawingController
();
while
(
!
mXmlReader
.
atEnd
())
{
...
...
@@ -433,6 +437,10 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
else
annotationGroup
=
new
UBGraphicsStroke
();
if
(
eDrawingMode_Vector
==
dc
->
drawingMode
()){
strokesGroup
=
new
UBGraphicsStrokesGroup
();
}
QStringRef
ubZValue
=
mXmlReader
.
attributes
().
value
(
mNamespaceUri
,
"z-value"
);
if
(
!
ubZValue
.
isNull
())
...
...
@@ -475,7 +483,13 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
polygonItem
->
setStroke
(
annotationGroup
);
}
scene
->
addItem
(
polygonItem
);
if
(
eDrawingMode_Vector
==
dc
->
drawingMode
()){
if
(
strokesGroup
){
strokesGroup
->
addToGroup
(
polygonItem
);
}
}
else
{
scene
->
addItem
(
polygonItem
);
}
polygonItem
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
QVariant
(
UBItemLayerType
::
Graphic
));
...
...
@@ -494,7 +508,13 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
polygonItem
->
setStroke
(
annotationGroup
);
}
scene
->
addItem
(
polygonItem
);
if
(
eDrawingMode_Vector
==
dc
->
drawingMode
()){
if
(
strokesGroup
){
strokesGroup
->
addToGroup
(
polygonItem
);
}
}
else
{
scene
->
addItem
(
polygonItem
);
}
polygonItem
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
QVariant
(
UBItemLayerType
::
Graphic
));
polygonItem
->
show
();
...
...
@@ -816,6 +836,10 @@ UBGraphicsScene* UBSvgSubsetAdaptor::UBSvgSubsetReader::loadScene()
{
if
(
mXmlReader
.
name
()
==
"g"
)
{
if
(
strokesGroup
&&
scene
){
scene
->
addItem
(
strokesGroup
);
}
if
(
annotationGroup
)
{
if
(
!
annotationGroup
->
polygons
().
empty
())
...
...
@@ -931,7 +955,6 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene()
{
QGraphicsItem
*
item
=
items
.
takeFirst
();
UBGraphicsPolygonItem
*
polygonItem
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
polygonItem
&&
polygonItem
->
isVisible
())
...
...
src/core/UBPersistenceManager.cpp
View file @
ad61fdd6
...
...
@@ -621,7 +621,6 @@ void UBPersistenceManager::persistDocumentScene(UBDocumentProxy* pDocumentProxy,
mSceneCache
.
insert
(
pDocumentProxy
,
pSceneIndex
,
pScene
);
emit
documentCommitted
(
pDocumentProxy
);
}
...
...
src/document/UBDocumentProxy.cpp
View file @
ad61fdd6
...
...
@@ -297,6 +297,8 @@ QString UBDocumentProxy::sessionAuthors()
QDateTime
UBDocumentProxy
::
documentDate
()
{
qDebug
()
<<
UBSettings
::
documentDate
;
qDebug
()
<<
mMetaDatas
;
if
(
mMetaDatas
.
contains
(
UBSettings
::
documentDate
))
return
UBStringUtils
::
fromUtcIsoDate
(
metaData
(
UBSettings
::
documentDate
).
toString
());
return
QDateTime
::
currentDateTime
();
...
...
src/gui/UBTeacherGuideWidget.cpp
View file @
ad61fdd6
...
...
@@ -723,10 +723,10 @@ void UBTeacherGuidePageZeroEditionWidget::onActiveSceneChanged()
{
UBDocumentProxy
*
documentProxy
=
UBApplication
::
documentController
?
UBApplication
::
documentController
->
getCurrentDocument
()
:
0
;
if
(
UBApplication
::
documentController
&&
UBApplication
::
boardController
->
activeSceneIndex
()
==
0
){
QDateTime
creationDate
=
documentProxy
->
documentDate
();
mpCreationLabel
->
setText
(
tr
(
"Created the:"
)
+
creationDate
.
toString
(
Qt
::
SystemLocaleShortDate
));
QDateTime
updatedDate
=
documentProxy
->
lastUpdate
();
mpLastModifiedLabel
->
setText
(
tr
(
"Updated the:"
)
+
updatedDate
.
toString
(
Qt
::
SystemLocaleShortDate
));
//
QDateTime creationDate = documentProxy->documentDate();
//
mpCreationLabel->setText(tr("Created the:") + creationDate.toString(Qt::SystemLocaleShortDate));
//
QDateTime updatedDate = documentProxy->lastUpdate();
//
mpLastModifiedLabel->setText(tr("Updated the:") + updatedDate.toString(Qt::SystemLocaleShortDate));
}
}
...
...
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