|
| 1 | +// |
| 2 | +// Copyright (C) 2013-2018 University of Amsterdam |
| 3 | +// |
| 4 | +// This program is free software: you can redistribute it and/or modify |
| 5 | +// it under the terms of the GNU Affero General Public License as |
| 6 | +// published by the Free Software Foundation, either version 3 of the |
| 7 | +// License, or (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 Affero General Public License for more details. |
| 13 | +// |
| 14 | +// You should have received a copy of the GNU Affero General Public |
| 15 | +// License along with this program. If not, see |
| 16 | +// <http://www.gnu.org/licenses/>. |
| 17 | +// |
| 18 | +import QtQuick |
| 19 | +import QtQuick.Layouts |
| 20 | +import JASP.Controls |
| 21 | +import JASP.Widgets |
| 22 | +import JASP |
| 23 | + |
| 24 | +Form |
| 25 | +{ |
| 26 | + |
| 27 | + info: qsTr("This analysis shows you different interface elements of JASP, such as tick marks, text boxes, ... \\ |
| 28 | + Its purpose is pedagogical, and its target audience is that of JASP module developers. \\ |
| 29 | + \\ |
| 30 | + From the technical point of view, the most challenging part of JASP module development is the communication between the QML interface and the R backend. \\ |
| 31 | + Playing with the current JASP analysis while simultaneously inspecting the R code in the files `./inst/qml/Interface.qml` and `./R/examples.R` is a good way to learn how this communication works. \\ |
| 32 | + \\ |
| 33 | + The source code is available at [github.com/jasp-stats/jaspModuleTemplate](https://github.com/jasp-stats/jaspModuleTemplate)") |
| 34 | + |
| 35 | + Text |
| 36 | + { |
| 37 | + text: qsTr("This analysis shows you different interface elements of JASP") |
| 38 | + } |
| 39 | + |
| 40 | + Group |
| 41 | + { |
| 42 | + title: qsTr("Logical controls") |
| 43 | + |
| 44 | + CheckBox |
| 45 | + { |
| 46 | + info: qsTr("This is a tick mark that can be used to control the flow of the analysis") |
| 47 | + |
| 48 | + name: "my_tick_mark" |
| 49 | + label: qsTr("Tick mark") |
| 50 | + |
| 51 | + // We can add some extra control parameters |
| 52 | + checked: false |
| 53 | + } |
| 54 | + } |
| 55 | + |
| 56 | + Group |
| 57 | + { |
| 58 | + title: qsTr("Keyboard inputs") |
| 59 | + |
| 60 | + IntegerField |
| 61 | + { |
| 62 | + info: qsTr("This is the number that will be used in the operation") |
| 63 | + |
| 64 | + name: "my_integer" // This will map to options$my_integer in R |
| 65 | + label: qsTr("Input an integer") // qsTr allows for future translations |
| 66 | + |
| 67 | + // We can add some extra control parameters |
| 68 | + min: 1 |
| 69 | + defaultValue: 10 |
| 70 | + fieldWidth: 50 |
| 71 | + max: 1000 |
| 72 | + } |
| 73 | + } |
| 74 | + |
| 75 | +} |
0 commit comments