• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kalgebra

  • sources
  • kde-4.12
  • kdeedu
  • kalgebra
  • mobile
  • plugins
Console.qml
Go to the documentation of this file.
1 import QtQuick 1.0
2 import org.kde.analitza 1.0
3 import widgets 1.0
4 
5 KAlgebraPage
6 {
7  ListModel { id: itemModel }
8 
9  ExpressionInput {
10  id: input
11  focus: true
12 
13  Analitza {
14  id: a
15  variables: app.variables
16  }
17 
18  Keys.onReturnPressed: {
19  var res = a.execute(text)
20 
21  var toadd = ""
22  if(!a.isCorrect)
23  toadd = "Error: " + (res ? res : a.errors)
24  else
25  toadd = text + " = " + res.expression
26 
27  itemModel.insert(0, { result: toadd, resultsInput: text })
28  input.selectAll()
29  view.currentIndex = 0
30  }
31 
32  width: parent.width
33  anchors.top: parent.top
34  }
35 
36  SimpleListView {
37  model: itemModel
38  id: view
39 
40  delegate: Label {
41  text: result
42  MouseArea {
43  anchors.fill: parent
44  onClicked: {
45  input.text = resultsInput
46  input.selectAll()
47  input.focus = true
48  }
49  }
50  }
51 
52  anchors {
53  top: input.bottom
54  bottom: parent.bottom
55  left: parent.left
56  right: parent.right
57  }
58  }
59 }
Label
Definition: desktop/Label.qml:3
SimpleListView
Definition: desktop/SimpleListView.qml:2
ExpressionInput
Definition: desktop/ExpressionInput.qml:2
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:35:27 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kalgebra

Skip menu "kalgebra"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal