Commit 2e445521 authored by camilo higuita's avatar camilo higuita

correctly adding the filter bar to the tables that make sense and now only load three views

parent 5e73ae8a
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
Item
......
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import QtQuick.Controls.Material 2.1
......@@ -143,6 +143,7 @@ Maui.ApplicationWindow
Layout.fillHeight: true
Layout.minimumWidth: implicitWidth
currentIndex : swipeView.currentIndex
onCurrentIndexChanged: swipeView.currentIndex = currentIndex
hiddenActions: [
Action
......@@ -193,7 +194,7 @@ Maui.ApplicationWindow
onSearchButtonClicked:
{
_actionGroup.currentIndex = viewsIndex.search
searchView.searchInput.forceActiveFocus()
// searchView.searchInput.forceActiveFocus()
}
Loader
......@@ -301,6 +302,7 @@ Maui.ApplicationWindow
{
_dialogLoader.sourceComponent = _fmDialogComponent
root.dialog.settings.onlyDirs = false
root.dialog.currentPath = "file:///home/camilo/Music"
root.dialog.settings.filterType = Maui.FMList.AUDIO
console.log("SETTIGN FILTER TYPE FISR", root.dialog.settings.filterType, Maui.FMList.AUDIO)
root.dialog.show(function(paths)
......@@ -386,84 +388,6 @@ Maui.ApplicationWindow
// }
]
Item
{
id: message
visible: infoMsg.length && sync
anchors.bottom: parent.bottom
width: parent.width
height: Maui.Style.rowHeight
z: 999
Rectangle
{
id: infoBg
anchors.fill: parent
z: -999
color: "#333"
opacity: 0.8
SequentialAnimation
{
id: animBg
PropertyAnimation
{
target: infoBg
property: "color"
easing.type: Easing.InOutQuad
to: babeColor
duration: 250
}
PropertyAnimation
{
target: infoBg
property: "color"
easing.type: Easing.InOutQuad
to: "#333"
duration: 500
}
}
}
Label
{
id: infoTxt
anchors.centerIn: parent
anchors.fill: parent
height: parent.height
width: parent.width
font.pointSize: Maui.Style.fontSizes.medium
text: infoMsg
horizontalAlignment: Qt.AlignHCenter
verticalAlignment: Qt.AlignVCenter
color: Kirigami.Theme.textColor
SequentialAnimation
{
id: animTxt
PropertyAnimation
{
target: infoTxt
property: "color"
easing.type: Easing.InOutQuad
to: "white"
duration: 250
}
PropertyAnimation
{
target: infoTxt
property: "color"
easing.type: Easing.InOutQuad
to: Kirigami.Theme.textColor
duration: 500
}
}
}
}
PlaylistDialog
{
id: playlistDialog
......@@ -624,7 +548,7 @@ Maui.ApplicationWindow
id: swipeView
Layout.fillHeight: true
Layout.fillWidth: true
interactive: Kirigami.Settings.isMobile
// interactive: Kirigami.Settings.isMobile
currentIndex: _actionGroup.currentIndex
onCurrentIndexChanged: _actionGroup.currentIndex = currentIndex
......@@ -634,6 +558,13 @@ Maui.ApplicationWindow
TracksView
{
id: tracksView
Connections
{
target: vvave
onRefreshTables: tracksView.list.refresh()
}
Connections
{
target: tracksView
......@@ -659,12 +590,19 @@ Maui.ApplicationWindow
}
}
CloudView
Loader
{
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem
sourceComponent: CloudView
{
id: cloudView
}
}
AlbumsView
Loader
{
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem
sourceComponent:AlbumsView
{
id: albumsView
......@@ -677,6 +615,12 @@ Maui.ApplicationWindow
list.query: Albums.ALBUMS
list.sortBy: Albums.ALBUM
Connections
{
target: vvave
onRefreshTables: albumsView.list.refresh()
}
Connections
{
target: albumsView
......@@ -718,8 +662,13 @@ Maui.ApplicationWindow
}
}
}
}
AlbumsView
Loader
{
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem
sourceComponent: AlbumsView
{
id: artistsView
......@@ -733,6 +682,12 @@ Maui.ApplicationWindow
list.sortBy: Albums.ARTIST
table.list.sortBy: Tracks.NONE
Connections
{
target: vvave
onRefreshTables: artistsView.list.refresh()
}
Connections
{
target: artistsView
......@@ -770,8 +725,12 @@ Maui.ApplicationWindow
}
}
}
}
PlaylistsView
Loader
{
active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem
sourceComponent:PlaylistsView
{
id: playlistsView
......@@ -812,11 +771,21 @@ Maui.ApplicationWindow
}
}
}
}
FoldersView
Loader
{
active: SwipeView.isCurrentItem
sourceComponent: FoldersView
{
id: foldersView
Connections
{
target: vvave
onRefreshTables: foldersView.populate()
}
Connections
{
target: foldersView.list
......@@ -844,13 +813,21 @@ Maui.ApplicationWindow
onQueueTrack: Player.queueTracks([foldersView.list.model.get(index)], index)
}
}
}
YouTube
Loader
{
active: SwipeView.isCurrentItem
sourceComponent: YouTube
{
id: youtubeView
}
}
SearchTable
Loader
{
active: SwipeView.isCurrentItem
sourceComponent: SearchTable
{
id: searchView
......@@ -886,6 +863,7 @@ Maui.ApplicationWindow
}
}
}
}
Maui.SelectionBar
{
......
......@@ -9,6 +9,7 @@ AlbumsModel::AlbumsModel(QObject *parent) : MauiList(parent),
void AlbumsModel::componentComplete()
{
this->setList();
connect(this, &AlbumsModel::queryChanged, this, &AlbumsModel::setList);
}
......@@ -121,8 +122,8 @@ void AlbumsModel::setList()
this->sortList();
emit this->postListChanged();
if(this->query == AlbumsModel::QUERY::ALBUMS)
this->fetchInformation();
//if(this->query == AlbumsModel::QUERY::ALBUMS)
//this->fetchInformation();
}
void AlbumsModel::fetchInformation()
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../utils/Help.js" as H
import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.9
import QtQuick 2.10
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui
import "../../utils"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../view_models"
import "../../view_models/BabeTable"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import QtWebEngine 1.5
import "../../../view_models"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../../view_models"
import "../../../view_models/BabeTable"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../view_models"
import "../../view_models/BabeTable"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../view_models"
import QtWebEngine 1.5
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../view_models"
import QtWebView 1.1
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../view_models"
......
......@@ -44,10 +44,7 @@ function refreshCollection(size)
{
if(size>0) root.notify("emblem-info", "Collection updated", size+" new tracks added...")
refreshTracks()
refreshAlbums()
refreshArtists()
refreshFolders()
}
function refreshFolders()
......
import QtQuick 2.9
import QtQuick 2.10
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import AlbumsList 1.0
import org.kde.kirigami 2.7 as Kirigami
......
import QtQuick.Controls 2.2
import QtQuick 2.9
import QtQuick.Controls 2.10
import QtQuick 2.10
import ".."
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
......@@ -28,5 +28,8 @@ Maui.Page
anchors.fill: parent
holder.visible: count === 0
topMargin: Maui.Style.space.medium
listView.headerPositioning: ListView.PullBackHeader
Kirigami.Theme.colorSet: Kirigami.Theme.Window
Kirigami.Theme.inherit: false
}
}
......@@ -77,7 +77,7 @@ BabeList
{
id: sortBtn
icon.name: "view-sort"
visible: listView.count > 2
MenuItem
{
text: qsTr("Title")
......@@ -179,22 +179,23 @@ BabeList
id: _filterButton
icon.name: "view-filter"
checkable: true
visible: listView.count > 10
}
]
// listView.headerPositioning: ListView.PullBackHeader
// listView.headerPositioning: ListView.PullBackHeader
listView.header: Maui.ToolBar
{
Kirigami.Theme.backgroundColor: control.Kirigami.Theme.backgroundColor
visible: _filterButton.checked
width: control.width
position: ToolBar.Header
z: listView.z + 9
middleContent: Maui.TextField
{
Layout.fillWidth: true
}
}
Maui.Dialog
......@@ -314,7 +315,6 @@ BabeList
}
}
Maui.BaseModel
{
id: _tracksModel
......@@ -401,7 +401,6 @@ BabeList
}
onCleared: delegate.isSelected = false
}
}
......@@ -445,7 +444,7 @@ BabeList
{
swipeView.currentIndex = viewsIndex.albums
const item = list.get(listView.currentIndex)
albumsView.populateTable(item.album, item.artist)
swipeView.currentItem.item.populateTable(item.album, item.artist)
contextMenu.close()
}
......@@ -453,7 +452,7 @@ BabeList
{
swipeView.currentIndex = viewsIndex.artists
const item = list.get(listView.currentIndex)
artistsView.populateTable(undefined, item.artist)
swipeView.currentItem.item.populateTable(undefined, item.artist)
contextMenu.close()
}
......
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui
import QtQuick.Layouts 1.3
......
import QtQuick 2.9
import QtQuick 2.10
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import QtQuick.Controls 2.10
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.7 as Kirigami
......
import QtQuick 2.0
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../../utils"
import ".."
......
import QtQuick 2.9
import QtQuick 2.10
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui
Item
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../view_models/BabeGrid"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.7 as Kirigami
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import org.kde.kirigami 2.7 as Kirigami
......
......@@ -21,7 +21,7 @@ Rectangle
focus: true
Component.onCompleted:
{
_drawer.close()
_drawer.visible = false
forceActiveFocus()
}
......@@ -110,7 +110,7 @@ Rectangle
Rectangle
{
id: _bg
width: parent.width * 0.7
width: parent.height * 0.7
height: width
anchors.centerIn: parent
radius: Maui.Style.radiusV
......@@ -132,15 +132,13 @@ Rectangle
Image
{
id: _image
width: parent.width * 0.7
width: parent.height * 0.7
height: width
anchors.centerIn: parent
sourceSize.width: height
sourceSize.height: height
fillMode: Image.PreserveAspectFit
antialiasing: false
smooth: true
......
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui
import "../view_models/BabeTable"
import "../db/Queries.js" as Q
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0
import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui
Item
......
import QtQuick.Controls 2.2
import QtQuick 2.9
import QtQuick.Controls 2.10
import QtQuick 2.10
import QtQuick.Layouts 1.3
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui
Menu
......
import QtQuick 2.9
import QtQuick 2.10
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.9
import QtQuick 2.10
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui
import PlaylistsList 1.0
......
import QtQuick 2.0
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui
import "../../view_models"
......
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui
import QtQuick.Layouts 1.3
......
import QtQuick 2.0
import QtQuick 2.9
import QtQuick.Controls 2.2
import QtQuick 2.10
import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3
import "../utils"
import ".."
......
import QtQuick 2.9
import QtQuick 2.10
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2
import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui
import "../../view_models"
import "../../utils/Help.js" as H
......
import QtQuick 2.9
import QtQuick 2.10
import QtQuick.Controls 2.12
import org.kde.mauikit 1.0 as Maui
import "../view_models/BabeTable"
import "../view_models"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment