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
9dc74cca
Commit
9dc74cca
authored
Aug 13, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed sync of magnifier tool on control and display screens.
parent
d2eff8eb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
UBBoardController.cpp
src/board/UBBoardController.cpp
+1
-0
UBGraphicsScene.cpp
src/domain/UBGraphicsScene.cpp
+14
-3
UBGraphicsScene.h
src/domain/UBGraphicsScene.h
+2
-1
No files found.
src/board/UBBoardController.cpp
View file @
9dc74cca
...
...
@@ -1486,6 +1486,7 @@ void UBBoardController::boardViewResized(QResizeEvent* event)
mPaletteManager
->
containerResized
();
UBApplication
::
boardController
->
controlView
()
->
scene
()
->
moveMagnifier
();
}
...
...
src/domain/UBGraphicsScene.cpp
View file @
9dc74cca
...
...
@@ -1979,7 +1979,16 @@ void UBGraphicsScene::addMagnifier(UBMagnifierParams params)
setModified
(
true
);
}
void
UBGraphicsScene
::
moveMagnifier
(
QPoint
newPos
)
void
UBGraphicsScene
::
moveMagnifier
()
{
if
(
magniferControlViewWidget
)
{
QPoint
magnifierPos
=
QPoint
(
magniferControlViewWidget
->
pos
().
x
()
+
magniferControlViewWidget
->
size
().
width
()
/
2
,
magniferControlViewWidget
->
pos
().
y
()
+
magniferControlViewWidget
->
size
().
height
()
/
2
);
moveMagnifier
(
magnifierPos
,
true
);
}
}
void
UBGraphicsScene
::
moveMagnifier
(
QPoint
newPos
,
bool
forceGrab
)
{
QWidget
*
cContainer
=
(
QWidget
*
)(
UBApplication
::
boardController
->
controlContainer
());
QGraphicsView
*
cView
=
(
QGraphicsView
*
)
UBApplication
::
boardController
->
controlView
();
...
...
@@ -1987,6 +1996,8 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos)
QPoint
dvZeroPoint
=
dView
->
mapToGlobal
(
QPoint
(
0
,
0
));
QRect
qcr
=
cView
->
geometry
();
QRect
qdr
=
dView
->
geometry
();
int
cvW
=
cView
->
width
();
int
dvW
=
dView
->
width
();
qreal
wCoeff
=
(
qreal
)
dvW
/
(
qreal
)
cvW
;
...
...
@@ -1999,8 +2010,8 @@ void UBGraphicsScene::moveMagnifier(QPoint newPos)
QPoint
cvPoint
=
cView
->
mapFromGlobal
(
globalPoint
);
QPoint
dvPoint
(
cvPoint
.
x
()
*
wCoeff
+
dvZeroPoint
.
x
(),
cvPoint
.
y
()
*
hCoeff
+
dvZeroPoint
.
y
());
magniferControlViewWidget
->
grabNMove
(
globalPoint
,
globalPoint
,
f
alse
,
false
);
magniferDisplayViewWidget
->
grabNMove
(
globalPoint
,
dvPoint
,
f
alse
,
true
);
magniferControlViewWidget
->
grabNMove
(
globalPoint
,
globalPoint
,
f
orceGrab
,
false
);
magniferDisplayViewWidget
->
grabNMove
(
globalPoint
,
dvPoint
,
f
orceGrab
,
true
);
setModified
(
true
);
}
...
...
src/domain/UBGraphicsScene.h
View file @
9dc74cca
...
...
@@ -326,7 +326,8 @@ public slots:
void
selectionChangedProcessing
();
void
updateGroupButtonState
();
void
moveMagnifier
(
QPoint
newPos
);
void
moveMagnifier
();
void
moveMagnifier
(
QPoint
newPos
,
bool
forceGrab
=
false
);
void
closeMagnifier
();
void
zoomInMagnifier
();
void
zoomOutMagnifier
();
...
...
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