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
7e0ec83a
Commit
7e0ec83a
authored
Aug 20, 2012
by
Claudio Valerio
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
e0324211
9b8694c9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
0 deletions
+40
-0
UBSvgSubsetAdaptor.cpp
src/adaptors/UBSvgSubsetAdaptor.cpp
+6
-0
UBGraphicsItemDelegate.cpp
src/domain/UBGraphicsItemDelegate.cpp
+7
-0
UBGraphicsItemDelegate.h
src/domain/UBGraphicsItemDelegate.h
+2
-0
UBGraphicsTextItemDelegate.cpp
src/domain/UBGraphicsTextItemDelegate.cpp
+23
-0
UBGraphicsTextItemDelegate.h
src/domain/UBGraphicsTextItemDelegate.h
+2
-0
No files found.
src/adaptors/UBSvgSubsetAdaptor.cpp
View file @
7e0ec83a
...
...
@@ -2769,6 +2769,12 @@ UBGraphicsTextItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::textItemFromSvg()
}
}
QTextCursor
curCursor
=
textItem
->
textCursor
();
QTextCharFormat
format
;
format
.
setFont
(
font
);
curCursor
.
mergeCharFormat
(
format
);
textItem
->
setTextCursor
(
curCursor
);
textItem
->
setFont
(
font
);
QStringRef
fill
=
mXmlReader
.
attributes
().
value
(
"color"
);
...
...
src/domain/UBGraphicsItemDelegate.cpp
View file @
7e0ec83a
...
...
@@ -115,6 +115,7 @@ UBGraphicsItemDelegate::UBGraphicsItemDelegate(QGraphicsItem* pDelegated, QObjec
,
mToolBarUsed
(
useToolBar
)
{
// NOOP
connect
(
UBApplication
::
boardController
,
SIGNAL
(
zoomChanged
(
qreal
)),
this
,
SLOT
(
onZoomChanged
()));
}
void
UBGraphicsItemDelegate
::
init
()
...
...
@@ -535,6 +536,12 @@ void UBGraphicsItemDelegate::commitUndoStep()
}
}
void
UBGraphicsItemDelegate
::
onZoomChanged
()
{
mAntiScaleRatio
=
1
/
(
UBApplication
::
boardController
->
systemScaleFactor
()
*
UBApplication
::
boardController
->
currentZoom
());
positionHandles
();
}
void
UBGraphicsItemDelegate
::
buildButtons
()
{
...
...
src/domain/UBGraphicsItemDelegate.h
View file @
7e0ec83a
...
...
@@ -259,6 +259,8 @@ class UBGraphicsItemDelegate : public QObject
void
increaseZlevelTop
();
void
increaseZlevelBottom
();
void
onZoomChanged
();
protected
:
virtual
void
buildButtons
();
virtual
void
decorateMenu
(
QMenu
*
menu
);
...
...
src/domain/UBGraphicsTextItemDelegate.cpp
View file @
7e0ec83a
...
...
@@ -322,6 +322,12 @@ void UBGraphicsTextItemDelegate::positionHandles()
void
UBGraphicsTextItemDelegate
::
ChangeTextSize
(
qreal
factor
,
textChangeMode
changeMode
)
{
if
(
scaleSize
==
changeMode
)
{
if
(
1
==
factor
)
return
;
}
else
if
(
0
==
factor
)
return
;
...
...
@@ -403,3 +409,20 @@ void UBGraphicsTextItemDelegate::scaleTextSize(qreal multiplyer)
{
ChangeTextSize
(
multiplyer
,
scaleSize
);
}
QVariant
UBGraphicsTextItemDelegate
::
itemChange
(
QGraphicsItem
::
GraphicsItemChange
change
,
const
QVariant
&
value
)
{
if
(
change
==
QGraphicsItem
::
ItemSelectedChange
)
{
if
(
delegated
()
->
isSelected
())
{
QTextCursor
c
=
delegated
()
->
textCursor
();
if
(
c
.
hasSelection
())
{
c
.
clearSelection
();
delegated
()
->
setTextCursor
(
c
);
}
}
}
return
UBGraphicsItemDelegate
::
itemChange
(
change
,
value
);
}
src/domain/UBGraphicsTextItemDelegate.h
View file @
7e0ec83a
...
...
@@ -40,6 +40,8 @@ class UBGraphicsTextItemDelegate : public UBGraphicsItemDelegate
virtual
~
UBGraphicsTextItemDelegate
();
bool
isEditable
();
void
scaleTextSize
(
qreal
multiplyer
);
virtual
QVariant
itemChange
(
QGraphicsItem
::
GraphicsItemChange
change
,
const
QVariant
&
value
);
public
slots
:
void
contentsChanged
();
...
...
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