Changeset View
Changeset View
Standalone View
Standalone View
src/activities/analog_electricity/Battery.qml
- This file was added.
1 | /* GCompris - Battery.qml | ||||
---|---|---|---|---|---|
2 | * | ||||
3 | * Copyright (C) 2019 Deepak Kumar <deepakdk2431@gmail.com> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or modify | ||||
6 | * it under the terms of the GNU General Public License as published by | ||||
7 | * the Free Software Foundation; either version 3 of the License, or | ||||
8 | * (at your option) any later version. | ||||
9 | * | ||||
10 | * This program is distributed in the hope that it will be useful, | ||||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | * GNU General Public License for more details. | ||||
14 | * | ||||
15 | * You should have received a copy of the GNU General Public License | ||||
16 | * along with this program; if not, see <https://www.gnu.org/licenses/>. | ||||
17 | */ | ||||
18 | import QtQuick 2.6 | ||||
19 | import GCompris 1.0 | ||||
20 | import "analog_electricity.js" as Activity | ||||
21 | | ||||
22 | ElectricalComponent { | ||||
23 | id: digitalLight | ||||
24 | terminalSize: 0.1 | ||||
25 | noOfNodes: 2 | ||||
26 | property var positionY: [1.07, 0.005] | ||||
27 | | ||||
28 | information: qsTr("") | ||||
29 | | ||||
30 | | ||||
31 | property alias nodes: nodes | ||||
32 | | ||||
33 | Repeater { | ||||
34 | id: nodes | ||||
35 | model: 2 | ||||
36 | delegate: node | ||||
37 | Component { | ||||
38 | id: node | ||||
39 | TerminalPoint { | ||||
40 | posX: 0.65 | ||||
41 | posY: positionY[index] | ||||
42 | type: "In" | ||||
43 | } | ||||
44 | } | ||||
45 | } | ||||
46 | | ||||
47 | } |