/* Lliurex Sddm theme Copyright (C) 2019 Enrique Medina Gremaldos 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 3 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, see . */ import "." as Lliurex import net.lliurex.ui 1.0 as LLX import QtQuick 2.0 import QtQuick.Layouts 1.1 as Layouts import QtQuick.Controls 2.5 as Controls import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 3.0 as PlasmaComponents FocusScope { id: userGrid property alias model: grid.model property string filter : "" signal selected(string name) signal cancel() Keys.onPressed: { if (event.key == Qt.Key_Return) { for (var n = 0; n < grid.children.length; n++) { if (grid.children[n].visible) { selected(grid.children[n].name); break; } } } if (event.key == Qt.Key_Escape) { cancel(); } } onFilterChanged: { var hl=filter.length>0; var first=true; var visibles=0; for (var i = 0; i < grid.children.length; i++) { grid.children[i].filter=filter; } for (var n=0;n