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
d469951d
Commit
d469951d
authored
Sep 18, 2012
by
Aleksei Kanash
Browse files
Options
Browse Files
Download
Plain Diff
Merging last fixes.
parents
06e94061
f6247a26
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
14 deletions
+26
-14
UBBoardController.cpp
src/board/UBBoardController.cpp
+5
-2
UBBoardView.cpp
src/board/UBBoardView.cpp
+5
-7
UBDesktopAnnotationController.cpp
src/desktop/UBDesktopAnnotationController.cpp
+2
-0
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+14
-5
No files found.
src/board/UBBoardController.cpp
View file @
d469951d
...
@@ -1041,6 +1041,9 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
...
@@ -1041,6 +1041,9 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
return
NULL
;
return
NULL
;
}
}
mActiveScene
->
deselectAllItems
();
if
(
!
sourceUrl
.
toString
().
startsWith
(
"file://"
)
&&
!
sourceUrl
.
toString
().
startsWith
(
"uniboardTool://"
))
if
(
!
sourceUrl
.
toString
().
startsWith
(
"file://"
)
&&
!
sourceUrl
.
toString
().
startsWith
(
"uniboardTool://"
))
showMessage
(
tr
(
"Download finished"
));
showMessage
(
tr
(
"Download finished"
));
...
@@ -1070,8 +1073,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
...
@@ -1070,8 +1073,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
else
else
{
{
mActiveScene
->
scaleToFitDocumentSize
(
pixItem
,
true
,
UBSettings
::
objectInControlViewMargin
);
mActiveScene
->
scaleToFitDocumentSize
(
pixItem
,
true
,
UBSettings
::
objectInControlViewMargin
);
pixItem
->
setSelected
(
true
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
pixItem
->
setSelected
(
true
);
}
}
return
pixItem
;
return
pixItem
;
...
@@ -1090,8 +1093,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
...
@@ -1090,8 +1093,8 @@ UBItem *UBBoardController::downloadFinished(bool pSuccess, QUrl sourceUrl, QStri
else
else
{
{
mActiveScene
->
scaleToFitDocumentSize
(
svgItem
,
true
,
UBSettings
::
objectInControlViewMargin
);
mActiveScene
->
scaleToFitDocumentSize
(
svgItem
,
true
,
UBSettings
::
objectInControlViewMargin
);
svgItem
->
setSelected
(
true
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
UBDrawingController
::
drawingController
()
->
setStylusTool
(
UBStylusTool
::
Selector
);
svgItem
->
setSelected
(
true
);
}
}
return
svgItem
;
return
svgItem
;
...
...
src/board/UBBoardView.cpp
View file @
d469951d
...
@@ -545,7 +545,6 @@ Here we determines cases when items should to get mouse press event at pressing
...
@@ -545,7 +545,6 @@ Here we determines cases when items should to get mouse press event at pressing
break
;
break
;
// Groups shouldn't reacts on any presses and moves for Play tool.
// Groups shouldn't reacts on any presses and moves for Play tool.
case
UBGraphicsStrokesGroup
:
:
Type
:
case
UBGraphicsGroupContainerItem
:
:
Type
:
case
UBGraphicsGroupContainerItem
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Play
)
if
(
currentTool
==
UBStylusTool
::
Play
)
{
{
...
@@ -631,7 +630,7 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
...
@@ -631,7 +630,7 @@ bool UBBoardView::itemShouldBeMoved(QGraphicsItem *item)
case
UBGraphicsGroupContainerItem
:
:
Type
:
case
UBGraphicsGroupContainerItem
:
:
Type
:
return
true
;
return
true
;
case
UBGraphicsW
3CW
idgetItem
:
:
Type
:
case
UBGraphicsWidgetItem
:
:
Type
:
if
(
currentTool
==
UBStylusTool
::
Selector
&&
item
->
isSelected
())
if
(
currentTool
==
UBStylusTool
::
Selector
&&
item
->
isSelected
())
return
false
;
return
false
;
if
(
currentTool
==
UBStylusTool
::
Play
)
if
(
currentTool
==
UBStylusTool
::
Play
)
...
@@ -657,10 +656,6 @@ QGraphicsItem* UBBoardView::determineItemToPress(QGraphicsItem *item)
...
@@ -657,10 +656,6 @@ QGraphicsItem* UBBoardView::determineItemToPress(QGraphicsItem *item)
if
(
item
)
if
(
item
)
{
{
UBStylusTool
::
Enum
currentTool
=
(
UBStylusTool
::
Enum
)
UBDrawingController
::
drawingController
()
->
stylusTool
();
UBStylusTool
::
Enum
currentTool
=
(
UBStylusTool
::
Enum
)
UBDrawingController
::
drawingController
()
->
stylusTool
();
// groups should should be moved instead of strokes groups
if
(
item
->
parentItem
()
&&
UBGraphicsStrokesGroup
::
Type
==
item
->
type
())
return
item
->
parentItem
();
// if item is on group and group is not selected - group should take press.
// if item is on group and group is not selected - group should take press.
if
(
UBStylusTool
::
Selector
==
currentTool
if
(
UBStylusTool
::
Selector
==
currentTool
...
@@ -685,7 +680,7 @@ QGraphicsItem* UBBoardView::determineItemToMove(QGraphicsItem *item)
...
@@ -685,7 +680,7 @@ QGraphicsItem* UBBoardView::determineItemToMove(QGraphicsItem *item)
UBStylusTool
::
Enum
currentTool
=
(
UBStylusTool
::
Enum
)
UBDrawingController
::
drawingController
()
->
stylusTool
();
UBStylusTool
::
Enum
currentTool
=
(
UBStylusTool
::
Enum
)
UBDrawingController
::
drawingController
()
->
stylusTool
();
//W3C widgets should take mouse move events from play tool.
//W3C widgets should take mouse move events from play tool.
if
((
UBStylusTool
::
Play
==
currentTool
)
&&
(
UBGraphicsW
3CW
idgetItem
::
Type
==
item
->
type
()))
if
((
UBStylusTool
::
Play
==
currentTool
)
&&
(
UBGraphicsWidgetItem
::
Type
==
item
->
type
()))
return
item
;
return
item
;
// if item is in group
// if item is in group
...
@@ -754,6 +749,9 @@ void UBBoardView::handleItemMousePress(QMouseEvent *event)
...
@@ -754,6 +749,9 @@ void UBBoardView::handleItemMousePress(QMouseEvent *event)
void
UBBoardView
::
handleItemMouseMove
(
QMouseEvent
*
event
)
void
UBBoardView
::
handleItemMouseMove
(
QMouseEvent
*
event
)
{
{
if
(
!
movingItem
)
return
;
// determine item to move (maybee we need to move group of item or his parent.
// determine item to move (maybee we need to move group of item or his parent.
movingItem
=
determineItemToMove
(
movingItem
);
movingItem
=
determineItemToMove
(
movingItem
);
...
...
src/desktop/UBDesktopAnnotationController.cpp
View file @
d469951d
...
@@ -658,6 +658,7 @@ void UBDesktopAnnotationController::selectorActionPressed()
...
@@ -658,6 +658,7 @@ void UBDesktopAnnotationController::selectorActionPressed()
void
UBDesktopAnnotationController
::
selectorActionReleased
()
void
UBDesktopAnnotationController
::
selectorActionReleased
()
{
{
UBApplication
::
mainWindow
->
actionSelector
->
setChecked
(
true
);
switchCursor
(
UBStylusTool
::
Selector
);
switchCursor
(
UBStylusTool
::
Selector
);
}
}
...
@@ -669,6 +670,7 @@ void UBDesktopAnnotationController::pointerActionPressed()
...
@@ -669,6 +670,7 @@ void UBDesktopAnnotationController::pointerActionPressed()
void
UBDesktopAnnotationController
::
pointerActionReleased
()
void
UBDesktopAnnotationController
::
pointerActionReleased
()
{
{
UBApplication
::
mainWindow
->
actionPointer
->
setChecked
(
true
);
switchCursor
(
UBStylusTool
::
Pointer
);
switchCursor
(
UBStylusTool
::
Pointer
);
}
}
...
...
src/domain/UBGraphicsMediaItem.cpp
View file @
d469951d
...
@@ -73,9 +73,6 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
...
@@ -73,9 +73,6 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
mMediaObject
=
new
Phonon
::
MediaObject
(
this
);
mMediaObject
=
new
Phonon
::
MediaObject
(
this
);
setDelegate
(
new
UBGraphicsMediaItemDelegate
(
this
,
mMediaObject
));
Delegate
()
->
init
();
if
(
pMediaFileUrl
.
toLocalFile
().
contains
(
"videos"
))
if
(
pMediaFileUrl
.
toLocalFile
().
contains
(
"videos"
))
{
{
mMediaType
=
mediaType_Video
;
mMediaType
=
mediaType_Video
;
...
@@ -91,7 +88,6 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
...
@@ -91,7 +88,6 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
mVideoWidget
->
setMinimumSize
(
140
,
26
);
mVideoWidget
->
setMinimumSize
(
140
,
26
);
setWidget
(
mVideoWidget
);
haveLinkedImage
=
true
;
haveLinkedImage
=
true
;
}
}
else
else
...
@@ -111,7 +107,7 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
...
@@ -111,7 +107,7 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
mAudioWidget
->
resize
(
320
,
26
+
3
*
borderSize
);
mAudioWidget
->
resize
(
320
,
26
+
3
*
borderSize
);
mAudioWidget
->
setMinimumSize
(
150
,
26
+
borderSize
);
mAudioWidget
->
setMinimumSize
(
150
,
26
+
borderSize
);
setWidget
(
mAudioWidget
);
haveLinkedImage
=
false
;
haveLinkedImage
=
false
;
}
}
...
@@ -120,6 +116,19 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
...
@@ -120,6 +116,19 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
mSource
=
Phonon
::
MediaSource
(
pMediaFileUrl
);
mSource
=
Phonon
::
MediaSource
(
pMediaFileUrl
);
mMediaObject
->
setCurrentSource
(
mSource
);
mMediaObject
->
setCurrentSource
(
mSource
);
// we should create delegate after media objects because delegate uses his properties at creation.
setDelegate
(
new
UBGraphicsMediaItemDelegate
(
this
,
mMediaObject
));
// delegate should be created earler because we setWidget calls resize event for graphics proxy widgt.
// resize uses delegate.
if
(
mediaType_Video
==
mMediaType
)
setWidget
(
mVideoWidget
);
else
setWidget
(
mAudioWidget
);
// media widget should be created and placed on proxy widget here.
Delegate
()
->
init
();
if
(
mediaType_Audio
==
mMediaType
)
if
(
mediaType_Audio
==
mMediaType
)
Delegate
()
->
frame
()
->
setOperationMode
(
UBGraphicsDelegateFrame
::
ResizingHorizontally
);
Delegate
()
->
frame
()
->
setOperationMode
(
UBGraphicsDelegateFrame
::
ResizingHorizontally
);
else
else
...
...
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