Warning, /education/kalgebra/mobile/content/ui/Plot3D.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 QtCore
0005 import QtQuick
0006 import QtQuick.Layouts
0007 import QtQuick.Dialogs
0008 import QtQuick.Controls
0009 import org.kde.kirigami as Kirigami
0010 import org.kde.analitza
0011 import org.kde.kalgebra.mobile
0012
0013 Kirigami.Page {
0014 id: page
0015
0016 leftPadding: 0
0017 rightPadding: 0
0018 topPadding: 0
0019 bottomPadding: 0
0020
0021 title: i18nc("@title:window", "3D Plot")
0022
0023 FileDialog {
0024 id: fileDialog
0025 currentFolder: StandardPaths.standardLocations(StandardPaths.HomeLocation)[0]
0026 onAccepted: proceed()
0027
0028 property var proceed
0029 }
0030
0031 actions: [
0032 Kirigami.Action {
0033 icon.name: 'list-add'
0034 text: i18n('Add Plot')
0035 onTriggered: plotDialog.open()
0036 },
0037 Kirigami.Action {
0038 text: i18n("Save")
0039 icon.name: 'document-save'
0040 onTriggered: {
0041 fileDialog.title = text
0042 fileDialog.proceed = function() {
0043 var ret = view.save(fileDialog.fileUrl)
0044 console.log("saved 3D", fileDialog.fileUrl, ret)
0045 }
0046 fileDialog.nameFilters = view.filters
0047 fileDialog.selectExisting = false
0048 fileDialog.open()
0049 }
0050 },
0051 Kirigami.Action {
0052 icon.name: 'view-restore'
0053 text: i18n("Reset Viewport")
0054 onTriggered: view.resetViewport()
0055 }
0056 ]
0057
0058
0059 Graph3D {
0060 id: view
0061 anchors.fill: parent
0062 model: App.functionsModel()
0063 AddPlotDialog {
0064 id: plotDialog
0065 text: "sin x*sin y"
0066 dimension: 4
0067 }
0068 }
0069 }