• 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
  • mobile
  • plugins
  • widgets
  • kde
kde/KAlgebraMobile.qml
Go to the documentation of this file.
1 import QtQuick 1.0
2 import org.kde.plasma.components 0.1
3 import org.kde.qtextracomponents 0.1
4 import org.kde.analitza 1.0
5 import org.kde.kalgebra.mobile 1.0
6 import org.kde.plasma.core 0.1
7 
8 Item {
9  height: 400
10  width: 300
11 
12  Theme { id: theme }
13 
14  //sebas's hack :D
15  Rectangle {
16  anchors.fill: parent
17  color: theme.backgroundColor
18  opacity: .2
19 
20  Rectangle {
21  anchors.fill: parent
22  color: theme.textColor
23  }
24  }
25 
26  function goToPage(path, deco) {
27 // var toOpen = plugins.pluginPath(idx)
28 
29  try {
30  var component = Qt.createComponent(path)
31  if (component.status == Component.Ready)
32  pageStack.push(component);
33  else
34  console.log("Error loading component:", component.errorString());
35  } catch (e) {
36  console.log("error: "+e)
37  }
38 // d.text=deco
39  }
40 
41  Page {
42  id: init
43  anchors.margins: 10
44 
45  Flow {
46  anchors.fill: parent
47  spacing: 5
48 
49  move: Transition {
50  NumberAnimation {
51  properties: "x,y"
52  easing.type: Easing.InOutQuad
53  }
54  }
55 
56  Repeater {
57  delegate:
58  ListItem {
59  width: 200
60  height: 100
61  enabled: true
62  Column {
63  anchors.fill: parent
64  spacing: 10
65 
66  QIconItem {
67  id: icon
68  width: 50
69  height: 50
70  anchors.horizontalCenter: parent.horizontalCenter
71  icon: decoration
72  }
73 
74  Text {
75  id: description
76  anchors.left: parent.left
77  anchors.right: parent.right
78  horizontalAlignment: Text.AlignHCenter
79  text: i18n("%1<br/>\n<em>%2</em>", title, subtitle)
80  }
81  }
82 
83  onClicked: goToPage(model.path, decoration)
84  }
85 
86  model: PluginsModel { id: plugins }
87  }
88  }
89 
90  tools: ToolBarLayout {}
91  }
92 
93  ToolBar {
94  id: toolBar
95  z: 10
96  width: parent.width
97  height: 40
98  anchors.top: parent.top
99 
100 
101  Image {
102  anchors {
103  left: parent.left
104  verticalCenter: parent.verticalCenter
105  leftMargin: 5
106  }
107 
108  source: "qrc:/kde-edu-logo.png"
109  height: parent.height
110  fillMode: Image.PreserveAspectFit
111  smooth: true
112 
113  MouseArea {
114  anchors.fill: parent
115  onClicked: Qt.openUrlExternally("http://edu.kde.org")
116  }
117  }
118  }
119 
120  PageStack
121  {
122  id: pageStack
123  width: parent.width
124  anchors {
125  top: toolBar.bottom
126  bottom: parent.bottom
127  }
128 
129  initialPage: init
130 
131  toolBar: toolBar
132  }
133 }
Rectangle
Component
PluginsModel
Definition: pluginsmodel.h:25
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