Warning, /office/kbibtex/mobile/sailfishos/qml/pages/SearchEngineListView.qml is written in an unsupported language. File is not indexed.

0001 /***************************************************************************
0002  *   SPDX-License-Identifier: GPL-2.0-or-later
0003  *                                                                         *
0004  *   SPDX-FileCopyrightText: 2017 Thomas Fischer <fischer@unix-ag.uni-kl.de>
0005  *                                                                         *
0006  *   This program is free software; you can redistribute it and/or modify  *
0007  *   it under the terms of the GNU General Public License as published by  *
0008  *   the Free Software Foundation; either version 2 of the License, or     *
0009  *   (at your option) any later version.                                   *
0010  *                                                                         *
0011  *   This program is distributed in the hope that it will be useful,       *
0012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0014  *   GNU General Public License for more details.                          *
0015  *                                                                         *
0016  *   You should have received a copy of the GNU General Public License     *
0017  *   along with this program; if not, see <https://www.gnu.org/licenses/>. *
0018  ***************************************************************************/
0019 
0020 import QtQuick 2.0
0021 import Sailfish.Silica 1.0
0022 import harbour.bibsearch 1.0
0023 
0024 Page {
0025     id: searchEngineListViewPage
0026     allowedOrientations: Orientation.All
0027 
0028     SilicaFlickable {
0029         id: resultList
0030         anchors.fill: parent
0031         contentHeight: content.height
0032 
0033         Column {
0034             id: content
0035             width: parent.width
0036 
0037             PageHeader {
0038                 title: qsTr("Available Search Engines")
0039             }
0040 
0041             SilicaListView {
0042                 id: searchEngineListView
0043                 model: searchEngineList
0044                 width: parent.width
0045                 height: childrenRect.height
0046 
0047                 delegate: TextSwitch {
0048                     width: parent.width
0049                     text: label
0050                     Component.onCompleted: checked = engineEnabled
0051                     onCheckedChanged: engineEnabled = checked
0052                 }
0053             }
0054         }
0055     }
0056 }