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

kalgebra

  • sources
  • kde-4.14
  • kdeedu
  • kalgebra
  • plasmoids
  • graphsplasmoid
  • contents
  • ui
main.qml
Go to the documentation of this file.
1 /*
2  * Copyright 2012 Aleix Pol Gonzalez <aleixpol@kde.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Library General Public License as
6  * published by the Free Software Foundation; either version 2 or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this program; if not, write to the
16  * Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19 
20 import QtQuick 1.1
21 import org.kde.plasma.components 0.1 as PlasmaComponents
22 import org.kde.analitza 1.0
23 
24 Item {
25  property Component compactRepresentation: Component {
26  PlasmaComponents.Button {
27  iconSource: "kalgebra"
28  onClicked: plasmoid.togglePopup()
29  }
30  }
31  property string displayedFunction
32  onDisplayedFunctionChanged: {
33  plots.clear()
34  view.addFunction(displayedFunction)
35  }
36 
37  PlasmaComponents.TextField {
38  id: input
39  anchors {
40  top: parent.top
41  left: parent.left
42  right: parent.right
43  }
44  onAccepted: {
45  displayedFunction = text
46  plasmoid.writeConfig("function", text)
47  }
48  }
49 
50  Component.onCompleted: {
51  plasmoid.addEventListener('ConfigChanged', function() {
52  displayedFunction = plasmoid.readConfig("function")
53  input.text = displayedFunction
54  });
55  }
56 
57  Graph2D {
58  id: view
59  anchors {
60  fill: parent
61  topMargin: input.height
62  }
63 
64  model: PlotsModel { id: plots }
65 
66  ticksShown: false
67  }
68 }
Graph2D
Definition: Graph2D.qml:3
Component
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:11:49 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
  • 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