Warning, /office/kbibtex/mobile/sailfishos/qml/pages/SettingsPage.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: settingsPage 0026 allowedOrientations: Orientation.All 0027 0028 SilicaFlickable { 0029 anchors.fill: parent 0030 contentHeight: column.height 0031 contentWidth: parent.width 0032 0033 VerticalScrollDecorator { 0034 } 0035 0036 Column { 0037 id: column 0038 width: parent.width 0039 0040 PageHeader { 0041 title: qsTr("Settings") 0042 } 0043 0044 ComboBox { 0045 id: sortOrder 0046 label: qsTr("Sort Order") 0047 currentIndex: bibliographyModel.sortOrder 0048 menu: ContextMenu { 0049 Repeater { 0050 model: bibliographyModel.humanReadableSortOrder() 0051 MenuItem { 0052 text: modelData 0053 } 0054 } 0055 } 0056 onCurrentItemChanged: { 0057 bibliographyModel.sortOrder = currentIndex 0058 } 0059 } 0060 0061 ValueButton { 0062 label: qsTr("Search Engines") 0063 value: searchEngineList.searchEngineCount === 0 0064 ? qsTr("None selected") 0065 : qsTr("%1 selected").arg(searchEngineList.searchEngineCount) 0066 description: searchEngineList.searchEngineCount === 0 0067 ? qsTr("At least one search engine must be selected.") 0068 : searchEngineList.humanReadableSearchEngines() 0069 0070 onClicked: { 0071 pageStack.push("SearchEngineListView.qml") 0072 } 0073 } 0074 } 0075 } 0076 }