[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kalgebra] mobile/plugins: Introduce a 3D plotting activity to kalgebramobile
From: Aleix Pol <aleixpol () kde ! org>
Date: 2015-10-01 1:34:39
Message-ID: E1ZhSlb-0006R3-W1 () scm ! kde ! org
[Download RAW message or body]
Git commit 4a01e8d22bc27a51495489b54b290a61b3d8fe00 by Aleix Pol.
Committed on 01/10/2015 at 01:29.
Pushed by apol into branch 'master'.
Introduce a 3D plotting activity to kalgebramobile
M +2 -2 mobile/plugins/CMakeLists.txt
A +67 -0 mobile/plugins/Plot3D.qml [License: GPL (v2+)]
A +13 -0 mobile/plugins/kalgebraplot3d.json
http://commits.kde.org/kalgebra/4a01e8d22bc27a51495489b54b290a61b3d8fe00
diff --git a/mobile/plugins/CMakeLists.txt b/mobile/plugins/CMakeLists.txt
index c502a54..fe58754 100644
--- a/mobile/plugins/CMakeLists.txt
+++ b/mobile/plugins/CMakeLists.txt
@@ -1,9 +1,9 @@
add_subdirectory(widgets)
install( FILES
- Console.qml Plot2D.qml Tables.qml
+ Console.qml Plot2D.qml Plot3D.qml Tables.qml
About.qml VariablesView.qml
kalgebraabout.json
- kalgebraconsole.json kalgebraplot2d.json kalgebratables.json kalgebravariables.json
+ kalgebraconsole.json kalgebraplot2d.json kalgebraplot3d.json kalgebratables.json kalgebravariables.json
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/
)
diff --git a/mobile/plugins/Plot3D.qml b/mobile/plugins/Plot3D.qml
new file mode 100644
index 0000000..d658ec3
--- /dev/null
+++ b/mobile/plugins/Plot3D.qml
@@ -0,0 +1,67 @@
+/*************************************************************************************
+ * Copyright (C) 2015 by Aleix Pol <aleixpol@kde.org> *
+ * *
+ * 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 2 *
+ * 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, write to the Free Software *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA *
+ *************************************************************************************/
+
+import QtQuick 2.0
+import QtQuick.Layouts 1.1
+import org.kde.analitza 1.1
+import widgets 1.0
+
+KAlgebraPage
+{
+ ColumnLayout
+ {
+ anchors.fill: parent
+
+ RowLayout {
+ Layout.fillWidth: true
+
+ ExpressionInput {
+ id: input
+ Layout.fillWidth: true
+
+ text: "sin x*sin y"
+ focus: true
+ Component.onCompleted: selectAll()
+
+ Keys.onReturnPressed: {
+ var err = view.addFunction(input.text, app.variables)
+ if (err.length>0)
+ console.warn("errors:", err)
+ }
+ }
+
+ Button {
+ id: exec
+ text: "Clear"
+ width: 100
+
+ onClicked: {
+ view.model.clear()
+ view.resetView()
+ input.focus = true
+ }
+ }
+ }
+ Graph3D
+ {
+ id: view
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+}
diff --git a/mobile/plugins/kalgebraplot3d.json b/mobile/plugins/kalgebraplot3d.json
new file mode 100644
index 0000000..1c9afcd
--- /dev/null
+++ b/mobile/plugins/kalgebraplot3d.json
@@ -0,0 +1,13 @@
+{
+ "Comment": "Draws any 3D graph you want",
+ "Icon": "draw-bezier-curves",
+ "Name": "Graph 3D",
+ "ServiceTypes": "KAlgebra/Script",
+ "Type": "Service",
+ "X-KAlgebra-Priority": "100",
+ "X-KDE-PluginInfo-Author": "Aleix Pol Gonzalez",
+ "X-KDE-PluginInfo-Email": "aleixpol@kde.org",
+ "X-KDE-PluginInfo-License": "GPL",
+ "X-KDE-PluginInfo-Name": "Plot3D.qml",
+ "X-KDE-PluginInfo-Version": "1.0"
+}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic