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
VideoLAN
VLC
Commits
01abb31e
Commit
01abb31e
authored
Mar 18, 2021
by
Benjamin Arnaud
Committed by
Pierre Lamot
Apr 20, 2021
Browse files
qml: Create VideoGroupsDisplay
Signed-off-by:
Pierre Lamot
<
pierre@videolabs.io
>
parent
ed036a2e
Pipeline
#88794
passed with stage
in 17 minutes and 39 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
modules/gui/qt/Makefile.am
View file @
01abb31e
...
...
@@ -689,6 +689,7 @@ libqt_plugin_la_QML = \
gui/qt/medialibrary/qml/VideoDisplay.qml
\
gui/qt/medialibrary/qml/VideoAll.qml
\
gui/qt/medialibrary/qml/VideoAllDisplay.qml
\
gui/qt/medialibrary/qml/VideoGroupsDisplay.qml
\
gui/qt/medialibrary/qml/PlaylistMediaList.qml
\
gui/qt/medialibrary/qml/PlaylistMedia.qml
\
gui/qt/medialibrary/qml/PlaylistMediaDelegate.qml
\
...
...
modules/gui/qt/medialibrary/qml/VideoDisplay.qml
View file @
01abb31e
...
...
@@ -67,7 +67,11 @@ Widgets.PageLoader {
name
:
"
all
"
,
displayText
:
i18n
.
qtr
(
"
All
"
),
url
:
"
qrc:///medialibrary/VideoAllDisplay.qml
"
},
{
},{
name
:
"
groups
"
,
displayText
:
i18n
.
qtr
(
"
Groups
"
),
url
:
"
qrc:///medialibrary/VideoGroupsDisplay.qml
"
},{
name
:
"
playlists
"
,
displayText
:
i18n
.
qtr
(
"
Playlists
"
),
url
:
"
qrc:///medialibrary/VideoPlaylistsDisplay.qml
"
...
...
modules/gui/qt/medialibrary/qml/VideoGroupsDisplay.qml
0 → 100644
View file @
01abb31e
/*****************************************************************************
* Copyright (C) 2021 VLC authors and VideoLAN
*
* Authors: Benjamin Arnaud <bunjee@omega.gg>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* ( at your option ) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
import
QtQuick
2.11
import
QtQuick
.
Controls
2.4
import
QtQuick
.
Layouts
1.3
import
QtQml
.
Models
2.2
import
org
.
videolan
.
medialib
0.1
import
"
qrc:///widgets/
"
as
Widgets
import
"
qrc:///style/
"
Widgets.PageLoader
{
id
:
root
//---------------------------------------------------------------------------------------------
// Aliases
//---------------------------------------------------------------------------------------------
property
bool
isViewMultiView
:
true
property
variant
model
property
variant
sortModel
//---------------------------------------------------------------------------------------------
// Settings
//---------------------------------------------------------------------------------------------
defaultPage
:
"
all
"
pageModel
:
[{
name
:
"
all
"
,
component
:
componentAll
},
{
name
:
"
list
"
,
component
:
componentList
}]
//---------------------------------------------------------------------------------------------
// Events
//---------------------------------------------------------------------------------------------
onCurrentItemChanged
:
{
model
=
currentItem
.
model
;
sortModel
=
currentItem
.
sortModel
;
isViewMultiView
=
(
currentItem
.
isViewMultiView
===
undefined
||
currentItem
.
isViewMultiView
);
}
//---------------------------------------------------------------------------------------------
// Functions
//---------------------------------------------------------------------------------------------
// Private
function
_updateHistoryAll
(
index
)
{
history
.
update
([
"
mc
"
,
"
video
"
,
"
groups
"
,
"
all
"
,
{
"
initialIndex
"
:
index
}]);
}
function
_updateHistoryList
(
list
)
{
history
.
update
([
"
mc
"
,
"
video
"
,
"
groups
"
,
"
list
"
,
{
"
initialIndex
"
:
list
.
currentIndex
,
"
initialId
"
:
list
.
parentId
,
"
initialName
"
:
list
.
name
}]);
}
//---------------------------------------------------------------------------------------------
// Childs
//---------------------------------------------------------------------------------------------
Component
{
id
:
componentAll
MediaGroupList
{
anchors.fill
:
parent
onCurrentIndexChanged
:
_updateHistoryAll
(
currentIndex
)
onShowList
:
history
.
push
([
"
mc
"
,
"
video
"
,
"
groups
"
,
"
list
"
,
{
parentId
:
model
.
id
,
name
:
model
.
name
}])
}
}
Component
{
id
:
componentList
MediaGroupDisplay
{
id
:
list
anchors.fill
:
parent
onCurrentIndexChanged
:
_updateHistoryList
(
list
)
onParentIdChanged
:
_updateHistoryList
(
list
)
onNameChanged
:
_updateHistoryList
(
list
)
}
}
}
modules/gui/qt/vlc.qrc
View file @
01abb31e
...
...
@@ -279,6 +279,7 @@
<file alias="VideoDisplay.qml">medialibrary/qml/VideoDisplay.qml</file>
<file alias="VideoAll.qml">medialibrary/qml/VideoAll.qml</file>
<file alias="VideoAllDisplay.qml">medialibrary/qml/VideoAllDisplay.qml</file>
<file alias="VideoGroupsDisplay.qml">medialibrary/qml/VideoGroupsDisplay.qml</file>
<file alias="PlaylistMediaList.qml">medialibrary/qml/PlaylistMediaList.qml</file>
<file alias="PlaylistMedia.qml">medialibrary/qml/PlaylistMedia.qml</file>
<file alias="PlaylistMediaDelegate.qml">medialibrary/qml/PlaylistMediaDelegate.qml</file>
...
...
po/POTFILES.in
View file @
01abb31e
...
...
@@ -840,6 +840,7 @@ modules/gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml
modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
modules/gui/qt/medialibrary/qml/VideoAll.qml
modules/gui/qt/medialibrary/qml/VideoAllDisplay.qml
modules/gui/qt/medialibrary/qml/VideoGroupsDisplay.qml
modules/gui/qt/medialibrary/qml/PlaylistMediaList.qml
modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
modules/gui/qt/medialibrary/qml/PlaylistMediaDelegate.qml
...
...
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