[vlc-commits] qml: remove unsused NetworkSection
Pierre Lamot
git at videolan.org
Fri Sep 6 18:02:08 CEST 2019
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri Sep 6 16:55:30 2019 +0200| [71792abe807836627e7a965b37389e29ab457d79] | committer: Jean-Baptiste Kempf
qml: remove unsused NetworkSection
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=71792abe807836627e7a965b37389e29ab457d79
---
modules/gui/qt/Makefile.am | 1 -
.../gui/qt/qml/mediacenter/MCNetworksSection.qml | 140 ---------------------
modules/gui/qt/vlc.qrc | 1 -
3 files changed, 142 deletions(-)
diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index 88e3d92b33..af4a5d05cc 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -622,7 +622,6 @@ libqt_plugin_la_QML = \
gui/qt/qml/mediacenter/MCVideoDisplay.qml \
gui/qt/qml/mediacenter/MCVideoListDisplay.qml \
gui/qt/qml/mediacenter/MCNetworkDisplay.qml \
- gui/qt/qml/mediacenter/MCNetworksSection.qml \
gui/qt/qml/mediacenter/MCNetworksSectionSelectableDM.qml \
gui/qt/qml/mediacenter/MusicAlbumsDisplay.qml \
gui/qt/qml/mediacenter/MusicAlbumsGridExpandDelegate.qml \
diff --git a/modules/gui/qt/qml/mediacenter/MCNetworksSection.qml b/modules/gui/qt/qml/mediacenter/MCNetworksSection.qml
deleted file mode 100644
index a175645faf..0000000000
--- a/modules/gui/qt/qml/mediacenter/MCNetworksSection.qml
+++ /dev/null
@@ -1,140 +0,0 @@
-/*****************************************************************************
- * Copyright (C) 2019 VLC authors and VideoLAN
- *
- * 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 QtQml.Models 2.2
-import QtQml 2.11
-import "qrc:///utils/" as Utils
-import "qrc:///style/"
-
-Rectangle {
- id: networkSection
-
- property var selectableDelegateModel: null
- property alias text: sectionSeparator.text
- property alias currentIndex: sectionListView.currentIndex
-
- signal actionDown(int index)
- signal actionUp(int index)
-
- function adjustTopFlickableViewBound(){
-
- const itemTop = networkSection.y + sectionListView.currentItem.y
- const itemBottom = sectionSeparator.height + networkSection.y + sectionListView.currentItem.y + sectionListView.currentItem.height
- if (itemTop < flickable.contentY)
- flickable.contentY = itemTop
-
- else if (itemBottom > (flickable.contentY + flickable.height))
- flickable.contentY = itemBottom - flickable.height
- }
- anchors {
- left: parent.left
- right: parent.right
- }
- implicitHeight: childrenRect.height
- color: "transparent"
- enabled: visible
-
- /*
- *define the intial position/selection
- * This is done on activeFocus rather than Component.onCompleted because delegateModel.
- * selectedGroup update itself after this event
- */
- onActiveFocusChanged: {
- if(activeFocus){
- sectionListView.forceActiveFocus()
- }
-
- if (networkSection.selectableDelegateModel.items.count > 0 && networkSection.selectableDelegateModel.selectedGroup.count === 0) {
- var initialIndex = 0
- if (view[networkSection.selectableDelegateModel.viewIndexPropertyName] !== -1)
- initialIndex = view.currentIndexProvider
- networkSection.selectableDelegateModel.items.get(initialIndex).inSelected = true
- view[networkSection.selectableDelegateModel.viewIndexPropertyName] = initialIndex
- }
-
- adjustTopFlickableViewBound()
- }
-
- Utils.LabelSeparator {
- id: sectionSeparator
- }
- Rectangle{
- id: sectionRect
- anchors {
- left: parent.left
- right: parent.right
- top: sectionSeparator.bottom
- }
- height: gridRect.height
- color: "transparent"
-
- Rectangle {
- id: gridRect
- color: VLCStyle.colors.bg
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: VLCStyle.margin_large
- anchors.rightMargin: VLCStyle.margin_large
- height: sectionListView.contentHeight
- Utils.KeyNavigableListView {
- id: sectionListView
- anchors.fill: parent
-
- model: networkSection.selectableDelegateModel.parts.grid
- modelCount: networkSection.selectableDelegateModel.items.count
- currentIndex: networkSection.currentIndex
- orientation: ListView.Horizontal
- onCurrentItemChanged: adjustTopFlickableViewBound()
-
- onSelectAll: networkSection.selectableDelegateModel.selectAll()
- onSelectionUpdated: networkSection.selectableDelegateModel.updateSelection( keyModifiers, oldIndex, newIndex )
- onActionAtIndex: networkSection.selectableDelegateModel.actionAtIndex(index)
-
- onActionLeft: root.actionLeft(index)
- onActionRight: root.actionRight(index)
- onActionUp: networkSection.actionUp(index)
- onActionDown: networkSection.actionDown(index)
- onActionCancel: root.actionCancel(index)
-
- }
-
- }
-
- Utils.RoundButton{
- id: leftBtn
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- text:"<"
- onClicked: sectionListView.prevPage()
- visible: sectionListView.contentWidth > sectionListView.width
- enabled: visible
- }
-
-
- Utils.RoundButton{
- id: rightBtn
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- text:">"
- onClicked: sectionListView.nextPage()
- visible: sectionListView.contentWidth > sectionListView.width
- enabled: visible
- }
- }
-}
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index 6a54bc89ce..cdf5202172 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -209,7 +209,6 @@
<file alias="MCMusicDisplay.qml">qml/mediacenter/MCMusicDisplay.qml</file>
<file alias="MCVideoDisplay.qml">qml/mediacenter/MCVideoDisplay.qml</file>
<file alias="MCNetworkDisplay.qml">qml/mediacenter/MCNetworkDisplay.qml</file>
- <file alias="MCNetworksSection.qml">qml/mediacenter/MCNetworksSection.qml</file>
<file alias="MCNetworksSectionSelectableDM.qml">qml/mediacenter/MCNetworksSectionSelectableDM.qml</file>
<file alias="MusicAlbumsDisplay.qml">qml/mediacenter/MusicAlbumsDisplay.qml</file>
<file alias="MusicAlbumsGridExpandDelegate.qml">qml/mediacenter/MusicAlbumsGridExpandDelegate.qml</file>
More information about the vlc-commits
mailing list