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
bd0ced23
Commit
bd0ced23
authored
Oct 13, 2011
by
Anatoly Mihalchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SANKORE-139 fix mouse scroll for active wight on scene
parent
0d8350e5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
2 deletions
+24
-2
UBBoardView.cpp
src/board/UBBoardView.cpp
+2
-1
UBGraphicsItemDelegate.cpp
src/domain/UBGraphicsItemDelegate.cpp
+13
-0
UBGraphicsItemDelegate.h
src/domain/UBGraphicsItemDelegate.h
+1
-0
UBGraphicsProxyWidget.cpp
src/domain/UBGraphicsProxyWidget.cpp
+6
-1
UBGraphicsProxyWidget.h
src/domain/UBGraphicsProxyWidget.h
+2
-0
No files found.
src/board/UBBoardView.cpp
View file @
bd0ced23
...
...
@@ -641,7 +641,8 @@ UBBoardView::wheelEvent (QWheelEvent *event)
// Too many wheelEvent are sent, how should we handle them to "smoothly" zoom ?
// something like zoom( pow(zoomFactor, event->delta() / 120) )
}
event
->
accept
();
// event->accept ();
QGraphicsView
::
wheelEvent
(
event
);
}
void
...
...
src/domain/UBGraphicsItemDelegate.cpp
View file @
bd0ced23
...
...
@@ -191,6 +191,19 @@ bool UBGraphicsItemDelegate::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
return
false
;
}
bool
UBGraphicsItemDelegate
::
weelEvent
(
QGraphicsSceneWheelEvent
*
event
)
{
if
(
mDelegated
->
isSelected
()
)
{
event
->
accept
();
return
true
;
}
else
{
event
->
ignore
();
return
false
;
}
}
bool
UBGraphicsItemDelegate
::
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
...
...
src/domain/UBGraphicsItemDelegate.h
View file @
bd0ced23
...
...
@@ -102,6 +102,7 @@ class UBGraphicsItemDelegate : public QObject
virtual
bool
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
bool
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
bool
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
bool
weelEvent
(
QGraphicsSceneWheelEvent
*
event
);
virtual
QVariant
itemChange
(
QGraphicsItem
::
GraphicsItemChange
change
,
const
QVariant
&
value
);
...
...
src/domain/UBGraphicsProxyWidget.cpp
View file @
bd0ced23
...
...
@@ -99,10 +99,15 @@ void UBGraphicsProxyWidget::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void
UBGraphicsProxyWidget
::
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
)
{
mDelegate
->
mouseReleaseEvent
(
event
);
QGraphicsProxyWidget
::
mouseReleaseEvent
(
event
);
}
void
UBGraphicsProxyWidget
::
wheelEvent
(
QGraphicsSceneWheelEvent
*
event
)
{
if
(
mDelegate
->
weelEvent
(
event
)
)
QGraphicsProxyWidget
::
wheelEvent
(
event
);
}
void
UBGraphicsProxyWidget
::
setDelegate
(
UBGraphicsItemDelegate
*
pDelegate
)
{
...
...
src/domain/UBGraphicsProxyWidget.h
View file @
bd0ced23
...
...
@@ -48,6 +48,8 @@ class UBGraphicsProxyWidget: public QGraphicsProxyWidget, public UBItem, public
virtual
void
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseMoveEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
mouseReleaseEvent
(
QGraphicsSceneMouseEvent
*
event
);
virtual
void
wheelEvent
(
QGraphicsSceneWheelEvent
*
event
);
virtual
QVariant
itemChange
(
GraphicsItemChange
change
,
const
QVariant
&
value
);
...
...
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