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
5fd617c5
Commit
5fd617c5
authored
May 14, 2017
by
Craig Watson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 1.4-dev
parents
2429d666
425129ff
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
306 additions
and
122 deletions
+306
-122
OpenBoard.config
resources/etc/OpenBoard.config
+0
-1
OpenBoard_it.ts
resources/i18n/OpenBoard_it.ts
+80
-50
UBExportPDF.cpp
src/adaptors/UBExportPDF.cpp
+31
-18
UBBoardController.cpp
src/board/UBBoardController.cpp
+1
-4
UBBoardPaletteManager.cpp
src/board/UBBoardPaletteManager.cpp
+6
-1
UBApplication.cpp
src/core/UBApplication.cpp
+1
-7
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+1
-1
UBPreferencesController.cpp
src/core/UBPreferencesController.cpp
+0
-2
UBSettings.cpp
src/core/UBSettings.cpp
+2
-3
UBSettings.h
src/core/UBSettings.h
+1
-2
UBDocumentController.cpp
src/document/UBDocumentController.cpp
+54
-18
UBDocumentController.h
src/document/UBDocumentController.h
+2
-1
UBGraphicsItemUndoCommand.cpp
src/domain/UBGraphicsItemUndoCommand.cpp
+43
-0
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+37
-2
UBGraphicsMediaItem.h
src/domain/UBGraphicsMediaItem.h
+3
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+31
-9
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+2
-0
UBGraphicsStrokesGroup.cpp
src/domain/UBGraphicsStrokesGroup.cpp
+5
-0
UBDocumentTreeWidget.cpp
src/gui/UBDocumentTreeWidget.cpp
+5
-2
UBGraphicsCurtainItemDelegate.cpp
src/tools/UBGraphicsCurtainItemDelegate.cpp
+1
-1
No files found.
resources/etc/OpenBoard.config
View file @
5fd617c5
[
App
]
[
App
]
AngleTolerance
=
4
AngleTolerance
=
4
EnableAutomaticSoftwareUpdates
=
false
EnableAutomaticSoftwareUpdates
=
false
EnableSoftwareUpdates
=
true
EnableStartupHints
=
true
EnableStartupHints
=
true
FavoriteToolURIs
=
openboardtool
://
openboard
/
mask
,
openboardtool
://
ruler
,
openboardtool
://
compass
,
openboardtool
://
protractor
,
openboardtool
://
triangle
,
openboardtool
://
magnifier
,
openboardtool
://
cache
FavoriteToolURIs
=
openboardtool
://
openboard
/
mask
,
openboardtool
://
ruler
,
openboardtool
://
compass
,
openboardtool
://
protractor
,
openboardtool
://
triangle
,
openboardtool
://
magnifier
,
openboardtool
://
cache
IsInSoftwareUpdateProcess
=
false
IsInSoftwareUpdateProcess
=
false
...
...
resources/i18n/OpenBoard_it.ts
View file @
5fd617c5
<
?
xml
version
=
"1.0"
encoding
=
"utf-8"
?
>
<
?
xml
version
=
"1.0"
encoding
=
"utf-8"
?
>
<!
DOCTYPE
TS
>
<!
DOCTYPE
TS
>
<
TS
version
=
"2.
1
"
>
<
TS
version
=
"2.
0"
language
=
"it_IT"
sourcelanguage
=
"it_IT
"
>
<
context
>
<
context
>
<
name
>
BlackoutWidget
<
/name
>
<
name
>
BlackoutWidget
<
/name
>
<
message
>
<
message
>
...
@@ -793,11 +793,11 @@
...
@@ -793,11 +793,11 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Open
Tutorial
<
/source
>
<
source
>
Open
Tutorial
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Apri
tutorial
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Open
the
tutorial
web
page
<
/source
>
<
source
>
Open
the
tutorial
web
page
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Apri
la
pagina
web
del
tutorial
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Ruled
Light
Background
<
/source
>
<
source
>
Ruled
Light
Background
<
/source
>
...
@@ -850,11 +850,11 @@
...
@@ -850,11 +850,11 @@
<
name
>
QObject
<
/name
>
<
name
>
QObject
<
/name
>
<
message
>
<
message
>
<
source
>
Element
ID
=
<
/source
>
<
source
>
Element
ID
=
<
/source
>
<
translation
type
=
"vanished"
>
Elemento
ID
=<
/translation
>
<
translation
>
Elemento
ID
=<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Content
is
not
supported
in
destination
format
.
<
/source
>
<
source
>
Content
is
not
supported
in
destination
format
.
<
/source
>
<
translation
type
=
"vanished"
>
Il
contenuto
non
è
supportato
nel
formato
di
destinazione
.
<
/translation
>
<
translation
>
Il
contenuto
non
è
supportato
nel
formato
di
destinazione
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Remove
Page
<
/source
>
<
source
>
Remove
Page
<
/source
>
...
@@ -954,11 +954,11 @@
...
@@ -954,11 +954,11 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Saving
document
...
<
/source
>
<
source
>
Saving
document
...
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Salvataggio
documento
...
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Document
has
just
been
saved
...
<
/source
>
<
source
>
Document
has
just
been
saved
...
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Il
documento
è
stato
appena
salvato
...
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1019,7 +1019,7 @@
...
@@ -1019,7 +1019,7 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Show
OpenBoard
<
/source
>
<
source
>
Show
OpenBoard
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Mostra
OpenBoard
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1138,9 +1138,9 @@
...
@@ -1138,9 +1138,9 @@
<
/message
>
<
/message
>
<
message
numerus
=
"yes"
>
<
message
numerus
=
"yes"
>
<
source
>
Are
you
sure
you
want
to
remove
%
n
page
(
s
)
from
the
selected
document
&
apos
;
%
1
&
apos
;?
<
/source
>
<
source
>
Are
you
sure
you
want
to
remove
%
n
page
(
s
)
from
the
selected
document
&
apos
;
%
1
&
apos
;?
<
/source
>
<
translation
type
=
"unfinished"
>
<
translation
>
<
numerusform
>
Sei
sicuro
di
voler
rimuovere
%
n
pagin
e
dal
documento
&
apos
;
%
1
&
apos
;
selezionato
?
<
numerusform
>
Sei
sicuro
di
voler
rimuovere
%
n
pagin
a
dal
documento
&
apos
;
%
1
&
apos
;
selezionato
?
<
/numerusform
>
<
/numerusform
>
<
numerusform
>
Sei
sicuro
di
voler
rimuovere
%
n
pagine
dal
documento
&
apos
;
%
1
&
apos
;
selezionato
?
<
/numerusform
>
<
/translation
>
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
...
@@ -1153,15 +1153,15 @@
...
@@ -1153,15 +1153,15 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
The
document
&
apos
;
%
1
&
apos
;
has
been
generated
with
a
newer
version
of
OpenBoard
(
%
2
).
By
opening
it
,
you
may
lose
some
information
.
Do
you
want
to
proceed
?
<
/source
>
<
source
>
The
document
&
apos
;
%
1
&
apos
;
has
been
generated
with
a
newer
version
of
OpenBoard
(
%
2
).
By
opening
it
,
you
may
lose
some
information
.
Do
you
want
to
proceed
?
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Il
documento
&
quot
;
%
1
&
quot
;
è
stato
generato
con
una
pi
ù
recente
versione
di
OpenBoard
(
%
2
).
Aprendolo
,
si
possono
perdere
alcune
informazioni
.
Procedere
ugualmente
?
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Are
you
sure
you
want
to
remove
all
selected
documents
?
<
/source
>
<
source
>
Are
you
sure
you
want
to
remove
all
selected
documents
?
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Sicuri
di
voler
rimuovere
tutti
i
documenti
selezionati
?
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Remove
multiple
documents
<
/source
>
<
source
>
Remove
multiple
documents
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Rimuovi
documenti
multipli
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1227,8 +1227,8 @@
...
@@ -1227,8 +1227,8 @@
<
message
numerus
=
"yes"
>
<
message
numerus
=
"yes"
>
<
source
>%
1
pages
copied
<
/source
>
<
source
>%
1
pages
copied
<
/source
>
<
translation
type
=
"unfinished"
>
<
translation
type
=
"unfinished"
>
<
numerusform
>%
1
pagin
e
copiate
<
numerusform
>%
1
pagin
a
copiata
<
/numerusform
>
<
/numerusform
>
<
numerusform
>%
1
pagine
copiate
<
/numerusform
>
<
/translation
>
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
...
@@ -1274,23 +1274,23 @@
...
@@ -1274,23 +1274,23 @@
<
name
>
UBExportCFF
<
/name
>
<
name
>
UBExportCFF
<
/name
>
<
message
>
<
message
>
<
source
>
Export
to
IWB
<
/source
>
<
source
>
Export
to
IWB
<
/source
>
<
translation
type
=
"vanished"
>
Esporta
in
IWB
<
/translation
>
<
translation
>
Esporta
in
IWB
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Export
as
IWB
File
<
/source
>
<
source
>
Export
as
IWB
File
<
/source
>
<
translation
type
=
"vanished"
>
Esporta
come
file
IWB
<
/translation
>
<
translation
>
Esporta
come
file
IWB
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Exporting
document
...
<
/source
>
<
source
>
Exporting
document
...
<
/source
>
<
translation
type
=
"vanished"
>
Esportazione
documento
in
corso
...
<
/translation
>
<
translation
>
Esportazione
documento
in
corso
...
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Export
successful
.
<
/source
>
<
source
>
Export
successful
.
<
/source
>
<
translation
type
=
"vanished"
>
Esportazione
conclusa
con
successo
.
<
/translation
>
<
translation
>
Esportazione
conclusa
con
successo
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Export
failed
.
<
/source
>
<
source
>
Export
failed
.
<
/source
>
<
translation
type
=
"vanished"
>
Esportazione
fallita
.
<
/translation
>
<
translation
>
Esportazione
fallita
.
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1317,8 +1317,23 @@
...
@@ -1317,8 +1317,23 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Export
to
OpenBoard
Format
<
/source
>
<
source
>
Export
to
OpenBoard
Format
<
/source
>
<
translation
type
=
"unfinished"
><
/translation
>
<
translation
>
Esporta
nel
formato
OpenBoard
<
/translation
>
<
/message
>
<<<<<<<
HEAD
=======
<
message
>
<
source
>
Export
failed
:
location
not
writable
<
/source
>
<
translation
>
Exportazione
fallita
:
posizione
non
scrivibile
<
/translation
>
<
/message
>
<
message
>
<
source
>
Export
failed
<
/source
>
<
translation
>
Esportazione
fallita
<
/translation
>
<
/message
>
<
message
>
<
source
>
Unable
to
export
to
the
selected
location
.
You
do
not
have
the
permissions
necessary
to
save
the
file
.
<
/source
>
<
translation
>
Impossibile
esportare
nella
posizione
selezionata
.
Non
possiedi
i
permessi
necessari
a
salvare
il
file
.
<
/translation
>
<
/message
>
<
/message
>
>>>>>>>
dev
<
/context
>
<
/context
>
<
context
>
<
context
>
<
name
>
UBExportFullPDF
<
/name
>
<
name
>
UBExportFullPDF
<
/name
>
...
@@ -1338,6 +1353,21 @@
...
@@ -1338,6 +1353,21 @@
<
source
>
Export
to
PDF
<
/source
>
<
source
>
Export
to
PDF
<
/source
>
<
translation
>
Esporta
in
PDF
<
/translation
>
<
translation
>
Esporta
in
PDF
<
/translation
>
<
/message
>
<
/message
>
<<<<<<<
HEAD
=======
<
message
>
<
source
>
Export
failed
:
location
not
writable
<
/source
>
<
translation
>
Esportazione
fallita
:
posizione
non
scrivibile
<
/translation
>
<
/message
>
<
message
>
<
source
>
Export
failed
<
/source
>
<
translation
>
Esportazione
fallita
<
/translation
>
<
/message
>
<
message
>
<
source
>
Unable
to
export
to
the
selected
location
.
You
do
not
have
the
permissions
necessary
to
save
the
file
.
<
/source
>
<
translation
>
Impossibile
esportare
alla
posizione
selezionata
.
Non
possiedi
i
permessi
necessari
a
salvare
il
file
.
<
/translation
>
<
/message
>
>>>>>>>
dev
<
/context
>
<
/context
>
<
context
>
<
context
>
<
name
>
UBExportPDF
<
/name
>
<
name
>
UBExportPDF
<
/name
>
...
@@ -1542,19 +1572,19 @@
...
@@ -1542,19 +1572,19 @@
<
name
>
UBGraphicsMediaItem
<
/name
>
<
name
>
UBGraphicsMediaItem
<
/name
>
<
message
>
<
message
>
<
source
>
Media
resource
couldn
&
apos
;
t
be
resolved
<
/source
>
<
source
>
Media
resource
couldn
&
apos
;
t
be
resolved
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
La
risorsa
multimediale
non
pu
ò
essere
gestita
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Unsupported
media
format
<
/source
>
<
source
>
Unsupported
media
format
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Formato
multimediale
non
supportato
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Media
playback
service
not
found
<
/source
>
<
source
>
Media
playback
service
not
found
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Servizio
di
esecuzione
multimediale
non
trovato
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Media
error
:
<
/source
>
<
source
>
Media
error
:
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Errore
multimediale
:
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1604,23 +1634,23 @@
...
@@ -1604,23 +1634,23 @@
<
name
>
UBImportCFF
<
/name
>
<
name
>
UBImportCFF
<
/name
>
<
message
>
<
message
>
<
source
>
Common
File
Format
(
<
/source
>
<
source
>
Common
File
Format
(
<
/source
>
<
translation
type
=
"vanished"
>
Common
File
Format
(
<
/translation
>
<
translation
>
Common
File
Format
(
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Importing
file
%
1
...
<
/source
>
<
source
>
Importing
file
%
1
...
<
/source
>
<
translation
type
=
"vanished"
>
Importazione
del
file
%
1
in
corso
...
<
/translation
>
<
translation
>
Importazione
del
file
%
1
in
corso
...
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Import
of
file
%
1
failed
.
<
/source
>
<
source
>
Import
of
file
%
1
failed
.
<
/source
>
<
translation
type
=
"vanished"
>
L
&
apos
;
importazione
del
file
%
1
è
fallita
.
<
/translation
>
<
translation
>
L
&
apos
;
importazione
del
file
%
1
è
fallita
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Import
successful
.
<
/source
>
<
source
>
Import
successful
.
<
/source
>
<
translation
type
=
"vanished"
>
Importazione
completata
con
successo
.
<
/translation
>
<
translation
>
Importazione
completata
con
successo
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Import
failed
.
<
/source
>
<
source
>
Import
failed
.
<
/source
>
<
translation
type
=
"vanished"
>
Importazione
fallita
.
<
/translation
>
<
translation
>
Importazione
fallita
.
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1639,7 +1669,7 @@
...
@@ -1639,7 +1669,7 @@
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
OpenBoard
(
*
.
ubz
)
<
/source
>
<
source
>
OpenBoard
(
*
.
ubz
)
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
OpenBoard
(
*
.
ubz
)
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1750,27 +1780,27 @@ Vuoi ignorare gli errori per questo host?</translation>
...
@@ -1750,27 +1780,27 @@ Vuoi ignorare gli errori per questo host?</translation>
<
name
>
UBOpenSankoreImporterWidget
<
/name
>
<
name
>
UBOpenSankoreImporterWidget
<
/name
>
<
message
>
<
message
>
<
source
>
Open
-
Sankore
Documents
Detected
<
/source
>
<
source
>
Open
-
Sankore
Documents
Detected
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Rilevati
documenti
Open
-
Sankore
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Show
this
panel
next
time
<
/source
>
<
source
>
Show
this
panel
next
time
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Mostra
questo
pannello
la
prossima
volta
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
You
can
always
access
the
OpenBoard
Document
Importer
through
the
Preferences
panel
in
the
About
tab
.
Warning
,
if
you
have
already
imported
your
Open
-
Sankore
datas
,
you
might
loose
your
current
OpenBoard
documents
.
<
/source
>
<
source
>
You
can
always
access
the
OpenBoard
Document
Importer
through
the
Preferences
panel
in
the
About
tab
.
Warning
,
if
you
have
already
imported
your
Open
-
Sankore
datas
,
you
might
loose
your
current
OpenBoard
documents
.
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
È
sempre
possibile
accedere
all
&
apos
;
importatore
di
documenti
OpenBoard
tramite
il
pannello
delle
preferenze
nella
scheda
delle
informazioni
su
OpenBoard
.
Attenzione
,
se
si
è
gi
à
importato
dati
Open
-
Sankore
,
è
possibile
perdere
i
documenti
OpenBoard
correnti
.
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Cancel
<
/source
>
<
source
>
Cancel
<
/source
>
<
translation
type
=
"unfinished"
>
Annulla
<
/translation
>
<
translation
>
Annulla
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Proceed
<
/source
>
<
source
>
Proceed
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Procedi
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Open
-
Sankor
é
documents
are
present
on
your
computer
.
It
is
possible
to
import
them
to
OpenBoard
by
pressing
the
“
Proceed
”
button
to
launch
the
importer
application
.
<
/source
>
<
source
>
Open
-
Sankor
é
documents
are
present
on
your
computer
.
It
is
possible
to
import
them
to
OpenBoard
by
pressing
the
“
Proceed
”
button
to
launch
the
importer
application
.
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Documenti
Open
-
Sankor
é
sono
presenti
nel
computer
.
È
possibile
importarli
in
OpenBoard
premendo
il
pulsante
“
Procedi
”
per
avviare
l
&
apos
;
applicazione
di
importazione
.
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1785,7 +1815,7 @@ Vuoi ignorare gli errori per questo host?</translation>
...
@@ -1785,7 +1815,7 @@ Vuoi ignorare gli errori per questo host?</translation>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
has
lost
access
to
the
document
repository
&
apos
;
%
1
&
apos
;.
Unfortunately
the
application
must
shut
down
to
avoid
data
corruption
.
Latest
changes
may
be
lost
as
well
.
<
/source
>
<
source
>
has
lost
access
to
the
document
repository
&
apos
;
%
1
&
apos
;.
Unfortunately
the
application
must
shut
down
to
avoid
data
corruption
.
Latest
changes
may
be
lost
as
well
.
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
ha
perso
l
&
apos
;
accesso
al
repository
documenti
&
quot
;
%
1
&
quot
;.
Sfortunatamente
l
&
apos
;
applicazione
deve
essere
chiusa
per
evitare
di
rivinare
i
dati
.
Gli
ultimi
cambiamenti
potrebbero
andare
persi
.
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1871,7 +1901,7 @@ Vuoi ignorare gli errori per questo host?</translation>
...
@@ -1871,7 +1901,7 @@ Vuoi ignorare gli errori per questo host?</translation>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
OpenBoard
Cast
<
/source
>
<
source
>
OpenBoard
Cast
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
OpenBoard
Cast
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -1930,7 +1960,7 @@ Vuoi ignorare gli errori per questo host?</translation>
...
@@ -1930,7 +1960,7 @@ Vuoi ignorare gli errori per questo host?</translation>
<
name
>
UBStartupHintsPalette
<
/name
>
<
name
>
UBStartupHintsPalette
<
/name
>
<
message
>
<
message
>
<
source
>
Visible
next
time
<
/source
>
<
source
>
Visible
next
time
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Visibile
la
prossima
volta
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -2330,7 +2360,7 @@ Si prega di riavviare l'applicazione per accedere ai documenti aggiornati.<
...
@@ -2330,7 +2360,7 @@ Si prega di riavviare l'applicazione per accedere ai documenti aggiornati.<
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Download
PDF
Document
:
would
you
prefer
to
download
the
PDF
file
or
add
it
to
the
current
OpenBoard
document
?
<
/source
>
<
source
>
Download
PDF
Document
:
would
you
prefer
to
download
the
PDF
file
or
add
it
to
the
current
OpenBoard
document
?
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Scarica
il
documento
PDF
:
preferisci
scaricare
il
file
PDF
o
aggiungerlo
al
documento
OpenBoard
corrente
?
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -2384,11 +2414,11 @@ p, li { white-space: pre-wrap; }
...
@@ -2384,11 +2414,11 @@ p, li { white-space: pre-wrap; }
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Restore
credentials
on
reboot
<
/source
>
<
source
>
Restore
credentials
on
reboot
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Ripristina
le
credenziali
al
riavvio
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
OpenBoard
<
/source
>
<
source
>
OpenBoard
<
/source
>
<
translation
type
=
"unfinished"
>
OpenBoard
<
/translation
>
<
translation
>
OpenBoard
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -2461,7 +2491,7 @@ p, li { white-space: pre-wrap; }
...
@@ -2461,7 +2491,7 @@ p, li { white-space: pre-wrap; }
<
name
>
documents
<
/name
>
<
name
>
documents
<
/name
>
<
message
>
<
message
>
<
source
>
OpenBoard
Documents
<
/source
>
<
source
>
OpenBoard
Documents
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Documenti
OpenBoard
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
@@ -2504,7 +2534,7 @@ p, li { white-space: pre-wrap; }
...
@@ -2504,7 +2534,7 @@ p, li { white-space: pre-wrap; }
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Keyboard
button
size
:
<
/source
>
<
source
>
Keyboard
button
size
:
<
/source
>
<
translation
type
=
"vanished"
>
Dimensione
pulsanti
tastiera
:
<
/translation
>
<
translation
>
Dimensione
pulsanti
tastiera
:
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Toolbar
<
/source
>
<
source
>
Toolbar
<
/source
>
...
@@ -2604,19 +2634,19 @@ p, li { white-space: pre-wrap; }
...
@@ -2604,19 +2634,19 @@ p, li { white-space: pre-wrap; }
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Open
-
Sankor
é
Importer
<
/source
>
<
source
>
Open
-
Sankor
é
Importer
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Apri
l
&
apos
;
importatore
Open
-
Sankor
é
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Check
if
Open
-
Sankor
é
data
could
be
imported
at
launch
<
/source
>
<
source
>
Check
if
Open
-
Sankor
é
data
could
be
imported
at
launch
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Controlla
se
i
dati
Open
-
Sankor
é
possono
venir
importati
all
&
apos
;
avvio
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Use
system
keyboard
(
recommended
)
<
/source
>
<
source
>
Use
system
keyboard
(
recommended
)
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Usa
la
tastiera
di
sistema
(
raccomandato
)
<
/translation
>
<
/message
>
<
/message
>
<
message
>
<
message
>
<
source
>
Built
-
in
virtual
keyboard
button
size
:
<
/source
>
<
source
>
Built
-
in
virtual
keyboard
button
size
:
<
/source
>
<
translation
type
=
"unfinished"
>
<
/translation
>
<
translation
>
Dimensione
pulsanti
tastiera
virtuale
incorporata
:
<
/translation
>
<
/message
>
<
/message
>
<
/context
>
<
/context
>
<
context
>
<
context
>
...
...
src/adaptors/UBExportPDF.cpp
View file @
5fd617c5
...
@@ -32,6 +32,7 @@
...
@@ -32,6 +32,7 @@
#include <QtCore>
#include <QtCore>
#include <QtSvg>
#include <QtSvg>
#include <QPrinter>
#include <QPrinter>
#include <QPdfWriter>
#include "core/UBApplication.h"
#include "core/UBApplication.h"
#include "core/UBSettings.h"
#include "core/UBSettings.h"
...
@@ -40,6 +41,7 @@
...
@@ -40,6 +41,7 @@
#include "domain/UBGraphicsScene.h"
#include "domain/UBGraphicsScene.h"
#include "domain/UBGraphicsSvgItem.h"
#include "domain/UBGraphicsSvgItem.h"
#include "domain/UBGraphicsPDFItem.h"
#include "document/UBDocumentProxy.h"
#include "document/UBDocumentProxy.h"
...
@@ -66,14 +68,14 @@ void UBExportPDF::persist(UBDocumentProxy* pDocumentProxy)
...
@@ -66,14 +68,14 @@ void UBExportPDF::persist(UBDocumentProxy* pDocumentProxy)
bool
UBExportPDF
::
persistsDocument
(
UBDocumentProxy
*
pDocumentProxy
,
const
QString
&
filename
)
bool
UBExportPDF
::
persistsDocument
(
UBDocumentProxy
*
pDocumentProxy
,
const
QString
&
filename
)
{
{
QP
rinter
pdfPrinter
;
QP
dfWriter
pdfWriter
(
filename
)
;
qDebug
()
<<
"exporting document to PDF"
<<
filename
;
qDebug
()
<<
"exporting document to PDF"
<<
filename
;
pdf
Printer
.
setOutputFormat
(
QPrinter
::
PdfFormat
);
pdf
Writer
.
setResolution
(
UBSettings
::
settings
()
->
pdfResolution
->
get
().
toInt
()
);
pdf
Printer
.
setResolution
(
UBSettings
::
settings
()
->
pdfResolution
->
get
().
toInt
());
pdf
Writer
.
setPageMargins
(
QMarginsF
());
pdf
Printer
.
setOutputFileName
(
filename
);
pdf
Writer
.
setTitle
(
pDocumentProxy
->
name
()
);
pdf
Printer
.
setFullPage
(
true
);
pdf
Writer
.
setCreator
(
"OpenBoard PDF export"
);
//need to calculate screen resolution
//need to calculate screen resolution
QDesktopWidget
*
desktop
=
UBApplication
::
desktop
();
QDesktopWidget
*
desktop
=
UBApplication
::
desktop
();
...
@@ -85,37 +87,48 @@ bool UBExportPDF::persistsDocument(UBDocumentProxy* pDocumentProxy, const QStrin
...
@@ -85,37 +87,48 @@ bool UBExportPDF::persistsDocument(UBDocumentProxy* pDocumentProxy, const QStrin
int
existingPageCount
=
pDocumentProxy
->
pageCount
();
int
existingPageCount
=
pDocumentProxy
->
pageCount
();
for
(
int
pageIndex
=
0
;
pageIndex
<
existingPageCount
;
pageIndex
++
)
for
(
int
pageIndex
=
0
;
pageIndex
<
existingPageCount
;
pageIndex
++
)
{
{
UBGraphicsScene
*
scene
=
UBPersistenceManager
::
persistenceManager
()
->
loadDocumentScene
(
pDocumentProxy
,
pageIndex
);
UBGraphicsScene
*
scene
=
UBPersistenceManager
::
persistenceManager
()
->
loadDocumentScene
(
pDocumentProxy
,
pageIndex
);
UBApplication
::
showMessage
(
tr
(
"Exporting page %1 of %2"
).
arg
(
pageIndex
+
1
).
arg
(
existingPageCount
));
UBApplication
::
showMessage
(
tr
(
"Exporting page %1 of %2"
).
arg
(
pageIndex
+
1
).
arg
(
existingPageCount
));
// set background to white, no crossing for PDF output
// set background to white, no crossing for PDF output
bool
isDark
=
scene
->
isDarkBackground
();
bool
isDark
=
scene
->
isDarkBackground
();
UBPageBackground
pageBackground
=
scene
->
pageBackground
();
UBPageBackground
pageBackground
=
scene
->
pageBackground
();
scene
->
setBackground
(
false
,
UBPageBackground
::
plain
);
scene
->
setBackground
(
false
,
UBPageBackground
::
plain
);
QSize
pageSize
=
scene
->
nominalSize
();
// pageSize is the output PDF page size; it is set to equal the scene's boundary size; if the contents
// of the scene overflow from the boundaries, they will be scaled down.
QSize
pageSize
=
scene
->
sceneSize
();
// set high res rendering
// set high res rendering
scene
->
setRenderingQuality
(
UBItem
::
RenderingQualityHigh
);
scene
->
setRenderingQuality
(
UBItem
::
RenderingQualityHigh
);
scene
->
setRenderingContext
(
UBGraphicsScene
::
NonScreen
);
scene
->
setRenderingContext
(
UBGraphicsScene
::
NonScreen
);
//setting page size to appropriate value
// Setting output page size
pdfPrinter
.
setPaperSize
(
QSizeF
(
pageSize
.
width
()
*
scaleFactor
,
pageSize
.
height
()
*
scaleFactor
),
QPrinter
::
Point
);
QPageSize
outputPageSize
=
QPageSize
(
QSizeF
(
pageSize
.
width
()
*
scaleFactor
,
pageSize
.
height
()
*
scaleFactor
),
QPageSize
::
Point
);
if
(
painterNeedsBegin
)
painterNeedsBegin
=
!
pdfPainter
.
begin
(
&
pdfPrinter
);
pdfWriter
.
setPageSize
(
outputPageSize
);
//render to PDF
scene
->
render
(
&
pdfPainter
,
QRectF
(),
scene
->
normalizedSceneRect
());
// Call begin only once
if
(
painterNeedsBegin
)
painterNeedsBegin
=
!
pdfPainter
.
begin
(
&
pdfWriter
);
if
(
pageIndex
<
existingPageCount
-
1
)
pdfPrinter
.
newPage
();
else
if
(
pageIndex
<
existingPageCount
)
pdfWriter
.
newPage
();
//restore screen rendering quality
// Render the scene
scene
->
render
(
&
pdfPainter
,
QRectF
(),
scene
->
normalizedSceneRect
());
// Restore screen rendering quality
scene
->
setRenderingContext
(
UBGraphicsScene
::
Screen
);
scene
->
setRenderingContext
(
UBGraphicsScene
::
Screen
);
scene
->
setRenderingQuality
(
UBItem
::
RenderingQualityNormal
);
scene
->
setRenderingQuality
(
UBItem
::
RenderingQualityNormal
);
//
r
estore background state
//
R
estore background state
scene
->
setBackground
(
isDark
,
pageBackground
);
scene
->
setBackground
(
isDark
,
pageBackground
);
}
}
if
(
!
painterNeedsBegin
)
pdfPainter
.
end
();
if
(
!
painterNeedsBegin
)
pdfPainter
.
end
();
return
true
;
return
true
;
}
}
...
...
src/board/UBBoardController.cpp
View file @
5fd617c5
...
@@ -620,9 +620,6 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item)
...
@@ -620,9 +620,6 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item)
itemSize
=
commonItem
->
boundingRect
().
size
();
itemSize
=
commonItem
->
boundingRect
().
size
();
commonItem
->
setSelected
(
false
);
commonItem
->
setSelected
(
false
);
UBGraphicsStrokesGroup
*
stroke
=
dynamic_cast
<
UBGraphicsStrokesGroup
*>
(
commonItem
);
if
(
stroke
)
itemPos
=
QPointF
(
shifting
,
shifting
);
}
}
UBMimeType
::
Enum
itemMimeType
;
UBMimeType
::
Enum
itemMimeType
;
...
@@ -681,7 +678,7 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item)
...
@@ -681,7 +678,7 @@ UBGraphicsItem *UBBoardController::duplicateItem(UBItem *item)
{
{
QBuffer
buffer
(
&
pData
);
QBuffer
buffer
(
&
pData
);
buffer
.
open
(
QIODevice
::
WriteOnly
);
buffer
.
open
(
QIODevice
::
WriteOnly
);
QString
format
=
UBFileSystemUtils
::
extension
(
item
->
sourceUrl
().
to
LocalFile
(
));
QString
format
=
UBFileSystemUtils
::
extension
(
item
->
sourceUrl
().
to
String
(
QUrl
::
DecodeReserved
));
pixitem
->
pixmap
().
save
(
&
buffer
,
format
.
toLatin1
());
pixitem
->
pixmap
().
save
(
&
buffer
,
format
.
toLatin1
());
}
}
}
break
;
}
break
;
...
...
src/board/UBBoardPaletteManager.cpp
View file @
5fd617c5
...
@@ -74,6 +74,7 @@
...
@@ -74,6 +74,7 @@
#include "document/UBDocumentController.h"
#include "document/UBDocumentController.h"
#include "core/UBPersistenceManager.h"
#include "core/memcheck.h"
#include "core/memcheck.h"
UBBoardPaletteManager
::
UBBoardPaletteManager
(
QWidget
*
container
,
UBBoardController
*
pBoardController
)
UBBoardPaletteManager
::
UBBoardPaletteManager
(
QWidget
*
container
,
UBBoardController
*
pBoardController
)
...
@@ -862,7 +863,11 @@ void UBBoardPaletteManager::addItemToCurrentPage()
...
@@ -862,7 +863,11 @@ void UBBoardPaletteManager::addItemToCurrentPage()
{
{
UBGraphicsPixmapItem
*
item
=
UBApplication
::
boardController
->
activeScene
()
->
addPixmap
(
mPixmap
,
NULL
,
mPos
,
mScaleFactor
);
UBGraphicsPixmapItem
*
item
=
UBApplication
::
boardController
->
activeScene
()
->
addPixmap
(
mPixmap
,
NULL
,
mPos
,
mScaleFactor
);
item
->
setSourceUrl
(
mItemUrl
);
QString
documentPath
=
UBApplication
::
boardController
->
selectedDocument
()
->
persistencePath
();
QString
fileName
=
UBPersistenceManager
::
imageDirectory
+
"/"
+
item
->
uuid
().
toString
()
+
".png"
;
QString
path
=
documentPath
+
"/"
+
fileName
;
item
->
setSourceUrl
(
QUrl
(
path
));
item
->
setSelected
(
true
);
item
->
setSelected
(
true
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
...
...
src/core/UBApplication.cpp
View file @
5fd617c5
...
@@ -511,13 +511,7 @@ void UBApplication::decorateActionMenu(QAction* action)
...
@@ -511,13 +511,7 @@ void UBApplication::decorateActionMenu(QAction* action)
menu
->
addSeparator
();
menu
->
addSeparator
();
menu
->
addAction
(
mainWindow
->
actionPreferences
);
menu
->
addAction
(
mainWindow
->
actionPreferences
);
menu
->
addAction
(
mainWindow
->
actionMultiScreen
);
menu
->
addAction
(
mainWindow
->
actionMultiScreen
);
// SANKORE-48: Hide the check update action if the setting
// EnableAutomaticSoftwareUpdates is false in Uniboard.config
if
(
UBSettings
::
settings
()
->
appEnableAutomaticSoftwareUpdates
->
get
().
toBool
())
menu
->
addAction
(
mainWindow
->
actionCheckUpdate
);
menu
->
addAction
(
mainWindow
->
actionCheckUpdate
);
else
mainWindow
->
actionCheckUpdate
->
setEnabled
(
false
);
menu
->
addSeparator
();
menu
->
addSeparator
();
menu
->
addAction
(
mainWindow
->
actionPodcast
);
menu
->
addAction
(
mainWindow
->
actionPodcast
);
...
...
src/core/UBApplicationController.cpp
View file @
5fd617c5
...
@@ -479,7 +479,7 @@ void UBApplicationController::checkUpdate(const QUrl& url)
...
@@ -479,7 +479,7 @@ void UBApplicationController::checkUpdate(const QUrl& url)
{
{
QUrl
jsonUrl
=
url
;
QUrl
jsonUrl
=
url
;
if
(
url
.
isEmpty
())
if
(
url
.
isEmpty
())
jsonUrl
=
UBSettings
::
settings
()
->
appSoftwareUpdateUR
I
->
get
().
toUrl
();
jsonUrl
=
UBSettings
::
settings
()
->
appSoftwareUpdateUR
L
->
get
().
toUrl
();
qDebug
()
<<
"Checking for update at url: "
<<
jsonUrl
.
toString
();
qDebug
()
<<
"Checking for update at url: "
<<
jsonUrl
.
toString
();
...
...
src/core/UBPreferencesController.cpp
View file @
5fd617c5
...
@@ -190,8 +190,6 @@ void UBPreferencesController::wire()
...
@@ -190,8 +190,6 @@ void UBPreferencesController::wire()
// about tab
// about tab
connect
(
mPreferencesUI
->
checkSoftwareUpdateAtLaunchCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
appEnableAutomaticSoftwareUpdates
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
checkSoftwareUpdateAtLaunchCheckBox
,
SIGNAL
(
clicked
(
bool
)),
settings
->
appEnableAutomaticSoftwareUpdates
,
SLOT
(
setBool
(
bool
)));
// As we (hopefully temporarily) don't have a website to check updates at, this setting is hidden for now
mPreferencesUI
->
softwareUpdateGroupBox
->
setVisible
(
false
);
connect
(
mPreferencesUI
->
checkOpenSankoreAtStartup
,
SIGNAL
(
clicked
(
bool
)),
settings
->
appLookForOpenSankoreInstall
,
SLOT
(
setBool
(
bool
)));
connect
(
mPreferencesUI
->
checkOpenSankoreAtStartup
,
SIGNAL
(
clicked
(
bool
)),
settings
->
appLookForOpenSankoreInstall
,
SLOT
(
setBool
(
bool
)));
}
}
...
...
src/core/UBSettings.cpp
View file @
5fd617c5
...
@@ -227,8 +227,7 @@ void UBSettings::init()
...
@@ -227,8 +227,7 @@ void UBSettings::init()
appToolBarPositionedAtTop
=
new
UBSetting
(
this
,
"App"
,
"ToolBarPositionedAtTop"
,
true
);
appToolBarPositionedAtTop
=
new
UBSetting
(
this
,
"App"
,
"ToolBarPositionedAtTop"
,
true
);
appToolBarDisplayText
=
new
UBSetting
(
this
,
"App"
,
"ToolBarDisplayText"
,
true
);
appToolBarDisplayText
=
new
UBSetting
(
this
,
"App"
,
"ToolBarDisplayText"
,
true
);
appEnableAutomaticSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableAutomaticSoftwareUpdates"
,
false
);
appEnableAutomaticSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableAutomaticSoftwareUpdates"
,
false
);
appEnableSoftwareUpdates
=
new
UBSetting
(
this
,
"App"
,
"EnableSoftwareUpdates"
,
true
);
appSoftwareUpdateURL
=
new
UBSetting
(
this
,
"App"
,
"SoftwareUpdateURL"
,
"http://www.openboard.ch/update.json"
);
appSoftwareUpdateURI
=
new
UBSetting
(
this
,
"App"
,
"SoftwareUpdateURI"
,
"http://www.openboard.ch/update.json"
);
appToolBarOrientationVertical
=
new
UBSetting
(
this
,
"App"
,
"ToolBarOrientationVertical"
,
false
);
appToolBarOrientationVertical
=
new
UBSetting
(
this
,
"App"
,
"ToolBarOrientationVertical"
,
false
);
appPreferredLanguage
=
new
UBSetting
(
this
,
"App"
,
"PreferredLanguage"
,
""
);
appPreferredLanguage
=
new
UBSetting
(
this
,
"App"
,
"PreferredLanguage"
,
""
);
...
@@ -281,7 +280,7 @@ void UBSettings::init()
...
@@ -281,7 +280,7 @@ void UBSettings::init()
pageSize
=
new
UBSetting
(
this
,
"Board"
,
"DefaultPageSize"
,
documentSizes
.
value
(
DocumentSizeRatio
::
Ratio4_3
));
pageSize
=
new
UBSetting
(
this
,
"Board"
,
"DefaultPageSize"
,
documentSizes
.
value
(
DocumentSizeRatio
::
Ratio4_3
));
boardCrossColorDarkBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorDarkBackground"
,
"#C8
2C2C2C
"
);
boardCrossColorDarkBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorDarkBackground"
,
"#C8
C0C0C0
"
);
boardCrossColorLightBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorLightBackground"
,
"#A5E1FF"
);
boardCrossColorLightBackground
=
new
UBSetting
(
this
,
"Board"
,
"CrossColorLightBackground"
,
"#A5E1FF"
);
QStringList
penLightBackgroundColors
;
QStringList
penLightBackgroundColors
;
...
...
src/core/UBSettings.h
View file @
5fd617c5
...
@@ -243,8 +243,7 @@ class UBSettings : public QObject
...
@@ -243,8 +243,7 @@ class UBSettings : public QObject
UBSetting
*
appToolBarPositionedAtTop
;
UBSetting
*
appToolBarPositionedAtTop
;
UBSetting
*
appToolBarDisplayText
;
UBSetting
*
appToolBarDisplayText
;
UBSetting
*
appEnableAutomaticSoftwareUpdates
;
UBSetting
*
appEnableAutomaticSoftwareUpdates
;
UBSetting
*
appEnableSoftwareUpdates
;
UBSetting
*
appSoftwareUpdateURL
;
UBSetting
*
appSoftwareUpdateURI
;
UBSetting
*
appToolBarOrientationVertical
;
UBSetting
*
appToolBarOrientationVertical
;
UBSetting
*
appPreferredLanguage
;
UBSetting
*
appPreferredLanguage
;
...
...
src/document/UBDocumentController.cpp
View file @
5fd617c5
...
@@ -546,37 +546,66 @@ void UBDocumentController::duplicateSelectedItem()
...
@@ -546,37 +546,66 @@ void UBDocumentController::duplicateSelectedItem()
}
}
/**
/**
* @brief
When deleting multiple documents, find a new document and select i
t
* @brief
Set the first document in the list as current documen
t
*
*
*
This method simply selects the first un-selected document
*
If there are no documents, a new one is created.
*/
*/
void
UBDocumentController
::
select
ADocumentOnMultipleTrashing
()
void
UBDocumentController
::
select
FirstDocumentInList
()
{
{
// Loop through all folders
, and each document in those folders, until we find
// Loop through all folders
until we find one that is not the trash and not empty,
// a
document that is not in the current selection (which is being deleted)
// a
nd select the first document in that folder
for
(
int
i
(
0
);
i
<
mDocumentUI
->
documentTreeWidget
->
topLevelItemCount
();
++
i
)
{
for
(
int
i
(
0
);
i
<
mDocumentUI
->
documentTreeWidget
->
topLevelItemCount
();
++
i
)
{
QTreeWidgetItem
*
item
=
mDocumentUI
->
documentTreeWidget
->
topLevelItem
(
i
);
QTreeWidgetItem
*
item
=
mDocumentUI
->
documentTreeWidget
->
topLevelItem
(
i
);
UBDocumentGroupTreeItem
*
groupItem
=
dynamic_cast
<
UBDocumentGroupTreeItem
*>
(
item
);
UBDocumentGroupTreeItem
*
groupItem
=
dynamic_cast
<
UBDocumentGroupTreeItem
*>
(
item
);
if
(
!
groupItem
->
isTrashFolder
())
{
if
(
!
groupItem
->
isTrashFolder
()
&&
groupItem
->
childCount
()
>
0
)
{
for
(
int
j
(
0
);
j
<
groupItem
->
childCount
();
++
j
)
{
selectDocument
(((
UBDocumentProxyTreeItem
*
)
groupItem
->
child
(
0
))
->
proxy
(),
true
);
if
(
!
mCurrentSelection
.
contains
(
groupItem
->
child
(
j
)
))
{
groupItem
->
child
(
0
)
->
setSelected
(
true
);
selectDocument
(((
UBDocumentProxyTreeItem
*
)
groupItem
->
child
(
j
))
->
proxy
(),
true
);
return
;
return
;
}
}
}
}
}
}
// No document found => create a new one
// No document found => create a new one
UBDocumentGroupTreeItem
*
topFolder
=
dynamic_cast
<
UBDocumentGroupTreeItem
*>
(
mDocumentUI
->
documentTreeWidget
->
topLevelItem
(
0
));
UBDocumentGroupTreeItem
*
topFolder
=
dynamic_cast
<
UBDocumentGroupTreeItem
*>
(
mDocumentUI
->
documentTreeWidget
->
topLevelItem
(
0
));
UBDocumentProxy
*
document
=
UBPersistenceManager
::
persistenceManager
()
->
createDocument
(
topFolder
->
groupName
());
UBDocumentProxy
*
document
=
UBPersistenceManager
::
persistenceManager
()
->
createDocument
(
topFolder
->
groupName
());
selectDocument
(
document
,
true
);
selectDocument
(
document
,
true
);
}
/**
* @brief Find the current document, and select it in the list
*
* If selectNewCurrentDocument is true, the first document in the list is selected and set as
* current document.
*/
void
UBDocumentController
::
selectATreeItemOnMultipleTrashing
(
bool
selectNewCurrentDocument
)
{
mCurrentSelection
.
clear
();
if
(
selectNewCurrentDocument
)
{
selectFirstDocumentInList
();
return
;
}
// Find the currently selected document, and select its corresponding tree item
// If it isn't found, then the first document in the list is selected and set as current document
for
(
int
i
(
0
);
i
<
mDocumentUI
->
documentTreeWidget
->
topLevelItemCount
();
i
++
)
{
QTreeWidgetItem
*
item
=
mDocumentUI
->
documentTreeWidget
->
topLevelItem
(
i
);
UBDocumentGroupTreeItem
*
groupItem
=
dynamic_cast
<
UBDocumentGroupTreeItem
*>
(
item
);
if
(
!
groupItem
->
isTrashFolder
())
{
for
(
int
j
(
0
);
j
<
groupItem
->
childCount
();
j
++
)
{
if
(((
UBDocumentProxyTreeItem
*
)
groupItem
->
child
(
j
))
->
proxy
()
==
mBoardController
->
selectedDocument
())
{
((
UBDocumentProxyTreeItem
*
)
groupItem
->
child
(
j
))
->
setSelected
(
true
);
return
;
}
}
}
}
selectFirstDocumentInList
();
}
}
void
UBDocumentController
::
selectADocumentOnTrashingSelectedOne
(
UBDocumentGroupTreeItem
*
groupTi
,
UBDocumentProxyTreeItem
*
proxyTi
)
void
UBDocumentController
::
selectADocumentOnTrashingSelectedOne
(
UBDocumentGroupTreeItem
*
groupTi
,
UBDocumentProxyTreeItem
*
proxyTi
)
...
@@ -807,9 +836,9 @@ void UBDocumentController::deleteTreeItem(QTreeWidgetItem * item, bool showConfi
...
@@ -807,9 +836,9 @@ void UBDocumentController::deleteTreeItem(QTreeWidgetItem * item, bool showConfi
if
(
selectNewDocument
)
{
if
(
selectNewDocument
)
{
if
(
mTrashTi
->
childCount
()
==
0
)
if
(
mTrashTi
->
childCount
()
==
0
)
select
Document
(
NULL
);
select
ATreeItemOnMultipleTrashing
(
false
);
else
else
selectDocument
(((
UBDocumentProxyTreeItem
*
)
mTrashTi
->
child
(
0
))
->
proxy
());
selectDocument
(((
UBDocumentProxyTreeItem
*
)
mTrashTi
->
child
(
0
))
->
proxy
()
,
false
);
}
}
reloadThumbnails
();
reloadThumbnails
();
...
@@ -849,11 +878,18 @@ void UBDocumentController::deleteSelectedItem()
...
@@ -849,11 +878,18 @@ void UBDocumentController::deleteSelectedItem()
QList
<
QTreeWidgetItem
*>
foldersToDelete
;
QList
<
QTreeWidgetItem
*>
foldersToDelete
;
bool
currentDocumentDeleted
=
false
;
foreach
(
QTreeWidgetItem
*
item
,
mCurrentSelection
)
{
foreach
(
QTreeWidgetItem
*
item
,
mCurrentSelection
)
{
LastSelectedElementType
type
=
itemType
(
item
);
LastSelectedElementType
type
=
itemType
(
item
);
if
(
type
==
Document
)
if
(
type
==
Document
)
{
deleteTreeItem
(
item
,
false
,
false
);
deleteTreeItem
(
item
,
false
,
false
);
UBDocumentProxyTreeItem
*
proxyItem
=
dynamic_cast
<
UBDocumentProxyTreeItem
*>
(
item
);
if
(
proxyItem
&&
proxyItem
->
proxy
()
&&
(
proxyItem
->
proxy
()
==
mBoardController
->
selectedDocument
()))
currentDocumentDeleted
=
true
;
}
else
if
(
type
==
Folder
)
else
if
(
type
==
Folder
)
// Delete folders later, to avoid deleting a document twice
// Delete folders later, to avoid deleting a document twice
foldersToDelete
<<
item
;
foldersToDelete
<<
item
;
...
@@ -863,7 +899,7 @@ void UBDocumentController::deleteSelectedItem()
...
@@ -863,7 +899,7 @@ void UBDocumentController::deleteSelectedItem()
deleteTreeItem
(
item
,
false
,
false
);
deleteTreeItem
(
item
,
false
,
false
);
}
}
selectA
DocumentOnMultipleTrashing
(
);
selectA
TreeItemOnMultipleTrashing
(
currentDocumentDeleted
);
}
}
else
if
(
mSelectionType
==
Document
||
mSelectionType
==
Folder
)
{
else
if
(
mSelectionType
==
Document
||
mSelectionType
==
Folder
)
{
...
...
src/document/UBDocumentController.h
View file @
5fd617c5
...
@@ -130,7 +130,8 @@ class UBDocumentController : public UBDocumentContainer
...
@@ -130,7 +130,8 @@ class UBDocumentController : public UBDocumentContainer
QString
mDefaultDocumentGroupName
;
QString
mDefaultDocumentGroupName
;
void
selectADocumentOnTrashingSelectedOne
(
UBDocumentGroupTreeItem
*
groupTi
,
UBDocumentProxyTreeItem
*
proxyTi
);
void
selectADocumentOnTrashingSelectedOne
(
UBDocumentGroupTreeItem
*
groupTi
,
UBDocumentProxyTreeItem
*
proxyTi
);
void
selectADocumentOnMultipleTrashing
();
void
selectFirstDocumentInList
();
void
selectATreeItemOnMultipleTrashing
(
bool
selectNewCurrentDocument
=
false
);
void
moveDocumentToTrash
(
UBDocumentGroupTreeItem
*
groupTi
,
UBDocumentProxyTreeItem
*
proxyTi
,
bool
selectNewDocument
);
void
moveDocumentToTrash
(
UBDocumentGroupTreeItem
*
groupTi
,
UBDocumentProxyTreeItem
*
proxyTi
,
bool
selectNewDocument
);
void
moveFolderToTrash
(
UBDocumentGroupTreeItem
*
groupTi
);
void
moveFolderToTrash
(
UBDocumentGroupTreeItem
*
groupTi
);
void
emptyTrash
(
bool
showConfirmationDialog
);
void
emptyTrash
(
bool
showConfirmationDialog
);
...
...
src/domain/UBGraphicsItemUndoCommand.cpp
View file @
5fd617c5
...
@@ -98,7 +98,28 @@ void UBGraphicsItemUndoCommand::undo()
...
@@ -98,7 +98,28 @@ void UBGraphicsItemUndoCommand::undo()
UBApplication
::
boardController
->
freezeW3CWidget
(
item
,
true
);
UBApplication
::
boardController
->
freezeW3CWidget
(
item
,
true
);
item
->
setSelected
(
false
);
item
->
setSelected
(
false
);
QTransform
t
;
bool
bApplyTransform
=
false
;
UBGraphicsPolygonItem
*
polygonItem
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
polygonItem
){
if
(
polygonItem
->
strokesGroup
()
&&
polygonItem
->
strokesGroup
()
->
parentItem
()
&&
UBGraphicsGroupContainerItem
::
Type
==
polygonItem
->
strokesGroup
()
->
parentItem
()
->
type
())
{
bApplyTransform
=
true
;
t
=
polygonItem
->
sceneTransform
();
}
else
if
(
polygonItem
->
strokesGroup
())
polygonItem
->
resetTransform
();
polygonItem
->
strokesGroup
()
->
removeFromGroup
(
polygonItem
);
}
mScene
->
removeItem
(
item
);
mScene
->
removeItem
(
item
);
if
(
bApplyTransform
)
polygonItem
->
setTransform
(
t
);
}
}
QSetIterator
<
QGraphicsItem
*>
itRemoved
(
mRemovedItems
);
QSetIterator
<
QGraphicsItem
*>
itRemoved
(
mRemovedItems
);
...
@@ -207,7 +228,29 @@ void UBGraphicsItemUndoCommand::redo()
...
@@ -207,7 +228,29 @@ void UBGraphicsItemUndoCommand::redo()
{
{
QGraphicsItem
*
item
=
itRemoved
.
next
();
QGraphicsItem
*
item
=
itRemoved
.
next
();
item
->
setSelected
(
false
);
item
->
setSelected
(
false
);
QTransform
t
;
bool
bApplyTransform
=
false
;
UBGraphicsPolygonItem
*
polygonItem
=
qgraphicsitem_cast
<
UBGraphicsPolygonItem
*>
(
item
);
if
(
polygonItem
){
if
(
polygonItem
->
strokesGroup
()
&&
polygonItem
->
strokesGroup
()
->
parentItem
()
&&
UBGraphicsGroupContainerItem
::
Type
==
polygonItem
->
strokesGroup
()
->
parentItem
()
->
type
())
{
bApplyTransform
=
true
;
t
=
polygonItem
->
sceneTransform
();
}
else
if
(
polygonItem
->
strokesGroup
())
polygonItem
->
resetTransform
();
polygonItem
->
strokesGroup
()
->
removeFromGroup
(
polygonItem
);
}
mScene
->
removeItem
(
item
);
mScene
->
removeItem
(
item
);
if
(
bApplyTransform
)
item
->
setTransform
(
t
);
UBApplication
::
boardController
->
freezeW3CWidget
(
item
,
true
);
UBApplication
::
boardController
->
freezeW3CWidget
(
item
,
true
);
}
}
...
...
src/domain/UBGraphicsMediaItem.cpp
View file @
5fd617c5
...
@@ -130,7 +130,14 @@ UBGraphicsVideoItem::UBGraphicsVideoItem(const QUrl &pMediaFileUrl, QGraphicsIte
...
@@ -130,7 +130,14 @@ UBGraphicsVideoItem::UBGraphicsVideoItem(const QUrl &pMediaFileUrl, QGraphicsIte
mVideoItem
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
UBItemLayerType
::
Object
);
mVideoItem
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
UBItemLayerType
::
Object
);
mVideoItem
->
setFlag
(
ItemStacksBehindParent
,
true
);
mVideoItem
->
setFlag
(
ItemStacksBehindParent
,
true
);
mMediaObject
->
setVideoOutput
(
mVideoItem
);
/* setVideoOutput has to be called only when the video item is visible on the screen,
* due to a Qt bug (QTBUG-32522). So instead of calling it here, it is called when the
* active scene has changed, or when the item is first created.
* If and when Qt fix this issue, this should be changed back.
* */
//mMediaObject->setVideoOutput(mVideoItem);
mHasVideoOutput
=
false
;
mMediaObject
->
setNotifyInterval
(
50
);
mMediaObject
->
setNotifyInterval
(
50
);
setMinimumSize
(
QSize
(
320
,
240
));
setMinimumSize
(
QSize
(
320
,
240
));
...
@@ -155,8 +162,10 @@ UBGraphicsVideoItem::UBGraphicsVideoItem(const QUrl &pMediaFileUrl, QGraphicsIte
...
@@ -155,8 +162,10 @@ UBGraphicsVideoItem::UBGraphicsVideoItem(const QUrl &pMediaFileUrl, QGraphicsIte
UBGraphicsMediaItem
::~
UBGraphicsMediaItem
()
UBGraphicsMediaItem
::~
UBGraphicsMediaItem
()
{
{
if
(
mMediaObject
)
if
(
mMediaObject
)
{
mMediaObject
->
stop
();
mMediaObject
->
stop
();
delete
mMediaObject
;
}
}
}
QVariant
UBGraphicsMediaItem
::
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
)
QVariant
UBGraphicsMediaItem
::
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
)
...
@@ -569,6 +578,22 @@ void UBGraphicsVideoItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
...
@@ -569,6 +578,22 @@ void UBGraphicsVideoItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
}
}
QVariant
UBGraphicsVideoItem
::
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
)
{
if
(
change
==
QGraphicsItem
::
ItemVisibleChange
&&
value
.
toBool
()
&&
!
mHasVideoOutput
&&
UBApplication
::
app
()
->
boardController
&&
UBApplication
::
app
()
->
boardController
->
activeScene
()
==
scene
())
{
//qDebug() << "Item change, setting video output";
mMediaObject
->
setVideoOutput
(
mVideoItem
);
mHasVideoOutput
=
true
;
}
return
UBGraphicsMediaItem
::
itemChange
(
change
,
value
);
}
void
UBGraphicsVideoItem
::
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
)
void
UBGraphicsVideoItem
::
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
{
// Display the seek bar
// Display the seek bar
...
@@ -610,9 +635,19 @@ void UBGraphicsVideoItem::mediaStateChanged(QMediaPlayer::State state)
...
@@ -610,9 +635,19 @@ void UBGraphicsVideoItem::mediaStateChanged(QMediaPlayer::State state)
void
UBGraphicsVideoItem
::
activeSceneChanged
()
void
UBGraphicsVideoItem
::
activeSceneChanged
()
{
{
//qDebug() << "Active scene changed";
// Update the visibility of the placeholder, to prevent it being hidden when switching pages
// Update the visibility of the placeholder, to prevent it being hidden when switching pages
setPlaceholderVisible
(
!
mErrorString
.
isEmpty
());
setPlaceholderVisible
(
!
mErrorString
.
isEmpty
());
// Call setVideoOutput, if the video is visible and if it hasn't been called already
if
(
!
mHasVideoOutput
&&
UBApplication
::
boardController
->
activeScene
()
==
scene
())
{
//qDebug() << "setting video output";
mMediaObject
->
setMedia
(
mMediaFileUrl
);
mMediaObject
->
setVideoOutput
(
mVideoItem
);
mHasVideoOutput
=
true
;
}
UBGraphicsMediaItem
::
activeSceneChanged
();
UBGraphicsMediaItem
::
activeSceneChanged
();
}
}
...
...
src/domain/UBGraphicsMediaItem.h
View file @
5fd617c5
...
@@ -207,11 +207,14 @@ protected:
...
@@ -207,11 +207,14 @@ protected:
QGraphicsVideoItem
*
mVideoItem
;
QGraphicsVideoItem
*
mVideoItem
;
virtual
QVariant
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
);
virtual
void
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
event
);
virtual
void
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
event
);
void
setPlaceholderVisible
(
bool
visible
);
void
setPlaceholderVisible
(
bool
visible
);
bool
mHasVideoOutput
;
};
};
...
...
src/domain/UBGraphicsScene.cpp
View file @
5fd617c5
...
@@ -2336,15 +2336,19 @@ QList<QUrl> UBGraphicsScene::relativeDependencies() const
...
@@ -2336,15 +2336,19 @@ QList<QUrl> UBGraphicsScene::relativeDependencies() const
while
(
itItems
.
hasNext
())
while
(
itItems
.
hasNext
())
{
{
QGraphicsItem
*
item
=
itItems
.
next
();
QGraphicsItem
*
item
=
itItems
.
next
();
UBGraphicsMediaItem
*
mediaItem
=
qgraphicsitem_cast
<
UBGraphicsMediaItem
*>
(
item
);
if
(
mediaItem
){
UBGraphicsVideoItem
*
videoItem
=
qgraphicsitem_cast
<
UBGraphicsVideoItem
*>
(
item
);
QString
completeFileName
=
QFileInfo
(
mediaItem
->
mediaFileUrl
().
toLocalFile
()).
fileName
();
if
(
videoItem
){
QString
path
;
QString
completeFileName
=
QFileInfo
(
videoItem
->
mediaFileUrl
().
toLocalFile
()).
fileName
();
if
(
mediaItem
->
getMediaType
()
==
UBGraphicsMediaItem
::
mediaType_Video
)
QString
path
=
UBPersistenceManager
::
videoDirectory
+
"/"
;
path
=
UBPersistenceManager
::
videoDirectory
+
"/"
;
relativePathes
<<
QUrl
(
path
+
completeFileName
);
else
continue
;
path
=
UBPersistenceManager
::
audioDirectory
+
"/"
;
}
UBGraphicsAudioItem
*
audioItem
=
qgraphicsitem_cast
<
UBGraphicsAudioItem
*>
(
item
);
if
(
audioItem
){
QString
completeFileName
=
QFileInfo
(
audioItem
->
mediaFileUrl
().
toLocalFile
()).
fileName
();
QString
path
=
UBPersistenceManager
::
audioDirectory
+
"/"
;
relativePathes
<<
QUrl
(
path
+
completeFileName
);
relativePathes
<<
QUrl
(
path
+
completeFileName
);
continue
;
continue
;
}
}
...
@@ -2384,6 +2388,24 @@ QSize UBGraphicsScene::nominalSize()
...
@@ -2384,6 +2388,24 @@ QSize UBGraphicsScene::nominalSize()
return
mNominalSize
;
return
mNominalSize
;
}
}
/**
* @brief Return the scene's boundary size, including any background item
*
* If no background item is present, this returns nominalSize()
*/
QSize
UBGraphicsScene
::
sceneSize
()
{
UBGraphicsPDFItem
*
pdfItem
=
qgraphicsitem_cast
<
UBGraphicsPDFItem
*>
(
backgroundObject
());
if
(
pdfItem
)
{
QRectF
targetRect
=
pdfItem
->
sceneBoundingRect
();
return
targetRect
.
size
().
toSize
();
}
else
return
nominalSize
();
}
void
UBGraphicsScene
::
setNominalSize
(
const
QSize
&
pSize
)
void
UBGraphicsScene
::
setNominalSize
(
const
QSize
&
pSize
)
{
{
if
(
nominalSize
()
!=
pSize
)
if
(
nominalSize
()
!=
pSize
)
...
...
src/domain/UBGraphicsScene.h
View file @
5fd617c5
...
@@ -286,6 +286,8 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
...
@@ -286,6 +286,8 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
QSize
nominalSize
();
QSize
nominalSize
();
QSize
sceneSize
();
void
setNominalSize
(
const
QSize
&
pSize
);
void
setNominalSize
(
const
QSize
&
pSize
);
void
setNominalSize
(
int
pWidth
,
int
pHeight
);
void
setNominalSize
(
int
pWidth
,
int
pHeight
);
...
...
src/domain/UBGraphicsStrokesGroup.cpp
View file @
5fd617c5
...
@@ -148,12 +148,15 @@ void UBGraphicsStrokesGroup::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
...
@@ -148,12 +148,15 @@ void UBGraphicsStrokesGroup::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
UBItem
*
UBGraphicsStrokesGroup
::
deepCopy
()
const
UBItem
*
UBGraphicsStrokesGroup
::
deepCopy
()
const
{
{
QTransform
groupTransform
=
transform
();
QTransform
groupTransform
=
transform
();
QPointF
groupPos
=
pos
();
UBGraphicsStrokesGroup
*
copy
=
new
UBGraphicsStrokesGroup
();
UBGraphicsStrokesGroup
*
copy
=
new
UBGraphicsStrokesGroup
();
copyItemParameters
(
copy
);
copyItemParameters
(
copy
);
copy
->
resetTransform
();
copy
->
resetTransform
();
copy
->
setPos
(
0
,
0
);
const_cast
<
UBGraphicsStrokesGroup
*>
(
this
)
->
resetTransform
();
const_cast
<
UBGraphicsStrokesGroup
*>
(
this
)
->
resetTransform
();
const_cast
<
UBGraphicsStrokesGroup
*>
(
this
)
->
setPos
(
0
,
0
);
QList
<
QGraphicsItem
*>
chl
=
childItems
();
QList
<
QGraphicsItem
*>
chl
=
childItems
();
...
@@ -175,7 +178,9 @@ UBItem* UBGraphicsStrokesGroup::deepCopy() const
...
@@ -175,7 +178,9 @@ UBItem* UBGraphicsStrokesGroup::deepCopy() const
}
}
}
}
const_cast
<
UBGraphicsStrokesGroup
*>
(
this
)
->
setTransform
(
groupTransform
);
const_cast
<
UBGraphicsStrokesGroup
*>
(
this
)
->
setTransform
(
groupTransform
);
const_cast
<
UBGraphicsStrokesGroup
*>
(
this
)
->
setPos
(
groupPos
);
copy
->
setTransform
(
groupTransform
);
copy
->
setTransform
(
groupTransform
);
copy
->
setPos
(
groupPos
);
return
copy
;
return
copy
;
}
}
...
...
src/gui/UBDocumentTreeWidget.cpp
View file @
5fd617c5
...
@@ -285,13 +285,16 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
...
@@ -285,13 +285,16 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
QString
source
=
scene
->
document
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
source
=
scene
->
document
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
target
=
targetDocProxy
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
target
=
targetDocProxy
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
();
QString
sourceDecoded
=
scene
->
document
()
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
(
QUrl
::
DecodeReserved
);
QString
targetDecoded
=
targetDocProxy
->
persistencePath
()
+
"/"
+
relativeFile
.
toString
(
QUrl
::
DecodeReserved
);
if
(
QFileInfo
(
source
).
isDir
())
if
(
QFileInfo
(
source
).
isDir
())
UBFileSystemUtils
::
copyDir
(
source
,
target
);
UBFileSystemUtils
::
copyDir
(
source
,
target
);
else
{
else
{
QFileInfo
fi
(
target
);
QFileInfo
fi
(
target
Decoded
);
QDir
d
=
fi
.
dir
();
QDir
d
=
fi
.
dir
();
d
.
mkpath
(
d
.
absolutePath
());
d
.
mkpath
(
d
.
absolutePath
());
QFile
::
copy
(
source
,
target
);
QFile
::
copy
(
source
Decoded
,
targetDecoded
);
}
}
}
}
...
...
src/tools/UBGraphicsCurtainItemDelegate.cpp
View file @
5fd617c5
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
#include "core/memcheck.h"
#include "core/memcheck.h"
UBGraphicsCurtainItemDelegate
::
UBGraphicsCurtainItemDelegate
(
UBGraphicsCurtainItem
*
pDelegated
,
QObject
*
parent
)
UBGraphicsCurtainItemDelegate
::
UBGraphicsCurtainItemDelegate
(
UBGraphicsCurtainItem
*
pDelegated
,
QObject
*
parent
)
:
UBGraphicsItemDelegate
(
pDelegated
,
parent
,
GF_
SCALABLE_ALL_AXIS
|
GF_
MENU_SPECIFIED
)
:
UBGraphicsItemDelegate
(
pDelegated
,
parent
,
GF_MENU_SPECIFIED
)
{
{
//NOOP
//NOOP
}
}
...
...
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