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
6baa2067
Commit
6baa2067
authored
13 years ago
by
shibakaneki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of github.com:Sankore/Sankore-3.1
parents
c5ec665f
66a4bf02
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
5 deletions
+33
-5
UBBoardView.cpp
src/board/UBBoardView.cpp
+4
-3
UBGraphicsCompass.cpp
src/tools/UBGraphicsCompass.cpp
+21
-1
UBGraphicsProtractor.cpp
src/tools/UBGraphicsProtractor.cpp
+8
-1
No files found.
src/board/UBBoardView.cpp
View file @
6baa2067
...
...
@@ -101,6 +101,7 @@ UBBoardView::init ()
settingChanged
(
QVariant
());
unsetCursor
();
}
UBGraphicsScene
*
...
...
@@ -493,7 +494,7 @@ UBBoardView::mouseMoveEvent (QMouseEvent *event)
else
if
((
UBDrawingController
::
drawingController
()
->
isDrawingTool
())
&&
!
mMouseButtonIsPressed
)
{
QGraphicsView
::
mouseMoveEvent
(
event
);
QGraphicsView
::
mouseMoveEvent
(
event
);
}
else
if
(
currentTool
==
UBStylusTool
::
Text
||
currentTool
==
UBStylusTool
::
Capture
)
{
...
...
@@ -510,9 +511,9 @@ UBBoardView::mouseMoveEvent (QMouseEvent *event)
else
{
if
(
!
mTabletStylusIsPressed
&&
scene
())
{
{
scene
()
->
inputDeviceMove
(
mapToScene
(
UBGeometryUtils
::
pointConstrainedInRect
(
event
->
pos
(),
rect
())),
mMouseButtonIsPressed
);
}
}
event
->
accept
();
}
}
...
...
This diff is collapsed.
Click to expand it.
src/tools/UBGraphicsCompass.cpp
View file @
6baa2067
...
...
@@ -59,6 +59,8 @@ UBGraphicsCompass::UBGraphicsCompass()
updateResizeCursor
();
updateDrawCursor
();
unsetCursor
();
connect
(
UBApplication
::
boardController
,
SIGNAL
(
penColorChanged
()),
this
,
SLOT
(
penColorChanged
()));
connect
(
UBDrawingController
::
drawingController
(),
SIGNAL
(
lineWidthIndexChanged
(
int
)),
this
,
SLOT
(
lineWidthChanged
()));
}
...
...
@@ -157,6 +159,9 @@ QVariant UBGraphicsCompass::itemChange(GraphicsItemChange change, const QVariant
void
UBGraphicsCompass
::
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
if
(
resizeButtonRect
().
contains
(
event
->
pos
()))
{
mResizing
=
true
;
...
...
@@ -189,6 +194,9 @@ void UBGraphicsCompass::mousePressEvent(QGraphicsSceneMouseEvent *event)
void
UBGraphicsCompass
::
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
if
(
!
mResizing
&&
!
mRotating
&&
!
mDrawing
)
{
QGraphicsRectItem
::
mouseMoveEvent
(
event
);
...
...
@@ -230,6 +238,9 @@ void UBGraphicsCompass::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void
UBGraphicsCompass
::
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
if
(
mResizing
)
{
mResizing
=
false
;
...
...
@@ -267,6 +278,9 @@ void UBGraphicsCompass::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void
UBGraphicsCompass
::
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
mOuterCursor
=
cursor
();
mShowButtons
=
shape
().
contains
(
event
->
pos
());
...
...
@@ -293,16 +307,22 @@ void UBGraphicsCompass::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void
UBGraphicsCompass
::
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
mShowButtons
=
false
;
mCloseSvgItem
->
setVisible
(
mShowButtons
);
mResizeSvgItem
->
setVisible
(
mShowButtons
);
setCursor
(
mOuterCursor
);
unsetCursor
(
);
event
->
accept
();
update
();
}
void
UBGraphicsCompass
::
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
mShowButtons
=
shape
().
contains
(
event
->
pos
());
mCloseSvgItem
->
setVisible
(
mShowButtons
);
mResizeSvgItem
->
setVisible
(
mShowButtons
);
...
...
This diff is collapsed.
Click to expand it.
src/tools/UBGraphicsProtractor.cpp
View file @
6baa2067
...
...
@@ -11,6 +11,7 @@
#include "gui/UBResources.h"
#include "domain/UBGraphicsScene.h"
#include "board/UBBoardController.h"
#include "board/UBDrawingController.h"
const
int
UBGraphicsProtractor
::
sFillTransparency
=
127
;
...
...
@@ -263,6 +264,9 @@ void UBGraphicsProtractor::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
void
UBGraphicsProtractor
::
hoverEnterEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
if
(
!
mShowButtons
)
{
mShowButtons
=
true
;
...
...
@@ -283,7 +287,7 @@ void UBGraphicsProtractor::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
void
UBGraphicsProtractor
::
hoverLeaveEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
mShowButtons
=
false
;
setCursor
(
Qt
::
ArrowCursor
);
unsetCursor
(
);
update
();
event
->
accept
();
}
...
...
@@ -291,6 +295,9 @@ void UBGraphicsProtractor::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
void
UBGraphicsProtractor
::
hoverMoveEvent
(
QGraphicsSceneHoverEvent
*
event
)
{
if
(
UBDrawingController
::
drawingController
()
->
stylusTool
()
!=
UBStylusTool
::
Selector
)
return
;
Tool
currentTool
=
toolFromPos
(
event
->
pos
());
if
(
!
mShowButtons
)
...
...
This diff is collapsed.
Click to expand it.
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