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
087738d5
Commit
087738d5
authored
Nov 05, 2015
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor updates (includes, changes in function names)
parent
1b4cca3a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
UBThumbnailAdaptor.cpp
src/adaptors/UBThumbnailAdaptor.cpp
+1
-1
UBBoardView.cpp
src/board/UBBoardView.cpp
+9
-9
UBApplicationController.cpp
src/core/UBApplicationController.cpp
+2
-1
No files found.
src/adaptors/UBThumbnailAdaptor.cpp
View file @
087738d5
...
...
@@ -95,7 +95,7 @@ const QPixmap* UBThumbnailAdaptor::get(UBDocumentProxy* proxy, int pageIndex)
if
(
file
.
exists
())
{
//Warning. Works only with modified Qt
#ifdef Q_
WS_X11
#ifdef Q_
OS_LINUX
pix
->
load
(
fileName
,
0
,
Qt
::
AutoColor
);
#else
pix
->
load
(
fileName
,
0
,
Qt
::
AutoColor
,
false
);
...
...
src/board/UBBoardView.cpp
View file @
087738d5
...
...
@@ -750,13 +750,13 @@ void UBBoardView::handleItemMousePress(QMouseEvent *event)
if
(
itemShouldReceiveMousePressEvent
(
movingItem
)){
QGraphicsView
::
mousePressEvent
(
event
);
QGraphicsItem
*
item
=
determineItemToPress
(
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()),
transform
()));
QGraphicsItem
*
item
=
determineItemToPress
(
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
localPos
().
toPoint
()),
transform
()));
//use QGraphicsView::transform() to use not deprecated QGraphicsScene::itemAt() method
if
(
item
&&
(
item
->
type
()
==
QGraphicsProxyWidget
::
Type
)
&&
item
->
parentObject
()
&&
item
->
parentObject
()
->
type
()
!=
QGraphicsProxyWidget
::
Type
)
{
//Clean up children
QList
<
QGraphicsItem
*>
children
=
item
->
child
ren
();
QList
<
QGraphicsItem
*>
children
=
item
->
child
Items
();
for
(
QList
<
QGraphicsItem
*>::
iterator
it
=
children
.
begin
();
it
!=
children
.
end
();
++
it
)
if
((
*
it
)
->
pos
().
x
()
<
0
||
(
*
it
)
->
pos
().
y
()
<
0
)
...
...
@@ -905,7 +905,7 @@ QWidget *UBBoardView::widgetForTabletEvent(QWidget *w, const QPoint &pos)
QWidget
*
childAtPos
=
NULL
;
QList
<
QObject
*>
childs
=
w
->
child
ren
();
QList
<
QObject
*>
childs
=
w
->
child
Items
();
foreach
(
QObject
*
child
,
childs
)
{
QWidget
*
childWidget
=
qobject_cast
<
QWidget
*>
(
child
);
...
...
@@ -972,7 +972,7 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
}
mMouseDownPos
=
event
->
pos
();
movingItem
=
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()
));
movingItem
=
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
localPos
().
toPoint
()),
QTransform
(
));
if
(
event
->
button
()
==
Qt
::
LeftButton
&&
isInteractive
())
{
...
...
@@ -993,7 +993,7 @@ void UBBoardView::mousePressEvent (QMouseEvent *event)
case
UBStylusTool
:
:
Hand
:
viewport
()
->
setCursor
(
QCursor
(
Qt
::
ClosedHandCursor
));
mPreviousPoint
=
event
->
posF
();
mPreviousPoint
=
event
->
localPos
();
event
->
accept
();
break
;
...
...
@@ -1107,7 +1107,7 @@ void UBBoardView::mouseMoveEvent (QMouseEvent *event)
if
(
!
mMouseButtonIsPressed
&&
!
mTabletStylusIsPressed
)
{
break
;
}
QPointF
eventPosition
=
event
->
posF
();
QPointF
eventPosition
=
event
->
localPos
();
qreal
dx
=
eventPosition
.
x
()
-
mPreviousPoint
.
x
();
qreal
dy
=
eventPosition
.
y
()
-
mPreviousPoint
.
y
();
mController
->
handScroll
(
dx
,
dy
);
...
...
@@ -1230,7 +1230,7 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
graphicsItem
->
Delegate
()
->
commitUndoStep
();
bool
bReleaseIsNeed
=
true
;
if
(
movingItem
!=
determineItemToPress
(
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()
))))
if
(
movingItem
!=
determineItemToPress
(
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
localPos
().
toPoint
()),
QTransform
(
))))
{
movingItem
=
NULL
;
bReleaseIsNeed
=
false
;
...
...
@@ -1299,7 +1299,7 @@ void UBBoardView::mouseReleaseEvent (QMouseEvent *event)
graphicsItem
->
Delegate
()
->
commitUndoStep
();
bool
bReleaseIsNeed
=
true
;
if
(
movingItem
!=
determineItemToPress
(
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
posF
().
toPoint
()
))))
if
(
movingItem
!=
determineItemToPress
(
scene
()
->
itemAt
(
this
->
mapToScene
(
event
->
localPos
().
toPoint
()),
QTransform
(
))))
{
movingItem
=
NULL
;
bReleaseIsNeed
=
false
;
...
...
@@ -1475,7 +1475,7 @@ void UBBoardView::wheelEvent (QWheelEvent *wheelEvent)
QPointF
scenePos
=
mapToScene
(
wheelEvent
->
pos
());
QList
<
QGraphicsItem
*>
itemsList
=
scene
()
->
items
(
scenePos
);
QB
ool
isSelectedAndMouseHower
=
itemsList
.
contains
(
selItem
);
b
ool
isSelectedAndMouseHower
=
itemsList
.
contains
(
selItem
);
if
(
isSelectedAndMouseHower
)
{
QGraphicsView
::
wheelEvent
(
wheelEvent
);
...
...
src/core/UBApplicationController.cpp
View file @
087738d5
...
...
@@ -22,7 +22,8 @@
* along with OpenBoard. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QScriptValue>
#include <QScriptEngine>
#include "UBApplicationController.h"
...
...
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