Commit c491c955 authored by Artur Puzio's avatar Artur Puzio Committed by Aleix Pol Gonzalez
Browse files

Ported Dictionary tab to mobile version

Added a dictionary plugin to mobile version.

REVIEW: 126604
parent 35ff0b68
add_subdirectory(widgets)
install( FILES
Console.qml Plot2D.qml Plot3D.qml Tables.qml
Console.qml Plot2D.qml Plot3D.qml Tables.qml Dictionary.qml
About.qml VariablesView.qml
kalgebraabout.json
kalgebraconsole.json kalgebraplot2d.json kalgebraplot3d.json kalgebratables.json kalgebravariables.json
kalgebraconsole.json kalgebraplot2d.json kalgebraplot3d.json kalgebratables.json kalgebravariables.json kalgebradictionary.json
DESTINATION ${KDE_INSTALL_DATADIR}/kalgebramobile/plugins/
)
import QtQuick 2.0
import QtQuick.Layouts 1.0
import QtQuick.Controls 1.4 as Controls
import org.kde.analitza 1.0
import widgets 1.0
KAlgebraPage
{
id: page
anchors.margins: 0
Rectangle {
anchors.fill: parent
color: 'white'
id: informationrec
Graph2D {
id: view
anchors {
top: descriptioncol.bottom
left: parent.left
right: parent.right
bottom: parent.bottom
}
model: app.functionsModel()
Component.onCompleted: {
chosebox.updateGraph();
}
}
ColumnLayout {
id: descriptioncol
anchors {
top: parent.top
left: parent.left
right: parent.right
}
spacing: 10
OperatorsModel {
id: operators
}
Controls.ComboBox {
anchors {
left: parent.left
right: parent.right
}
id: chosebox
currentIndex: 29
activeFocusOnPress: true
model: ListModel {
id: cbItems
Component.onCompleted: {
for (var i=0; i<operators.rowCount(); i++)
cbItems.append( { text: operators.data(operators.index(i,0)) } );
}
}
function updateGraph() {
if(examplelabel!=null)
{
app.functionsModel().clear();
view.resetViewport();
view.addFunction(examplelabel.text,app.variables);
}
}
onCurrentIndexChanged: {
updateGraph();
}
}
GridLayout {
id: descgrid
columns: 2
Layout.fillWidth: true
Label { text: operators.headerData(0,Qt.Horizontal) } Label { id: namelabel; text: operators.data(operators.index(chosebox.currentIndex,0)) }
Label { text: operators.headerData(1,Qt.Horizontal) } Label { id: desclabel; text: operators.data(operators.index(chosebox.currentIndex,1)) }
Label { text: operators.headerData(2,Qt.Horizontal) } Label { id: paramslabel; text: operators.data(operators.index(chosebox.currentIndex,2)) }
Label { text: operators.headerData(3,Qt.Horizontal) } Label { id: examplelabel; text: operators.data(operators.index(chosebox.currentIndex,3)) }
}
}
}
}
{
"Comment": "List of available functions",
"Icon": "documentation",
"Name": "Dictionary",
"ServiceTypes": "KAlgebra/Script",
"Type": "Service",
"X-KAlgebra-Priority": "100",
"X-KDE-PluginInfo-Author": "Artur Puzio",
"X-KDE-PluginInfo-Email": "cytadela8@op.pl",
"X-KDE-PluginInfo-License": "GPL",
"X-KDE-PluginInfo-Name": "Dictionary.qml",
"X-KDE-PluginInfo-Version": "1.0"
}
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