Commit 25d1b697 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Remove dependencies to QtDesktop in the plugins.

parent 225d8c34
add_subdirectory(widgets)
install( FILES
KAlgebraMobile.qml
Console.qml Plot2D.qml Tables.qml
kalgebraconsole.desktop kalgebraplot2d.desktop kalgebratables.desktop
DESTINATION ${DATA_INSTALL_DIR}/kalgebra/plugins/
......
import QtQuick 1.0
import QtDesktop 0.1
import org.kde.analitza 1.0
import "widgets"
......@@ -75,7 +74,7 @@ KAlgebraPage
anchors.right: parent.right
}
TableView {
SimpleListView {
model: itemModel
// delegate: ConsoleDelegate {}
// itemDelegate: Row { Text { text: result } }
......@@ -83,10 +82,7 @@ KAlgebraPage
height: 200
TableColumn {
property: "result"
caption: "Title"
}
role: "result"
anchors.top: inputrow.bottom
width: parent.width
......
import QtQuick 1.0
import QtDesktop 0.1
import org.kde.analitza 1.0
import "widgets"
......@@ -27,7 +26,6 @@ KAlgebraPage
Column {
id: controls
height: 200
anchors.bottom: parent.bottom
Row {
......@@ -47,7 +45,7 @@ KAlgebraPage
}
}
TableView {
SimpleListView {
id: listview
model: app.functionsModel()
// itemDelegate: Text { text: display + " " + expression }
......@@ -55,17 +53,8 @@ KAlgebraPage
onCurrentIndexChanged: view.currentFunction=currentIndex-1
TableColumn {
property: "display"
caption: "Name"
}
TableColumn {
property: "expression"
caption: "Function"
}
role: "expression"
width: view.width
height: 100
}
......
import QtQuick 1.0
import QtDesktop 0.1
import org.kde.analitza 1.0
import "widgets"
KAlgebraPage
{
id: bg
width: 100
height: 100
ListModel { id: resultsModel }
Analitza { id: a }
......@@ -22,7 +23,7 @@ KAlgebraPage
var args = new Array();
args[0]=i;
// console.log("!!! " + i);
resultsModel.append( { value: i, result: a.executeFunc(tmp, args) } );
resultsModel.append( { element: i +" = "+ a.executeFunc(tmp, args) } );
}
a.removeVariable(tmp);
......@@ -46,24 +47,13 @@ KAlgebraPage
Text { text: "Results:"; id: res; anchors.top: ins.bottom }
TableView {
SimpleListView {
id: view
anchors.bottom: parent.bottom
anchors.top: res.bottom
model: resultsModel
width: bg.width
// delegate: Text { text: value+" -> "+result}
TableColumn {
property: "value"
caption: "Value"
width: 50
}
TableColumn {
property: "result"
caption: "Image"
}
role: "element"
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment