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
d021abf3
Commit
d021abf3
authored
Feb 26, 2016
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed video z-order stacking
parent
43e5298d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
43 deletions
+8
-43
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+2
-36
UBGraphicsMediaItem.h
src/domain/UBGraphicsMediaItem.h
+0
-5
UBGraphicsProxyWidget.cpp
src/domain/UBGraphicsProxyWidget.cpp
+6
-2
No files found.
src/domain/UBGraphicsMediaItem.cpp
View file @
d021abf3
...
...
@@ -76,10 +76,11 @@ UBGraphicsMediaItem::UBGraphicsMediaItem(const QUrl& pMediaFileUrl, QGraphicsIte
mDummyVideoWidget
->
setMinimumSize
(
320
,
240
);
mDummyVideoWidget
->
setWindowOpacity
(
0.0
);
mVideoItem
=
new
QGraphicsVideoItem
();
mVideoItem
=
new
QGraphicsVideoItem
(
this
);
// Necessary to allow the video to be displayed on secondary screen
mVideoItem
->
setData
(
UBGraphicsItemData
::
ItemLayerType
,
UBItemLayerType
::
Object
);
mVideoItem
->
setFlag
(
ItemStacksBehindParent
,
true
);
mMediaObject
->
setVideoOutput
(
mVideoItem
);
...
...
@@ -179,13 +180,6 @@ QVariant UBGraphicsMediaItem::itemChange(GraphicsItemChange change, const QVaria
}
}
// Pass on geometry and position changes to the videoItem
else
if
(
mVideoItem
&&
change
==
QGraphicsItem
::
ItemTransformChange
)
mVideoItem
->
setTransform
(
qvariant_cast
<
QTransform
>
(
value
));
else
if
(
mVideoItem
&&
change
==
QGraphicsItem
::
ItemPositionChange
)
mVideoItem
->
setPos
(
qvariant_cast
<
QPointF
>
(
value
));
return
UBGraphicsProxyWidget
::
itemChange
(
change
,
value
);
}
...
...
@@ -353,34 +347,6 @@ void UBGraphicsMediaItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
void
UBGraphicsMediaItem
::
setPos
(
const
QPointF
&
pos
)
{
QGraphicsItem
::
setPos
(
pos
);
if
(
mVideoItem
)
mVideoItem
->
setPos
(
pos
);
}
void
UBGraphicsMediaItem
::
setPos
(
qreal
x
,
qreal
y
)
{
setPos
(
QPointF
(
x
,
y
));
}
void
UBGraphicsMediaItem
::
setMatrix
(
const
QMatrix
&
matrix
,
bool
combine
)
{
QGraphicsItem
::
setMatrix
(
matrix
,
combine
);
if
(
mVideoItem
)
mVideoItem
->
setMatrix
(
matrix
,
combine
);
}
void
UBGraphicsMediaItem
::
setTransform
(
const
QTransform
&
matrix
,
bool
combine
)
{
QGraphicsItem
::
setTransform
(
matrix
,
combine
);
if
(
mVideoItem
)
mVideoItem
->
setTransform
(
matrix
,
combine
);
}
void
UBGraphicsMediaItem
::
resize
(
const
QSizeF
&
pSize
)
{
// Resize the video, then the rest of the Item
...
...
src/domain/UBGraphicsMediaItem.h
View file @
d021abf3
...
...
@@ -108,11 +108,6 @@ public:
void
setSelected
(
bool
selected
);
virtual
void
setPos
(
const
QPointF
&
pos
);
virtual
void
setPos
(
qreal
x
,
qreal
y
);
virtual
void
setMatrix
(
const
QMatrix
&
matrix
,
bool
combine
=
false
);
virtual
void
setTransform
(
const
QTransform
&
matrix
,
bool
combine
=
false
);
public
slots
:
...
...
src/domain/UBGraphicsProxyWidget.cpp
View file @
d021abf3
...
...
@@ -89,8 +89,12 @@ QVariant UBGraphicsProxyWidget::itemChange(GraphicsItemChange change, const QVar
}
}
QVariant
newValue
=
Delegate
()
->
itemChange
(
change
,
value
);
return
QGraphicsProxyWidget
::
itemChange
(
change
,
newValue
);
if
(
Delegate
())
{
QVariant
newValue
=
Delegate
()
->
itemChange
(
change
,
value
);
return
QGraphicsProxyWidget
::
itemChange
(
change
,
newValue
);
}
else
return
QGraphicsProxyWidget
::
itemChange
(
change
,
value
);
}
void
UBGraphicsProxyWidget
::
setUuid
(
const
QUuid
&
pUuid
)
...
...
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