Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
c60dc271
Commit
c60dc271
authored
Jun 05, 2010
by
Hugo Beauzée-Luyssen
Committed by
Rémi Denis-Courmont
Jun 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Playlist: Allow pausing the playback using space.
Signed-off-by:
Rémi Denis-Courmont
<
remi@remlab.net
>
parent
972e458c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
modules/gui/qt4/components/playlist/icon_view.cpp
modules/gui/qt4/components/playlist/icon_view.cpp
+22
-0
modules/gui/qt4/components/playlist/icon_view.hpp
modules/gui/qt4/components/playlist/icon_view.hpp
+2
-0
No files found.
modules/gui/qt4/components/playlist/icon_view.cpp
View file @
c60dc271
...
...
@@ -385,6 +385,17 @@ void PlListView::dragMoveEvent ( QDragMoveEvent * event )
QAbstractItemView
::
dragMoveEvent
(
event
);
}
void
PlListView
::
keyPressEvent
(
QKeyEvent
*
event
)
{
//If the space key is pressed, override the standard list behaviour to allow pausing
//to proceed.
if
(
event
->
modifiers
()
==
Qt
::
NoModifier
&&
event
->
key
()
==
Qt
::
Key_Space
)
QWidget
::
keyPressEvent
(
event
);
//Otherwise, just do as usual.
else
QListView
::
keyPressEvent
(
event
);
}
void
PlTreeView
::
startDrag
(
Qt
::
DropActions
supportedActions
)
{
plViewStartDrag
(
this
,
supportedActions
);
...
...
@@ -395,3 +406,14 @@ void PlTreeView::dragMoveEvent ( QDragMoveEvent * event )
plViewDragMoveEvent
(
this
,
event
);
QAbstractItemView
::
dragMoveEvent
(
event
);
}
void
PlTreeView
::
keyPressEvent
(
QKeyEvent
*
event
)
{
//If the space key is pressed, override the standard list behaviour to allow pausing
//to proceed.
if
(
event
->
modifiers
()
==
Qt
::
NoModifier
&&
event
->
key
()
==
Qt
::
Key_Space
)
QWidget
::
keyPressEvent
(
event
);
//Otherwise, just do as usual.
else
QTreeView
::
keyPressEvent
(
event
);
}
modules/gui/qt4/components/playlist/icon_view.hpp
View file @
c60dc271
...
...
@@ -82,6 +82,7 @@ public:
private:
void
startDrag
(
Qt
::
DropActions
supportedActions
);
void
dragMoveEvent
(
QDragMoveEvent
*
event
);
void
keyPressEvent
(
QKeyEvent
*
event
);
};
class
PlTreeView
:
public
QTreeView
...
...
@@ -91,6 +92,7 @@ class PlTreeView : public QTreeView
private:
void
startDrag
(
Qt
::
DropActions
supportedActions
);
void
dragMoveEvent
(
QDragMoveEvent
*
event
);
void
keyPressEvent
(
QKeyEvent
*
event
);
};
#endif
...
...
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