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
4257ab6f
Commit
4257ab6f
authored
Mar 07, 2016
by
Craig Watson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Video item: make *sure* progress bar doesn't hide at end of playback
parent
dd5105b0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
UBGraphicsItemDelegate.h
src/domain/UBGraphicsItemDelegate.h
+1
-1
UBGraphicsMediaItem.cpp
src/domain/UBGraphicsMediaItem.cpp
+1
-1
UBGraphicsMediaItemDelegate.cpp
src/domain/UBGraphicsMediaItemDelegate.cpp
+6
-2
UBGraphicsMediaItemDelegate.h
src/domain/UBGraphicsMediaItemDelegate.h
+1
-1
No files found.
src/domain/UBGraphicsItemDelegate.h
View file @
4257ab6f
...
...
@@ -296,7 +296,7 @@ class UBGraphicsItemDelegate : public QObject
void
setUBFlags
(
UBGraphicsFlags
pf
);
void
setUBFlag
(
UBGraphicsFlags
pf
,
bool
set
=
true
);
virtual
void
showToolBar
()
{}
virtual
void
showToolBar
(
bool
autohide
=
true
)
{}
signals
:
void
showOnDisplayChanged
(
bool
shown
);
...
...
src/domain/UBGraphicsMediaItem.cpp
View file @
4257ab6f
...
...
@@ -514,7 +514,7 @@ void UBGraphicsVideoItem::videoSizeChanged(QSizeF newSize)
this
->
setSize
(
newSize
.
width
(),
newSize
.
height
());
else
// Make sure the toolbar doesn't disappear
Delegate
()
->
showToolBar
();
Delegate
()
->
showToolBar
(
false
);
}
...
...
src/domain/UBGraphicsMediaItemDelegate.cpp
View file @
4257ab6f
...
...
@@ -77,7 +77,7 @@ bool UBGraphicsMediaItemDelegate::mousePressEvent(QGraphicsSceneMouseEvent *even
* The toolbar then auto-hides after a set amount of time, if the video is currently
* playing or is paused.
*/
void
UBGraphicsMediaItemDelegate
::
showToolBar
()
void
UBGraphicsMediaItemDelegate
::
showToolBar
(
bool
autohide
)
{
mToolBarItem
->
show
();
if
(
mToolBarShowTimer
)
{
...
...
@@ -90,6 +90,10 @@ void UBGraphicsMediaItemDelegate::showToolBar()
// Don't hide the toolbar if we're at the beginning of the video
if
(
delegated
()
->
mediaPosition
()
==
delegated
()
->
initialPos
())
mToolBarShowTimer
->
stop
();
// Don't hide the toolbar if it was explicitly requested
if
(
!
autohide
)
mToolBarShowTimer
->
stop
();
}
}
...
...
@@ -245,7 +249,7 @@ void UBGraphicsMediaItemDelegate::mediaStatusChanged(QMediaPlayer::MediaStatus s
// At the end of the video, make sure the progress bar doesn't autohide
if
(
status
==
QMediaPlayer
::
EndOfMedia
)
showToolBar
();
showToolBar
(
false
);
// in most cases, the only necessary action is to update the play/pause state
...
...
src/domain/UBGraphicsMediaItemDelegate.h
View file @
4257ab6f
...
...
@@ -50,7 +50,7 @@ class UBGraphicsMediaItemDelegate : public UBGraphicsItemDelegate
bool
mousePressEvent
(
QGraphicsSceneMouseEvent
*
event
);
void
showToolBar
();
void
showToolBar
(
bool
autohide
=
true
);
public
slots
:
...
...
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