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 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
Item Item
......
This diff is collapsed.
...@@ -9,6 +9,7 @@ AlbumsModel::AlbumsModel(QObject *parent) : MauiList(parent), ...@@ -9,6 +9,7 @@ AlbumsModel::AlbumsModel(QObject *parent) : MauiList(parent),
void AlbumsModel::componentComplete() void AlbumsModel::componentComplete()
{ {
this->setList();
connect(this, &AlbumsModel::queryChanged, this, &AlbumsModel::setList); connect(this, &AlbumsModel::queryChanged, this, &AlbumsModel::setList);
} }
...@@ -121,8 +122,8 @@ void AlbumsModel::setList() ...@@ -121,8 +122,8 @@ void AlbumsModel::setList()
this->sortList(); this->sortList();
emit this->postListChanged(); emit this->postListChanged();
if(this->query == AlbumsModel::QUERY::ALBUMS) //if(this->query == AlbumsModel::QUERY::ALBUMS)
this->fetchInformation(); //this->fetchInformation();
} }
void AlbumsModel::fetchInformation() void AlbumsModel::fetchInformation()
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../utils/Help.js" as H import "../../utils/Help.js" as H
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Layouts 1.3 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.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import "../../utils" import "../../utils"
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../view_models" import "../../view_models"
import "../../view_models/BabeTable" import "../../view_models/BabeTable"
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtWebEngine 1.5 import QtWebEngine 1.5
import "../../../view_models" import "../../../view_models"
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../../view_models" import "../../../view_models"
import "../../../view_models/BabeTable" import "../../../view_models/BabeTable"
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../view_models" import "../../view_models"
import "../../view_models/BabeTable" import "../../view_models/BabeTable"
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../view_models" import "../../view_models"
import QtWebEngine 1.5 import QtWebEngine 1.5
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../view_models" import "../../view_models"
import QtWebView 1.1 import QtWebView 1.1
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../view_models" import "../../view_models"
......
...@@ -44,10 +44,7 @@ function refreshCollection(size) ...@@ -44,10 +44,7 @@ function refreshCollection(size)
{ {
if(size>0) root.notify("emblem-info", "Collection updated", size+" new tracks added...") if(size>0) root.notify("emblem-info", "Collection updated", size+" new tracks added...")
refreshTracks()
refreshAlbums()
refreshArtists()
refreshFolders()
} }
function refreshFolders() function refreshFolders()
......
import QtQuick 2.9 import QtQuick 2.10
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import AlbumsList 1.0 import AlbumsList 1.0
import org.kde.kirigami 2.7 as Kirigami import org.kde.kirigami 2.7 as Kirigami
......
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick 2.9 import QtQuick 2.10
import ".." import ".."
import org.kde.kirigami 2.7 as Kirigami import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.12 import QtQuick 2.10
import QtQuick.Controls 2.12 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import org.kde.kirigami 2.6 as Kirigami import org.kde.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
...@@ -28,5 +28,8 @@ Maui.Page ...@@ -28,5 +28,8 @@ Maui.Page
anchors.fill: parent anchors.fill: parent
holder.visible: count === 0 holder.visible: count === 0
topMargin: Maui.Style.space.medium topMargin: Maui.Style.space.medium
listView.headerPositioning: ListView.PullBackHeader
Kirigami.Theme.colorSet: Kirigami.Theme.Window
Kirigami.Theme.inherit: false
} }
} }
...@@ -77,7 +77,7 @@ BabeList ...@@ -77,7 +77,7 @@ BabeList
{ {
id: sortBtn id: sortBtn
icon.name: "view-sort" icon.name: "view-sort"
visible: listView.count > 2
MenuItem MenuItem
{ {
text: qsTr("Title") text: qsTr("Title")
...@@ -179,22 +179,23 @@ BabeList ...@@ -179,22 +179,23 @@ BabeList
id: _filterButton id: _filterButton
icon.name: "view-filter" icon.name: "view-filter"
checkable: true checkable: true
visible: listView.count > 10
} }
] ]
// listView.headerPositioning: ListView.PullBackHeader // listView.headerPositioning: ListView.PullBackHeader
listView.header: Maui.ToolBar listView.header: Maui.ToolBar
{ {
Kirigami.Theme.backgroundColor: control.Kirigami.Theme.backgroundColor
visible: _filterButton.checked visible: _filterButton.checked
width: control.width width: control.width
position: ToolBar.Header position: ToolBar.Header
z: listView.z + 9
middleContent: Maui.TextField middleContent: Maui.TextField
{ {
Layout.fillWidth: true Layout.fillWidth: true
} }
} }
Maui.Dialog Maui.Dialog
...@@ -314,7 +315,6 @@ BabeList ...@@ -314,7 +315,6 @@ BabeList
} }
} }
Maui.BaseModel Maui.BaseModel
{ {
id: _tracksModel id: _tracksModel
...@@ -401,7 +401,6 @@ BabeList ...@@ -401,7 +401,6 @@ BabeList
} }
onCleared: delegate.isSelected = false onCleared: delegate.isSelected = false
} }
} }
...@@ -445,7 +444,7 @@ BabeList ...@@ -445,7 +444,7 @@ BabeList
{ {
swipeView.currentIndex = viewsIndex.albums swipeView.currentIndex = viewsIndex.albums
const item = list.get(listView.currentIndex) const item = list.get(listView.currentIndex)
albumsView.populateTable(item.album, item.artist) swipeView.currentItem.item.populateTable(item.album, item.artist)
contextMenu.close() contextMenu.close()
} }
...@@ -453,7 +452,7 @@ BabeList ...@@ -453,7 +452,7 @@ BabeList
{ {
swipeView.currentIndex = viewsIndex.artists swipeView.currentIndex = viewsIndex.artists
const item = list.get(listView.currentIndex) const item = list.get(listView.currentIndex)
artistsView.populateTable(undefined, item.artist) swipeView.currentItem.item.populateTable(undefined, item.artist)
contextMenu.close() contextMenu.close()
} }
......
import QtQuick 2.0 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.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3 import QtQuick.Controls 2.10
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import org.kde.kirigami 2.7 as Kirigami import org.kde.kirigami 2.7 as Kirigami
......
import QtQuick 2.0 import QtQuick 2.0
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../../utils" import "../../utils"
import ".." import ".."
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
Item Item
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../view_models/BabeGrid" import "../view_models/BabeGrid"
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import org.kde.kirigami 2.7 as Kirigami import org.kde.kirigami 2.7 as Kirigami
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import org.kde.kirigami 2.7 as Kirigami import org.kde.kirigami 2.7 as Kirigami
......
...@@ -21,7 +21,7 @@ Rectangle ...@@ -21,7 +21,7 @@ Rectangle
focus: true focus: true
Component.onCompleted: Component.onCompleted:
{ {
_drawer.close() _drawer.visible = false
forceActiveFocus() forceActiveFocus()
} }
...@@ -110,7 +110,7 @@ Rectangle ...@@ -110,7 +110,7 @@ Rectangle
Rectangle Rectangle
{ {
id: _bg id: _bg
width: parent.width * 0.7 width: parent.height * 0.7
height: width height: width
anchors.centerIn: parent anchors.centerIn: parent
radius: Maui.Style.radiusV radius: Maui.Style.radiusV
...@@ -132,15 +132,13 @@ Rectangle ...@@ -132,15 +132,13 @@ Rectangle
Image Image
{ {
id: _image id: _image
width: parent.width * 0.7 width: parent.height * 0.7
height: width height: width
anchors.centerIn: parent anchors.centerIn: parent
sourceSize.width: height sourceSize.width: height
sourceSize.height: height sourceSize.height: height
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
antialiasing: false antialiasing: false
smooth: true smooth: true
......
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import "../view_models/BabeTable" import "../view_models/BabeTable"
import "../db/Queries.js" as Q import "../db/Queries.js" as Q
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.0 import QtGraphicalEffects 1.0
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
Item Item
......
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import org.kde.kirigami 2.7 as Kirigami import org.kde.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
...@@ -63,7 +63,7 @@ Maui.ToolBar ...@@ -63,7 +63,7 @@ Maui.ToolBar
} }
} }
middleContent: ListView middleContent: ListView
{ {
id: _listView id: _listView
Layout.fillWidth: true Layout.fillWidth: true
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
Menu Menu
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Layouts 1.3 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.kirigami 2.7 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Layouts 1.3 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.kirigami 2.6 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import PlaylistsList 1.0 import PlaylistsList 1.0
......
import QtQuick 2.0 import QtQuick 2.0
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import "../../view_models" import "../../view_models"
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import org.kde.kirigami 2.2 as Kirigami import org.kde.kirigami 2.2 as Kirigami
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
......
import QtQuick 2.0 import QtQuick 2.0
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import "../utils" import "../utils"
import ".." import ".."
......
import QtQuick 2.9 import QtQuick 2.10
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Controls 2.2 import QtQuick.Controls 2.10
import org.kde.mauikit 1.0 as Maui import org.kde.mauikit 1.0 as Maui
import "../../view_models" import "../../view_models"
import "../../utils/Help.js" as H 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 org.kde.mauikit 1.0 as Maui
import "../view_models/BabeTable" import "../view_models/BabeTable"
import "../view_models" 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