Commit ffcabc0c authored by luyikei's avatar luyikei

MediaLibraryView: Implement filtering

parent 3f797e4d
......@@ -6,11 +6,18 @@ Rectangle {
color: GridView.isCurrentItem ? "black" : "#333333"
border.color: "#222222"
border.width: 1
visible: searchText.length > 0 ? containsString( searchText ) : true
enabled: visible
property string thumbnailPath
property string title
property int duration
property int mediaId
function containsString( str )
{
return title.toLowerCase().indexOf( str.toLowerCase() ) !== -1;
}
Image {
id: thumbnail
anchors.left: mediaItem.left
......
......@@ -5,6 +5,8 @@ Rectangle {
anchors.fill: parent
color: "#999999"
property alias searchText: searchTextInput.text
ScrollView {
id: sView
height: parent.height
......@@ -41,6 +43,7 @@ Rectangle {
}
TextInput {
id: searchTextInput
color: "#DDDDDD"
width: parent.width
anchors.centerIn: parent
......
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