Warning, /education/kalgebra/mobile/content/ui/Dictionary.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2015 by Aleix Pol <aleixpol@kde.org> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 0005 import QtQuick.Layouts 0006 import org.kde.analitza 0007 import org.kde.kirigami as Kirigami 0008 import org.kde.kalgebra.mobile 0009 import QtQuick.Controls 0010 0011 Kirigami.Page { 0012 id: page 0013 0014 title: i18nc("@title:window", "Dictionary") 0015 0016 function updateGraph() { 0017 view.model.clear(); 0018 view.resetViewport(); 0019 view.addFunction(operators.data(operators.index(chosebox.currentIndex,3)), App.variables); 0020 } 0021 ColumnLayout { 0022 anchors.fill: parent 0023 spacing: 15 0024 0025 Kirigami.FormLayout { 0026 id: layout 0027 0028 ComboBox { 0029 id: chosebox 0030 Kirigami.FormData.label: i18n("Name:") 0031 textRole: "display" 0032 0033 model: OperatorsModel { 0034 id: operators 0035 } 0036 0037 onCurrentIndexChanged: { 0038 page.updateGraph(); 0039 } 0040 } 0041 Label { 0042 text: operators.data(operators.index(chosebox.currentIndex,0)) 0043 Kirigami.FormData.label: i18n("%1:", operators.headerData(0,Qt.Horizontal)) 0044 } 0045 Label { 0046 text: operators.data(operators.index(chosebox.currentIndex,1)) 0047 Kirigami.FormData.label: i18n("%1:", operators.headerData(1,Qt.Horizontal)) 0048 } 0049 Label { 0050 text: operators.data(operators.index(chosebox.currentIndex,2)) 0051 Kirigami.FormData.label: i18n("%1:", operators.headerData(2,Qt.Horizontal)) 0052 } 0053 Label { 0054 text: operators.data(operators.index(chosebox.currentIndex,3)) 0055 Kirigami.FormData.label: i18n("%1:", operators.headerData(3,Qt.Horizontal)) 0056 } 0057 } 0058 Rectangle { 0059 color: 'white' 0060 Layout.fillWidth: true 0061 Layout.fillHeight: true 0062 0063 Graph2D { 0064 id: view 0065 anchors { 0066 fill: parent 0067 } 0068 model: PlotsModel { 0069 id: plotsModel 0070 } 0071 Component.onCompleted: { 0072 page.updateGraph(); 0073 } 0074 } 0075 } 0076 } 0077 }