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
94d91bb4
Commit
94d91bb4
authored
Oct 02, 2012
by
bmagnin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:Sankore/Sankore-3.1 into develop
parents
54349550
8045f15d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
37 deletions
+36
-37
sankore_fr.ts
resources/i18n/sankore_fr.ts
+2
-2
sankore_fr_CH.ts
resources/i18n/sankore_fr_CH.ts
+2
-2
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+4
-4
UBGraphicsWidgetItem.cpp
src/domain/UBGraphicsWidgetItem.cpp
+25
-27
UBGraphicsWidgetItem.h
src/domain/UBGraphicsWidgetItem.h
+3
-2
No files found.
resources/i18n/sankore_fr.ts
View file @
94d91bb4
...
@@ -377,7 +377,7 @@
...
@@ -377,7 +377,7 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Show
Desktop
<
/source
>
<
source
>
Show
Desktop
<
/source
>
<
translation
>
Afficher
le
b
ureau
<
/translation
>
<
translation
>
B
ureau
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Ctrl
+
Shift
+
H
<
/source
>
<
source
>
Ctrl
+
Shift
+
H
<
/source
>
...
@@ -1961,7 +1961,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ?</translation>
...
@@ -1961,7 +1961,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ?</translation>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Add
a
link
<
/source
>
<
source
>
Add
a
link
<
/source
>
<
translation
>
Ajouter
un
lien
.
web
<
/translation
>
<
translation
>
Ajouter
un
lien
web
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Page
:
%
0
<
/source
>
<
source
>
Page
:
%
0
<
/source
>
...
...
resources/i18n/sankore_fr_CH.ts
View file @
94d91bb4
...
@@ -377,7 +377,7 @@
...
@@ -377,7 +377,7 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Show
Desktop
<
/source
>
<
source
>
Show
Desktop
<
/source
>
<
translation
>
Afficher
le
b
ureau
<
/translation
>
<
translation
>
B
ureau
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Ctrl
+
Shift
+
H
<
/source
>
<
source
>
Ctrl
+
Shift
+
H
<
/source
>
...
@@ -1961,7 +1961,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ?</translation>
...
@@ -1961,7 +1961,7 @@ Voulez-vous ignorer les erreurs pour ce serveur ?</translation>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Add
a
link
<
/source
>
<
source
>
Add
a
link
<
/source
>
<
translation
>
Ajouter
un
lien
.
web
<
/translation
>
<
translation
>
Ajouter
un
lien
web
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Page
:
%
0
<
/source
>
<
source
>
Page
:
%
0
<
/source
>
...
...
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
94d91bb4
...
@@ -1229,10 +1229,10 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
...
@@ -1229,10 +1229,10 @@ bool UBSvgSubsetAdaptor::UBSvgSubsetWriter::persistScene(int pageIndex)
//disabling g section parsing as a group of elements. Use groups refs instead
//disabling g section parsing as a group of elements. Use groups refs instead
// mXmlWriter.writeStartElement("g");
// mXmlWriter.writeStartElement("g");
// mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "uuid", UBStringUtils::toCanonicalUuid(strokesGroupItem->uuid()));
// mXmlWriter.writeAttribute(UBSettings::uniboardDocumentNamespaceUri, "uuid", UBStringUtils::toCanonicalUuid(strokesGroupItem->uuid()));
QMatrix
matrix
=
item
->
sceneMatrix
();
//
QMatrix matrix = item->sceneMatrix();
if
(
!
matrix
.
isIdentity
()){
//
if (!matrix.isIdentity()){
mXmlWriter
.
writeAttribute
(
"transform"
,
toSvgTransform
(
matrix
));
//
mXmlWriter.writeAttribute("transform", toSvgTransform(matrix));
}
//
}
// Add the polygons
// Add the polygons
foreach
(
QGraphicsItem
*
item
,
strokesGroupItem
->
childItems
()){
foreach
(
QGraphicsItem
*
item
,
strokesGroupItem
->
childItems
()){
...
...
src/domain/UBGraphicsWidgetItem.cpp
View file @
94d91bb4
...
@@ -49,7 +49,7 @@ UBGraphicsWidgetItem::UBGraphicsWidgetItem(const QUrl &pWidgetUrl, QGraphicsItem
...
@@ -49,7 +49,7 @@ UBGraphicsWidgetItem::UBGraphicsWidgetItem(const QUrl &pWidgetUrl, QGraphicsItem
,
mInitialLoadDone
(
false
)
,
mInitialLoadDone
(
false
)
,
mIsFreezable
(
true
)
,
mIsFreezable
(
true
)
,
mIsResizable
(
false
)
,
mIsResizable
(
false
)
,
mLoadIsErronous
(
false
)
,
mLoadIsErronous
(
false
)
,
mCanBeContent
(
0
)
,
mCanBeContent
(
0
)
,
mCanBeTool
(
0
)
,
mCanBeTool
(
0
)
,
mWidgetUrl
(
pWidgetUrl
)
,
mWidgetUrl
(
pWidgetUrl
)
...
@@ -113,6 +113,7 @@ void UBGraphicsWidgetItem::initialize()
...
@@ -113,6 +113,7 @@ void UBGraphicsWidgetItem::initialize()
connect
(
page
()
->
mainFrame
(),
SIGNAL
(
javaScriptWindowObjectCleared
()),
this
,
SLOT
(
javaScriptWindowObjectCleared
()));
connect
(
page
()
->
mainFrame
(),
SIGNAL
(
javaScriptWindowObjectCleared
()),
this
,
SLOT
(
javaScriptWindowObjectCleared
()));
connect
(
page
(),
SIGNAL
(
geometryChangeRequested
(
const
QRect
&
)),
this
,
SLOT
(
geometryChangeRequested
(
const
QRect
&
)));
connect
(
page
(),
SIGNAL
(
geometryChangeRequested
(
const
QRect
&
)),
this
,
SLOT
(
geometryChangeRequested
(
const
QRect
&
)));
connect
(
this
,
SIGNAL
(
loadFinished
(
bool
)),
this
,
SLOT
(
mainFrameLoadFinished
(
bool
)));
connect
(
this
,
SIGNAL
(
loadFinished
(
bool
)),
this
,
SLOT
(
mainFrameLoadFinished
(
bool
)));
connect
(
page
()
->
mainFrame
(),
SIGNAL
(
initialLayoutCompleted
()),
this
,
SLOT
(
initialLayoutCompleted
()));
connect
(
page
(),
SIGNAL
(
linkClicked
(
const
QUrl
&
)),
this
,
SLOT
(
onLinkClicked
(
const
QUrl
&
)));
connect
(
page
(),
SIGNAL
(
linkClicked
(
const
QUrl
&
)),
this
,
SLOT
(
onLinkClicked
(
const
QUrl
&
)));
}
}
...
@@ -121,6 +122,11 @@ void UBGraphicsWidgetItem::onLinkClicked(const QUrl& url)
...
@@ -121,6 +122,11 @@ void UBGraphicsWidgetItem::onLinkClicked(const QUrl& url)
UBApplication
::
webController
->
loadUrl
(
url
);
UBApplication
::
webController
->
loadUrl
(
url
);
}
}
void
UBGraphicsWidgetItem
::
initialLayoutCompleted
()
{
mInitialLoadDone
=
true
;
}
QUrl
UBGraphicsWidgetItem
::
mainHtml
()
QUrl
UBGraphicsWidgetItem
::
mainHtml
()
{
{
return
mMainHtmlUrl
;
return
mMainHtmlUrl
;
...
@@ -564,40 +570,33 @@ void UBGraphicsWidgetItem::injectInlineJavaScript()
...
@@ -564,40 +570,33 @@ void UBGraphicsWidgetItem::injectInlineJavaScript()
void
UBGraphicsWidgetItem
::
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
void
UBGraphicsWidgetItem
::
paint
(
QPainter
*
painter
,
const
QStyleOptionGraphicsItem
*
option
,
QWidget
*
widget
)
{
{
if
(
scene
()
&&
scene
()
->
renderingContext
()
!=
UBGraphicsScene
::
Screen
)
if
(
scene
()
&&
scene
()
->
renderingContext
()
!=
UBGraphicsScene
::
Screen
)
{
{
painter
->
drawPixmap
(
0
,
0
,
snapshot
());
painter
->
drawPixmap
(
0
,
0
,
snapshot
());
}
}
else
else
{
{
QGraphicsWebView
::
paint
(
painter
,
option
,
widget
);
if
(
!
mInitialLoadDone
||
mLoadIsErronous
)
}
{
QString
message
;
if
(
mInitialLoadDone
&&
mLoadIsErronous
)
if
(
!
mInitialLoadDone
)
{
message
=
tr
(
"Cannot load content"
);
QString
message
;
else
message
=
tr
(
"Loading ..."
);
painter
->
setFont
(
QFont
(
"Arial"
,
12
)
);
message
=
tr
(
"Loading ..."
);
QFontMetrics
fm
=
painter
->
fontMetrics
();
painter
->
setFont
(
QFont
(
"Arial"
,
12
));
QRect
txtBoundingRect
=
fm
.
boundingRect
(
message
);
txtBoundingRect
.
moveCenter
(
rect
().
center
().
toPoint
()
);
QFontMetrics
fm
=
painter
->
fontMetrics
(
);
txtBoundingRect
.
adjust
(
-
10
,
-
5
,
10
,
5
);
QRect
txtBoundingRect
=
fm
.
boundingRect
(
message
);
painter
->
setPen
(
Qt
::
NoPen
);
txtBoundingRect
.
moveCenter
(
rect
().
center
().
toPoint
());
painter
->
setBrush
(
UBSettings
::
paletteColor
);
txtBoundingRect
.
adjust
(
-
10
,
-
5
,
10
,
5
);
painter
->
drawRoundedRect
(
txtBoundingRect
,
3
,
3
);
painter
->
setPen
(
Qt
::
white
);
painter
->
setPen
(
Qt
::
NoPen
);
painter
->
drawText
(
rect
(),
Qt
::
AlignCenter
,
message
);
painter
->
setBrush
(
UBSettings
::
paletteColor
);
}
painter
->
drawRoundedRect
(
txtBoundingRect
,
3
,
3
);
else
QGraphicsWebView
::
paint
(
painter
,
option
,
widget
);
}
painter
->
setPen
(
Qt
::
white
);
painter
->
drawText
(
rect
(),
Qt
::
AlignCenter
,
message
);
}
}
}
void
UBGraphicsWidgetItem
::
geometryChangeRequested
(
const
QRect
&
geom
)
void
UBGraphicsWidgetItem
::
geometryChangeRequested
(
const
QRect
&
geom
)
...
@@ -618,7 +617,6 @@ void UBGraphicsWidgetItem::javaScriptWindowObjectCleared()
...
@@ -618,7 +617,6 @@ void UBGraphicsWidgetItem::javaScriptWindowObjectCleared()
void
UBGraphicsWidgetItem
::
mainFrameLoadFinished
(
bool
ok
)
void
UBGraphicsWidgetItem
::
mainFrameLoadFinished
(
bool
ok
)
{
{
mInitialLoadDone
=
true
;
mLoadIsErronous
=
!
ok
;
mLoadIsErronous
=
!
ok
;
update
(
boundingRect
());
update
(
boundingRect
());
takeSnapshot
();
takeSnapshot
();
...
...
src/domain/UBGraphicsWidgetItem.h
View file @
94d91bb4
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
#include "core/UB.h"
#include "core/UB.h"
#include "UBItem.h"
#include "UBItem.h"
#include "UBResizableGraphicsItem.h"
#include "UBResizableGraphicsItem.h"
class
UBWidgetUniboardAPI
;
class
UBWidgetUniboardAPI
;
class
UBGraphicsScene
;
class
UBGraphicsScene
;
...
@@ -163,6 +163,7 @@ class UBGraphicsWidgetItem : public QGraphicsWebView, public UBItem, public UBRe
...
@@ -163,6 +163,7 @@ class UBGraphicsWidgetItem : public QGraphicsWebView, public UBItem, public UBRe
private
slots
:
private
slots
:
void
onLinkClicked
(
const
QUrl
&
url
);
void
onLinkClicked
(
const
QUrl
&
url
);
void
initialLayoutCompleted
();
private
:
private
:
bool
mIsFrozen
;
bool
mIsFrozen
;
...
...
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