Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paweł Wegner
libcloudstorage
Commits
368843ef
Commit
368843ef
authored
Jul 13, 2016
by
Paweł Wegner
Browse files
Cloudbrowser: disable focus when autoplaying.
parent
53f241fe
Changes
4
Hide whitespace changes
Inline
Side-by-side
examples/cloudbrowser/Window.cpp
View file @
368843ef
...
...
@@ -75,10 +75,8 @@ Window::Window(QWidget* player_widget)
connect
(
this
,
&
Window
::
hidePlayer
,
this
,
[
this
]()
{
stop
();
if
(
container
())
{
if
(
container
())
container
()
->
show
();
container
()
->
setFocus
();
}
},
Qt
::
QueuedConnection
);
connect
(
this
,
&
Window
::
runListDirectory
,
this
,
[
this
]()
{
listDirectory
();
},
...
...
@@ -94,6 +92,7 @@ Window::Window(QWidget* player_widget)
if
(
type
==
IItem
::
FileType
::
Audio
||
type
==
IItem
::
FileType
::
Video
||
type
==
IItem
::
FileType
::
Image
)
{
emit
currentItemChanged
(
i
);
play
(
i
);
break
;
}
...
...
examples/cloudbrowser/Window.h
View file @
368843ef
...
...
@@ -29,7 +29,7 @@
#include
<QAbstractListModel>
#include
<QQuickImageProvider>
#include
<QQuickView>
#include
<Q
Quick
Widget>
#include
<QWidget>
#include
<future>
#include
<vlcpp/vlc.hpp>
...
...
@@ -136,6 +136,7 @@ class Window : public QQuickView {
void
runListDirectory
();
void
runClearDirectory
();
void
playNext
();
void
currentItemChanged
(
int
index
);
private:
friend
class
CloudProviderCallback
;
...
...
examples/cloudbrowser/main.cpp
View file @
368843ef
...
...
@@ -49,9 +49,10 @@ class MainWidget : public QWidget {
void
keyPressEvent
(
QKeyEvent
*
e
)
{
QWidget
::
keyPressEvent
(
e
);
if
(
e
->
isAccepted
())
return
;
if
(
e
->
key
()
==
Qt
::
Key_Q
)
if
(
e
->
key
()
==
Qt
::
Key_Q
)
{
window_
.
stop
();
else
if
(
e
->
key
()
==
Qt
::
Key_P
)
container_
->
setFocus
();
}
else
if
(
e
->
key
()
==
Qt
::
Key_P
)
window_
.
media_player
().
pause
();
}
...
...
examples/cloudbrowser/main.qml
View file @
368843ef
...
...
@@ -71,6 +71,9 @@ Item {
onHidePlayer
:
{
directory
.
focus
=
true
;
}
onCurrentItemChanged
:
{
directory
.
currentIndex
=
index
;
}
}
ListView
{
...
...
Write
Preview
Supports
Markdown
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