[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [gcompris/gsoc_pulkit_digital_electricity] src/activities/digital_electricity: digital_electricity,
From: Pulkit Gupta <pulkitnsit () gmail ! com>
Date: 2016-10-09 18:44:55
Message-ID: E1btJ5j-0002FT-OX () code ! kde ! org
[Download RAW message or body]
Git commit 06f3ddc41bb3a652c5583b4ca78a682f0f9fc979 by Pulkit Gupta.
Committed on 09/10/2016 at 18:44.
Pushed by pulkitgupta into branch 'gsoc_pulkit_digital_electricity'.
digital_electricity, add more components and introduce level management. Free play \
mode complete.
M +3 -9 src/activities/digital_electricity/DigitalElectricity.qml
M +6 -11 src/activities/digital_electricity/DragListItem.qml
M +4 -27 src/activities/digital_electricity/ListWidget.qml
M +1 -4 src/activities/digital_electricity/Wire.qml
M +4 -9 src/activities/digital_electricity/components/AndGate.qml
M +12 -15 src/activities/digital_electricity/components/BCDToSevenSegment.qml
A +111 -0 src/activities/digital_electricity/components/BcdCounter.qml \
[License: GPL (v3+)] A +98 -0 \
src/activities/digital_electricity/components/Comparator.qml [License: GPL (v3+)] \
M +7 -43 src/activities/digital_electricity/components/DigitalLight.qml M +0 \
-6 src/activities/digital_electricity/components/ElectricalComponent.qml C +14 \
-19 src/activities/digital_electricity/components/NandGate.qml [from: \
src/activities/digital_electricity/components/AndGate.qml - 072% similarity] C +14 \
-19 src/activities/digital_electricity/components/NorGate.qml [from: \
src/activities/digital_electricity/components/AndGate.qml - 074% similarity] C +14 \
-22 src/activities/digital_electricity/components/NotGate.qml [from: \
src/activities/digital_electricity/components/DigitalLight.qml - 073% similarity] M \
+0 -4 src/activities/digital_electricity/components/One.qml C +14 -20 \
src/activities/digital_electricity/components/OrGate.qml [from: \
src/activities/digital_electricity/components/AndGate.qml - 073% similarity] M +0 \
-4 src/activities/digital_electricity/components/SevenSegment.qml M +0 -8 \
src/activities/digital_electricity/components/SignalGenerator.qml C +14 -21 \
src/activities/digital_electricity/components/Switch.qml [from: \
src/activities/digital_electricity/components/DigitalLight.qml - 074% similarity] M \
+0 -1 src/activities/digital_electricity/components/TerminalPoint.qml C +15 \
-20 src/activities/digital_electricity/components/XorGate.qml [from: \
src/activities/digital_electricity/components/AndGate.qml - 074% similarity] M +0 \
-6 src/activities/digital_electricity/components/Zero.qml M +158 -111 \
src/activities/digital_electricity/digital_electricity.js M +50 -111 \
src/activities/digital_electricity/resource/DigitalLightOff.svg M +133 -99 \
src/activities/digital_electricity/resource/DigitalLightOn.svg A +187 -0 \
src/activities/digital_electricity/resource/bcdCounter.svg M +12 -12 \
src/activities/digital_electricity/resource/switchOff.svg M +31 -31 \
src/activities/digital_electricity/resource/switchOn.svg
http://commits.kde.org/gcompris/06f3ddc41bb3a652c5583b4ca78a682f0f9fc979
diff --git a/src/activities/digital_electricity/DigitalElectricity.qml \
b/src/activities/digital_electricity/DigitalElectricity.qml index cf8e13f..c94825f \
100644
--- a/src/activities/digital_electricity/DigitalElectricity.qml
+++ b/src/activities/digital_electricity/DigitalElectricity.qml
@@ -163,7 +163,6 @@ ActivityBase {
property int cellSize: Math.min(parent.height - infoTxt.height - 10, \
(inputs > 2 ? 0.6 :
0.45) * parent.height) / \
truthTablesModel.rows property int minSize: 2 * cellSize
- //width: truthTable.width
height: cellSize
anchors {
top: infoTxt.bottom
@@ -215,7 +214,6 @@ ActivityBase {
id: truthTable
rows: truthTablesModel.rows
columns: truthTablesModel.columns
- //width: columns * inputOutputTxt.cellSize
height: rows * inputOutputTxt.cellSize
z: 5
visible: inputOutputTxt.visible
@@ -223,10 +221,9 @@ ActivityBase {
top: inputOutputTxt.bottom
horizontalCenter: parent.horizontalCenter
}
- //spacing: 1
Repeater {
id: repeater
- model: truthTablesModel //15//pieces
+ model: truthTablesModel
delegate: blueSquare
Component {
id: blueSquare
@@ -237,7 +234,6 @@ ActivityBase {
height: inputOutputTxt.cellSize
border.color: "black"
border.width: 1
- //radius: 1
color: ((index % truthTable.columns) / \
(truthTablesModel.inputs - 1)) <= 1 ? "#c7ecfb" : "#47ffc2"
GCText {
@@ -328,10 +324,8 @@ ActivityBase {
Bar {
id: bar
- content: BarEnumContent { value: help | home | reload}
- onHelpClicked: {
- displayDialog(dialogHelp)
- }
+ content: BarEnumContent { value: help | home | level | reload}
+ onHelpClicked: {displayDialog(dialogHelp)}
onPreviousLevelClicked: Activity.previousLevel()
onNextLevelClicked: Activity.nextLevel()
onHomeClicked: activity.home()
diff --git a/src/activities/digital_electricity/DragListItem.qml \
b/src/activities/digital_electricity/DragListItem.qml index fc002b3..b6fac8e 100644
--- a/src/activities/digital_electricity/DragListItem.qml
+++ b/src/activities/digital_electricity/DragListItem.qml
@@ -29,13 +29,16 @@ Item {
width: tile.width
height: tile.height
- property string source: imgName
+ property string source: componentSrc
+ property string imageName: imgName
+ property string toolTipTxt: toolTipText
+ property double imageWidth: imgWidth
+ property double imageHeight: imgHeight
property double heightInColumn
property double widthInColumn
property double tileWidth
property double tileHeight
property bool selected: false
- //property double terminalSize: size
signal pressed
@@ -99,11 +102,7 @@ Item {
anchors.fill: parent
onPressed: {
- //item.pressed()
- //tileImage.toSmall()
- //console.log("onPressed 1",tileImage.parent)
tileImage.anchors.centerIn = undefined
- //console.log("onPressed 2",tileImage.parent)
startX = point1.x
startY = point1.y
tileImage.toFull()
@@ -117,19 +116,15 @@ Item {
var moveY = point1.y - startY
parent.x = parent.x + moveX
parent.y = parent.y + moveY
- //console.log("parent.x",parent.x,"parent.y",parent.y)
}
onReleased: {
if (pressedOnce) {
pressedOnce = false
item.selected = false
- //console.log("dropped \
parent.x",parent.x,"parent.y",parent.y)
var coord = \
backgroundContainer.mapFromItem(tileImage.parent, parent.x, parent.y)
- //console.log("coord.x",coord.x,"coord.y",coord.y)
- //console.log("dropped",terminalSize)
if(coord.x > 0 && (backgroundContainer.width - coord.x > \
tileImage.fullWidth))
- Activity.createComponent(coord.x, coord.y, componentSrc)
+ Activity.createComponent(coord.x, coord.y, index)
tileImage.anchors.centerIn = tile
tileImage.toSmall()
toolTip.show("")
diff --git a/src/activities/digital_electricity/ListWidget.qml \
b/src/activities/digital_electricity/ListWidget.qml index 3755505..c64f2be 100644
--- a/src/activities/digital_electricity/ListWidget.qml
+++ b/src/activities/digital_electricity/ListWidget.qml
@@ -81,21 +81,17 @@ Item {
//For setting navigation buttons
function setNextNavigation() {
nextNavigation = 0
- //console.log("setNextNavigation",nextNavigation)
if(currentDisplayedGroup + 1 < nbDisplayedGroup)
nextNavigation = 1
- //console.log("setNextNavigation",nextNavigation)
}
function setPreviousNavigation() {
previousNavigation = 0
if(currentDisplayedGroup > 0)
previousNavigation = 1
- //console.log("setPreviousNavigation",previousNavigation)
}
function refreshLeftWidget() {
- //console.log("refreshLeftWidget")
availablePieces.view.currentDisplayedGroup = \
availablePieces.view.setCurrentDisplayedGroup \
availablePieces.view.setNextNavigation() \
availablePieces.view.setPreviousNavigation() @@ -106,7 +102,6 @@ Item {
width: listWidget.vert ? listWidget.width : listWidget.height
height: listWidget.vert ? listWidget.width : listWidget.height
spacing: 10
- //z: 20
Row {
spacing: view.iconSize * 0.20
@@ -122,7 +117,6 @@ Item {
toolDelete.state = toolDelete.state == "selected" ? \
"notSelected" : "selected" Activity.toolDelete = !Activity.toolDelete
Activity.toolDeleteSticky = false
- //console.log("state",toolDelete.state)
}
onDoubleClicked: {
Activity.toolDeleteSticky = true
@@ -157,7 +151,6 @@ Item {
anchors.fill: parent
onClicked: {
if(!Activity.animationInProgress && parent.state == \
"canBeSelected") {
- //console.log("rotateLeft clicked")
Activity.displayInfo()
}
}
@@ -186,16 +179,13 @@ Item {
Image {
id: rotateLeft
- //source: Activity.url + "rotateLeft.svg"
sourceSize.width: view.iconSize * 0.35
fillMode: Image.PreserveAspectFit
state: "CanNotBeSelected"
MouseArea {
anchors.fill: parent
- //enabled: parent.state == "canBeSelected"
onClicked: {
if(!Activity.animationInProgress && parent.state == \
"canBeSelected") {
- //console.log("rotateLeft clicked")
Activity.rotateLeft()
}
}
@@ -220,16 +210,13 @@ Item {
Image {
id: rotateRight
- //source: Activity.url + "rotateRight.svg"
sourceSize.width: view.iconSize * 0.35
fillMode: Image.PreserveAspectFit
state: "CanNotBeSelected"
MouseArea {
anchors.fill: parent
- //enabled: parent.state == "canBeSelected"
onClicked: {
if(!Activity.animationInProgress && parent.state == \
"canBeSelected") {
- //console.log("rotateRight clicked")
Activity.rotateRight()
}
}
@@ -258,23 +245,13 @@ Item {
id: repeater
property int currentIndex
width: 100
- /*onCurrentIndexChanged: {
- for(var i = 0; i < mymodel.count; i++) {
- if(currentIndex != i)
- repeater.itemAt(i).selected = false
- else
- repeater.itemAt(i).selected = true
- }
- if(currentIndex == -1)
- toolTip.opacity = 0
- }*/
DragListItem {
id: contactsDelegate
z: 1
- heightInColumn: view.iconSize * 0.75//listWidget.vert ? \
view.iconSize * 0.75 : view.iconSize * 0.9
- widthInColumn: view.iconSize * 0.85//listWidget.vert ? view.iconSize \
* 0.9 : view.iconSize * 0.75
- tileWidth: view.iconSize//listWidget.vert ? view.iconSize : \
view.iconSize * 0.85
- tileHeight: view.iconSize * 0.85//listWidget.vert ? view.iconSize * \
0.85 : view.iconSize + heightInColumn: view.iconSize * 0.75
+ widthInColumn: view.iconSize * 0.85
+ tileWidth: view.iconSize
+ tileHeight: view.iconSize * 0.85
visible: view.currentDisplayedGroup * view.nbItemsByGroup <= index \
&&
index <= (view.currentDisplayedGroup+1) * \
view.nbItemsByGroup-1
diff --git a/src/activities/digital_electricity/Wire.qml \
b/src/activities/digital_electricity/Wire.qml index bf0d340..045213c 100644
--- a/src/activities/digital_electricity/Wire.qml
+++ b/src/activities/digital_electricity/Wire.qml
@@ -27,23 +27,20 @@ import GCompris 1.0
Rectangle {
id: wire
- //property string wireColor
property QtObject from
property QtObject to
height: 5
- color: from.value == 0 ? "Red" : "Green" //wireColor
+ color: from.value == 0 ? "Red" : "Green"
radius: height / 2
transformOrigin: Item.Left
MouseArea {
id: mouseArea
- //anchors.fill: parent
width: parent.width
height: parent.height * 3
anchors.centerIn: parent
onPressed: {
- //console.log("Pressed Wire",color,wireColor)
if(Activity.toolDelete) {
Activity.removeWire(wire)
}
diff --git a/src/activities/digital_electricity/components/AndGate.qml \
b/src/activities/digital_electricity/components/AndGate.qml index b88dd01..775b9b3 \
100644
--- a/src/activities/digital_electricity/components/AndGate.qml
+++ b/src/activities/digital_electricity/components/AndGate.qml
@@ -24,10 +24,6 @@ import GCompris 1.0
ElectricalComponent {
id: andGate
- imgWidth: 0.15
- imgHeight: 0.12
- imgSrc: "gateAnd.svg"
- toolTipTxt: qsTr("AND gate")
terminalSize: 0.246
noOfInputs: 2
noOfOutputs: 1
@@ -38,10 +34,10 @@ ElectricalComponent {
"a 2 input AND gate is shown. Truth table for 2 input AND gate \
is:")
truthTable: [['A','B',"A.B"],
- ['0','0','0'],
- ['0','1','0'],
- ['1','0','0'],
- ['1','1','1']]
+ ['0','0','0'],
+ ['0','1','0'],
+ ['1','0','0'],
+ ['1','1','1']]
property alias inputTerminals: inputTerminals
property alias outputTerminals: outputTerminals
@@ -77,7 +73,6 @@ ElectricalComponent {
function updateOutput(wireVisited) {
var terminal = outputTerminals.itemAt(0)
terminal.value = inputTerminals.itemAt(0).value & \
inputTerminals.itemAt(1).value
- //console.log("component",andGate,terminal.value)
for(var i = 0 ; i < terminal.wires.length ; ++i)
terminal.wires[i].to.value = terminal.value
diff --git a/src/activities/digital_electricity/components/BCDToSevenSegment.qml \
b/src/activities/digital_electricity/components/BCDToSevenSegment.qml index \
e282dc0..0bcb8ce 100644
--- a/src/activities/digital_electricity/components/BCDToSevenSegment.qml
+++ b/src/activities/digital_electricity/components/BCDToSevenSegment.qml
@@ -26,15 +26,13 @@ import GCompris 1.0
ElectricalComponent {
id: bcdTo7Segment
- imgWidth: 0.3
- imgHeight: 0.4
- imgSrc: "BCDTo7SegmentDropped.svg"
- toolTipTxt: qsTr("BCD To 7 Segment")
terminalSize: 0.097
noOfInputs: 4
noOfOutputs: 7
+
property variant inputTerminalPosY: [0.057,0.35,0.649,0.935]
property variant outputTerminalPosY: [0.048,0.198,0.353,0.509,0.664,0.812,0.952]
+
property variant blackChar: \
["BCDTo7SegmentA_black.svgz","BCDTo7SegmentB_black.svgz","BCDTo7SegmentC_black.svgz",
\
"BCDTo7SegmentD_black.svgz","BCDTo7SegmentE_black.svgz","BCDTo7SegmentF_black.svgz", \
"BCDTo7SegmentG_black.svgz"] @@ -49,16 +47,16 @@ ElectricalComponent {
"The truth table for BCD To 7 Segment converted is:")
truthTable: [['D','C','B','A','a','b','c','d','e','f','g'],
- ['0','0','0','0','1','1','1','1','1','1','0'],
- ['0','0','0','1','0','1','1','0','0','0','0'],
- ['0','0','1','0','1','1','0','1','1','0','1'],
- ['0','0','1','1','1','1','1','1','0','0','1'],
- ['0','1','0','0','0','1','1','0','0','1','1'],
- ['0','1','0','1','1','0','1','1','0','1','1'],
- ['0','1','1','0','1','0','1','1','1','1','1'],
- ['0','1','1','1','1','1','1','0','0','0','0'],
- ['1','0','0','0','1','1','1','1','1','1','1'],
- ['1','0','0','1','1','1','1','1','0','1','1']]
+ ['0','0','0','0','1','1','1','1','1','1','0'],
+ ['0','0','0','1','0','1','1','0','0','0','0'],
+ ['0','0','1','0','1','1','0','1','1','0','1'],
+ ['0','0','1','1','1','1','1','1','0','0','1'],
+ ['0','1','0','0','0','1','1','0','0','1','1'],
+ ['0','1','0','1','1','0','1','1','0','1','1'],
+ ['0','1','1','0','1','0','1','1','1','1','1'],
+ ['0','1','1','1','1','1','1','0','0','0','0'],
+ ['1','0','0','0','1','1','1','1','1','1','1'],
+ ['1','0','0','1','1','1','1','1','0','1','1']]
property alias inputTerminals: inputTerminals
property alias outputTerminals: outputTerminals
@@ -110,7 +108,6 @@ ElectricalComponent {
}
}
else {
- // truthTable[i][j + noOfInputs] gives value of the outputs (which are \
just after the inputs) for(var j = 0 ; j < noOfOutputs ; ++j) {
var terminal = outputTerminals.itemAt(j)
terminal.value = truthTable[i][j + noOfInputs]
diff --git a/src/activities/digital_electricity/components/BcdCounter.qml \
b/src/activities/digital_electricity/components/BcdCounter.qml new file mode 100644
index 0000000..fb8d961
--- /dev/null
+++ b/src/activities/digital_electricity/components/BcdCounter.qml
@@ -0,0 +1,111 @@
+/* GCompris - BcdCounter.qml
+ *
+ * Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
+ *
+ * Authors:
+ * Bruno Coudoin <bruno.coudoin@gcompris.net> (GTK+ version)
+ * Pulkit Gupta <pulkitnsit@gmail.com> (Qt Quick port)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+import QtQuick 2.3
+import "../digital_electricity.js" as Activity
+
+import GCompris 1.0
+
+ElectricalComponent {
+ id: bcdTo7Segment
+ terminalSize: 0.127
+ noOfInputs: 1
+ noOfOutputs: 4
+ property variant outputTerminalPosY: [0.064, 0.345, 0.645, 0.936]
+ property int count: 0
+ property int previousInp: 0
+
+ information: qsTr("BCD counter takes time period as input, and outputs the bcd \
number which keeps on " + + "incrementing by the specified time \
period") +
+ truthTable: []
+ property variant outputTable: [['0','0','0','0'],
+ ['0','0','0','1'],
+ ['0','0','1','0'],
+ ['0','0','1','1'],
+ ['0','1','0','0'],
+ ['0','1','0','1'],
+ ['0','1','1','0'],
+ ['0','1','1','1'],
+ ['1','0','0','0'],
+ ['1','0','0','1']]
+
+ property alias inputTerminals: inputTerminals
+ property alias outputTerminals: outputTerminals
+
+ Repeater {
+ id: inputTerminals
+ model: 1
+ delegate: inputTerminal
+ Component {
+ id: inputTerminal
+ TerminalPoint {
+ posX: 0.039
+ posY: 0.502
+ type: "In"
+ }
+ }
+ }
+
+ Repeater {
+ id: outputTerminals
+ model: 4
+ delegate: outputTerminal
+ Component {
+ id: outputTerminal
+ TerminalPoint {
+ posX: 0.961
+ posY: outputTerminalPosY[index]
+ type: "Out"
+ }
+ }
+ }
+
+ function updateOutput(wireVisited) {
+
+ for(var i = 0 ; i < noOfOutputs ; ++i) {
+ var terminal = outputTerminals.itemAt(i)
+ terminal.value = outputTable[count][i]
+ for(var j = 0 ; j < terminal.wires.length ; ++j)
+ terminal.wires[j].to.value = terminal.value
+ }
+
+ if(previousInp != inputTerminals.itemAt(0).value) {
+
+ previousInp = inputTerminals.itemAt(0).value
+ count = (count + 1) % 10;
+
+ var componentVisited = []
+ for(var i = 0 ; i < noOfOutputs ; ++i) {
+ var terminal = outputTerminals.itemAt(i)
+ for(var j = 0 ; j < terminal.wires.length ; ++j) {
+ var wire = terminal.wires[j]
+ var component = wire.to.parent
+ if(componentVisited[component] != true && wireVisited[wire] != \
true) { + componentVisited[component] = true
+ wireVisited[wire] = true
+ component.updateOutput(wireVisited)
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/activities/digital_electricity/components/Comparator.qml \
b/src/activities/digital_electricity/components/Comparator.qml new file mode 100644
index 0000000..16375ea
--- /dev/null
+++ b/src/activities/digital_electricity/components/Comparator.qml
@@ -0,0 +1,98 @@
+/* GCompris - Comparator.qml
+ *
+ * Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
+ *
+ * Authors:
+ * Bruno Coudoin <bruno.coudoin@gcompris.net> (GTK+ version)
+ * Pulkit Gupta <pulkitnsit@gmail.com> (Qt Quick port)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+import QtQuick 2.3
+import GCompris 1.0
+
+ElectricalComponent {
+ id: comparator
+ terminalSize: 0.214
+ noOfInputs: 2
+ noOfOutputs: 3
+ property variant inputTerminalPosY: [0.211, 0.784]
+ property variant outputTerminalPosY: [0.128, 0.481, 0.88]
+
+ information: qsTr("Comparator takes 2 numbers as input, A and B. It compares \
them and outputs 3 " + + "values. First value is true if A < B, \
else it is false. Second value is true " + + "if A = B, else it \
is false. Third value is true if A > B, else it is false. " + + \
"In digital electronics, true value is represented as 1, and false value is " + + \
"represented as 0") +
+ truthTable: []
+
+ property alias inputTerminals: inputTerminals
+ property alias outputTerminals: outputTerminals
+
+ Repeater {
+ id: inputTerminals
+ model: 2
+ delegate: inputTerminal
+ Component {
+ id: inputTerminal
+ TerminalPoint {
+ posX: 0.039
+ posY: inputTerminalPosY[index]
+ type: "In"
+ }
+ }
+ }
+
+ Repeater {
+ id: outputTerminals
+ model: 3
+ delegate: outputTerminal
+ Component {
+ id: outputTerminal
+ TerminalPoint {
+ posX: 0.961
+ posY: outputTerminalPosY[index]
+ type: "Out"
+ }
+ }
+ }
+
+ function updateOutput(wireVisited) {
+
+ outputTerminals.itemAt(0).value = (inputTerminals.itemAt(0).value < \
inputTerminals.itemAt(1).value) + outputTerminals.itemAt(1).value = \
(inputTerminals.itemAt(0).value == inputTerminals.itemAt(1).value) + \
outputTerminals.itemAt(2).value = (inputTerminals.itemAt(0).value > \
inputTerminals.itemAt(1).value) +
+ for(var i = 0 ; i < noOfOutputs ; ++i) {
+ var terminal = outputTerminals.itemAt(i)
+ for(var j = 0 ; j < terminal.wires.length ; ++j)
+ terminal.wires[j].to.value = terminal.value
+ }
+
+ var componentVisited = []
+ for(var i = 0 ; i < noOfOutputs ; ++i) {
+ var terminal = outputTerminals.itemAt(i)
+ for(var j = 0 ; j < terminal.wires.length ; ++j) {
+ var wire = terminal.wires[j]
+ var component = wire.to.parent
+ if(componentVisited[component] != true && wireVisited[wire] != true) \
{ + componentVisited[component] = true
+ wireVisited[wire] = true
+ component.updateOutput(wireVisited)
+ }
+ }
+ }
+ }
+}
diff --git a/src/activities/digital_electricity/components/DigitalLight.qml \
b/src/activities/digital_electricity/components/DigitalLight.qml index \
f8c444c..e4e9854 100644
--- a/src/activities/digital_electricity/components/DigitalLight.qml
+++ b/src/activities/digital_electricity/components/DigitalLight.qml
@@ -24,22 +24,16 @@ import GCompris 1.0
ElectricalComponent {
id: digitalLight
- imgWidth: 0.2
- imgHeight: 0.18
- imgSrc: "DigitalLightOff.svg"
- toolTipTxt: qsTr("Digital Light")
- terminalSize: 0.358
+ terminalSize: 0.219
noOfInputs: 1
- noOfOutputs: 1
+ noOfOutputs: 0
- information: qsTr("Digital light is used to check the output of other digital \
components. It forwards " +
- "its input to its output. If the input is 1, then the digital \
light will glow, else " +
- "it will turn off.")
+ information: qsTr("Digital light is used to check the output of other digital \
components. It turns " + + "green if the input is 1, and turns \
red if the input is 0.")
truthTable: []
property alias inputTerminals: inputTerminals
- property alias outputTerminals: outputTerminals
Repeater {
id: inputTerminals
@@ -48,48 +42,18 @@ ElectricalComponent {
Component {
id: inputTerminal
TerminalPoint {
- posX: 0.066
- posY: 0.497
+ posX: 0.068
+ posY: 0.495
type: "In"
}
}
}
- Repeater {
- id: outputTerminals
- model: 1
- delegate: outputTerminal
- Component {
- id: outputTerminal
- TerminalPoint {
- posX: 0.934
- posY: 0.497
- type: "Out"
- }
- }
- }
-
function updateOutput(wireVisited) {
- var terminal = outputTerminals.itemAt(0)
- terminal.value = inputTerminals.itemAt(0).value == 1 ? 1 : 0
- if(terminal.value == 1)
+ if(inputTerminals.itemAt(0).value == 1)
imgSrc = "DigitalLightOn.svg"
else
imgSrc = "DigitalLightOff.svg"
-
- for(var i = 0 ; i < terminal.wires.length ; ++i)
- terminal.wires[i].to.value = terminal.value
-
- var componentVisited = []
- for(var i = 0 ; i < terminal.wires.length ; ++i) {
- var wire = terminal.wires[i]
- var component = wire.to.parent
- if(componentVisited[component] != true && wireVisited[wire] != true) {
- componentVisited[component] = true
- wireVisited[wire] = true
- component.updateOutput(wireVisited)
- }
- }
}
}
diff --git a/src/activities/digital_electricity/components/ElectricalComponent.qml \
b/src/activities/digital_electricity/components/ElectricalComponent.qml index \
ad9cee3..e220590 100644
--- a/src/activities/digital_electricity/components/ElectricalComponent.qml
+++ b/src/activities/digital_electricity/components/ElectricalComponent.qml
@@ -69,7 +69,6 @@ Image {
onStarted:{Activity.animationInProgress = true}
onStopped: {
initialAngle = initialAngle + rotationAngle
- //console.log("initialAngle",initialAngle)
Activity.updateWires(index)
if(initialAngle == startingAngle + rotationAngle * 45) {
if(initialAngle == 360 || initialAngle == -360)
@@ -84,7 +83,6 @@ Image {
}
function updateDragConstraints() {
- //console.log("initialAngle",initialAngle)
if(initialAngle == 0 || initialAngle == 180 || initialAngle == 360 || \
initialAngle == -360 || initialAngle == -180) {
mouseArea.drag.minimumX = (electricalComponent.paintedWidth - \
electricalComponent.width)/2 @@ -104,23 +102,19 @@ Image {
mouseArea.drag.maximumY = electricalComponent.parent.height -
(electricalComponent.height + \
electricalComponent.paintedWidth)/2 }
- //console.log("mouseArea",mouseArea.drag.minimumX,mouseArea.drag.minimumY)
}
MouseArea {
id: mouseArea
- //anchors.fill: parent
width: parent.paintedWidth
height: parent.paintedHeight
anchors.centerIn: parent
drag.target: electricalComponent
onPressed: {
- //console.log("Component index",index)
Activity.updateToolTip(toolTipTxt)
Activity.componentSelected(index)
}
onClicked: {
- console.log("Component index",index,electricalComponent)
if(Activity.toolDelete || Activity.toolDeleteSticky) {
Activity.removeComponent(index)
}
diff --git a/src/activities/digital_electricity/components/AndGate.qml \
b/src/activities/digital_electricity/components/NandGate.qml similarity index 72%
copy from src/activities/digital_electricity/components/AndGate.qml
copy to src/activities/digital_electricity/components/NandGate.qml
index b88dd01..1bb747e 100644
--- a/src/activities/digital_electricity/components/AndGate.qml
+++ b/src/activities/digital_electricity/components/NandGate.qml
@@ -1,4 +1,4 @@
-/* GCompris - AndGate.qml
+/* GCompris - NandGate.qml
*
* Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
*
@@ -23,25 +23,21 @@ import QtQuick 2.3
import GCompris 1.0
ElectricalComponent {
- id: andGate
- imgWidth: 0.15
- imgHeight: 0.12
- imgSrc: "gateAnd.svg"
- toolTipTxt: qsTr("AND gate")
- terminalSize: 0.246
+ id: nandGate
+ terminalSize: 0.273
noOfInputs: 2
noOfOutputs: 1
- property variant inputTerminalPosY: [0.219, 0.773]
+ property variant inputTerminalPosY: [0.174, 0.786]
- information: qsTr("AND gate takes 2 or more binary input in its input terminals \
and outputs a single " +
- "value. The output is 0 if any of the input is 0, else it is \
1. In this activity, " +
- "a 2 input AND gate is shown. Truth table for 2 input AND gate \
is:") + information: qsTr("NAND gate takes 2 or more binary input in its input \
terminals and outputs a single " + + "value. It is the \
complement of AND gate. In this activity, a 2 input NAND gate is " + + \
"shown. Truth table for 2 input NAND gate is:")
- truthTable: [['A','B',"A.B"],
- ['0','0','0'],
- ['0','1','0'],
- ['1','0','0'],
- ['1','1','1']]
+ truthTable: [['A','B',"~(A.B)"],
+ ['0','0','1'],
+ ['0','1','1'],
+ ['1','0','1'],
+ ['1','1','0']]
property alias inputTerminals: inputTerminals
property alias outputTerminals: outputTerminals
@@ -68,7 +64,7 @@ ElectricalComponent {
id: outputTerminal
TerminalPoint {
posX: 0.955
- posY: 0.5
+ posY: 0.484
type: "Out"
}
}
@@ -76,8 +72,7 @@ ElectricalComponent {
function updateOutput(wireVisited) {
var terminal = outputTerminals.itemAt(0)
- terminal.value = inputTerminals.itemAt(0).value & \
inputTerminals.itemAt(1).value
- //console.log("component",andGate,terminal.value)
+ terminal.value = !(inputTerminals.itemAt(0).value & \
inputTerminals.itemAt(1).value) for(var i = 0 ; i < terminal.wires.length ; ++i)
terminal.wires[i].to.value = terminal.value
diff --git a/src/activities/digital_electricity/components/AndGate.qml \
b/src/activities/digital_electricity/components/NorGate.qml similarity index 74%
copy from src/activities/digital_electricity/components/AndGate.qml
copy to src/activities/digital_electricity/components/NorGate.qml
index b88dd01..86347af 100644
--- a/src/activities/digital_electricity/components/AndGate.qml
+++ b/src/activities/digital_electricity/components/NorGate.qml
@@ -1,4 +1,4 @@
-/* GCompris - AndGate.qml
+/* GCompris - NorGate.qml
*
* Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
*
@@ -23,25 +23,21 @@ import QtQuick 2.3
import GCompris 1.0
ElectricalComponent {
- id: andGate
- imgWidth: 0.15
- imgHeight: 0.12
- imgSrc: "gateAnd.svg"
- toolTipTxt: qsTr("AND gate")
- terminalSize: 0.246
+ id: norGate
+ terminalSize: 0.251
noOfInputs: 2
noOfOutputs: 1
- property variant inputTerminalPosY: [0.219, 0.773]
+ property variant inputTerminalPosY: [0.205, 0.769]
- information: qsTr("AND gate takes 2 or more binary input in its input terminals \
and outputs a single " +
- "value. The output is 0 if any of the input is 0, else it is \
1. In this activity, " +
- "a 2 input AND gate is shown. Truth table for 2 input AND gate \
is:") + information: qsTr("NOR gate takes 2 or more binary input in its input \
terminals and outputs a single " + + "value. It is the \
complement of OR gate. In this activity, a 2 input NOR gate is " + + \
"shown. Truth table for 2 input NOR gate is:")
- truthTable: [['A','B',"A.B"],
- ['0','0','0'],
- ['0','1','0'],
- ['1','0','0'],
- ['1','1','1']]
+ truthTable: [['A','B',"~(A+B)"],
+ ['0','0','1'],
+ ['0','1','0'],
+ ['1','0','0'],
+ ['1','1','0']]
property alias inputTerminals: inputTerminals
property alias outputTerminals: outputTerminals
@@ -68,7 +64,7 @@ ElectricalComponent {
id: outputTerminal
TerminalPoint {
posX: 0.955
- posY: 0.5
+ posY: 0.491
type: "Out"
}
}
@@ -76,8 +72,7 @@ ElectricalComponent {
function updateOutput(wireVisited) {
var terminal = outputTerminals.itemAt(0)
- terminal.value = inputTerminals.itemAt(0).value & \
inputTerminals.itemAt(1).value
- //console.log("component",andGate,terminal.value)
+ terminal.value = !(inputTerminals.itemAt(0).value | \
inputTerminals.itemAt(1).value) for(var i = 0 ; i < terminal.wires.length ; ++i)
terminal.wires[i].to.value = terminal.value
diff --git a/src/activities/digital_electricity/components/DigitalLight.qml \
b/src/activities/digital_electricity/components/NotGate.qml similarity index 73%
copy from src/activities/digital_electricity/components/DigitalLight.qml
copy to src/activities/digital_electricity/components/NotGate.qml
index f8c444c..9a8dcb5 100644
--- a/src/activities/digital_electricity/components/DigitalLight.qml
+++ b/src/activities/digital_electricity/components/NotGate.qml
@@ -1,4 +1,4 @@
-/* GCompris - DigitalLight.qml
+/* GCompris - NotGate.qml
*
* Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
*
@@ -23,20 +23,18 @@ import QtQuick 2.3
import GCompris 1.0
ElectricalComponent {
- id: digitalLight
- imgWidth: 0.2
- imgHeight: 0.18
- imgSrc: "DigitalLightOff.svg"
- toolTipTxt: qsTr("Digital Light")
- terminalSize: 0.358
+ id: notGate
+ terminalSize: 0.261
noOfInputs: 1
noOfOutputs: 1
- information: qsTr("Digital light is used to check the output of other digital \
components. It forwards " +
- "its input to its output. If the input is 1, then the digital \
light will glow, else " +
- "it will turn off.")
+ information: qsTr("Not gate (also known as inverter) takes a binary input in its \
input terminal and " + + "outputs a single value. The output is \
the complement of the input value, that is, it " + + "is 0 if \
input is 1, and 1 if input is 0. Truth table for NOT gate is:")
- truthTable: []
+ truthTable: [['A',"~A"],
+ ['0','1'],
+ ['1','0']]
property alias inputTerminals: inputTerminals
property alias outputTerminals: outputTerminals
@@ -48,8 +46,8 @@ ElectricalComponent {
Component {
id: inputTerminal
TerminalPoint {
- posX: 0.066
- posY: 0.497
+ posX: 0.046
+ posY: 0.503
type: "In"
}
}
@@ -62,22 +60,16 @@ ElectricalComponent {
Component {
id: outputTerminal
TerminalPoint {
- posX: 0.934
- posY: 0.497
+ posX: 0.954
+ posY: 0.492
type: "Out"
}
}
}
function updateOutput(wireVisited) {
-
var terminal = outputTerminals.itemAt(0)
- terminal.value = inputTerminals.itemAt(0).value == 1 ? 1 : 0
- if(terminal.value == 1)
- imgSrc = "DigitalLightOn.svg"
- else
- imgSrc = "DigitalLightOff.svg"
-
+ terminal.value = !inputTerminals.itemAt(0).value
for(var i = 0 ; i < terminal.wires.length ; ++i)
terminal.wires[i].to.value = terminal.value
diff --git a/src/activities/digital_electricity/components/One.qml \
b/src/activities/digital_electricity/components/One.qml index 57317b0..259d3f5 100644
--- a/src/activities/digital_electricity/components/One.qml
+++ b/src/activities/digital_electricity/components/One.qml
@@ -24,10 +24,6 @@ import GCompris 1.0
ElectricalComponent {
id: one
- imgWidth: 0.12
- imgHeight: 0.2
- imgSrc: "one.svg"
- toolTipTxt: qsTr("One input")
terminalSize: 0.218
noOfInputs: 0
noOfOutputs: 1
diff --git a/src/activities/digital_electricity/components/AndGate.qml \
b/src/activities/digital_electricity/components/OrGate.qml similarity index 73%
copy from src/activities/digital_electricity/components/AndGate.qml
copy to src/activities/digital_electricity/components/OrGate.qml
index b88dd01..4fabb2b 100644
--- a/src/activities/digital_electricity/components/AndGate.qml
+++ b/src/activities/digital_electricity/components/OrGate.qml
@@ -1,4 +1,4 @@
-/* GCompris - AndGate.qml
+/* GCompris - OrGate.qml
*
* Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
*
@@ -23,25 +23,20 @@ import QtQuick 2.3
import GCompris 1.0
ElectricalComponent {
- id: andGate
- imgWidth: 0.15
- imgHeight: 0.12
- imgSrc: "gateAnd.svg"
- toolTipTxt: qsTr("AND gate")
- terminalSize: 0.246
+ id: orGate
+ terminalSize: 0.251
noOfInputs: 2
noOfOutputs: 1
- property variant inputTerminalPosY: [0.219, 0.773]
+ property variant inputTerminalPosY: [0.223, 0.786]
- information: qsTr("AND gate takes 2 or more binary input in its input terminals \
and outputs a single " +
- "value. The output is 0 if any of the input is 0, else it is \
1. In this activity, " +
- "a 2 input AND gate is shown. Truth table for 2 input AND gate \
is:")
-
- truthTable: [['A','B',"A.B"],
- ['0','0','0'],
- ['0','1','0'],
- ['1','0','0'],
- ['1','1','1']]
+ information: qsTr("OR gate takes 2 or more binary input in its input terminals \
and outputs a single " + + "value. The output is 1 if any of the \
input is 1, else it is 0. In this activity, a " + + "2 input OR \
gate is shown. Truth table for 2 input OR gate is:") + truthTable: \
[['A','B',"A+B"], + ['0','0','0'],
+ ['0','1','1'],
+ ['1','0','1'],
+ ['1','1','1']]
property alias inputTerminals: inputTerminals
property alias outputTerminals: outputTerminals
@@ -68,7 +63,7 @@ ElectricalComponent {
id: outputTerminal
TerminalPoint {
posX: 0.955
- posY: 0.5
+ posY: 0.509
type: "Out"
}
}
@@ -76,8 +71,7 @@ ElectricalComponent {
function updateOutput(wireVisited) {
var terminal = outputTerminals.itemAt(0)
- terminal.value = inputTerminals.itemAt(0).value & \
inputTerminals.itemAt(1).value
- //console.log("component",andGate,terminal.value)
+ terminal.value = inputTerminals.itemAt(0).value | \
inputTerminals.itemAt(1).value for(var i = 0 ; i < terminal.wires.length ; ++i)
terminal.wires[i].to.value = terminal.value
diff --git a/src/activities/digital_electricity/components/SevenSegment.qml \
b/src/activities/digital_electricity/components/SevenSegment.qml index \
1c5ead5..3017b87 100644
--- a/src/activities/digital_electricity/components/SevenSegment.qml
+++ b/src/activities/digital_electricity/components/SevenSegment.qml
@@ -26,10 +26,6 @@ import GCompris 1.0
ElectricalComponent {
id: sevenSegmentDisplay
- imgWidth: 0.18
- imgHeight: 0.4
- imgSrc: "sevenSegmentDisplay.svgz"
- toolTipTxt: qsTr("7 Segment Display")
terminalSize: 0.116
noOfInputs: 7
noOfOutputs: 0
diff --git a/src/activities/digital_electricity/components/SignalGenerator.qml \
b/src/activities/digital_electricity/components/SignalGenerator.qml index \
78c7d87..0b71180 100644
--- a/src/activities/digital_electricity/components/SignalGenerator.qml
+++ b/src/activities/digital_electricity/components/SignalGenerator.qml
@@ -26,10 +26,6 @@ import "../../../core"
ElectricalComponent {
id: signalGenerator
- imgWidth: 0.25
- imgHeight: 0.18
- imgSrc: "signalGenerator.svg"
- toolTipTxt: qsTr("Signal Generator")
terminalSize: 0.24
noOfInputs: 0
noOfOutputs: 1
@@ -105,7 +101,6 @@ ElectricalComponent {
anchors.centerIn: parent
enabled: signalGenerator.period != 2
onPressed: {
- //console.log("Up pressed")
signalGenerator.period *= 2
periodIndex++
timer.restart()
@@ -131,7 +126,6 @@ ElectricalComponent {
anchors.centerIn: parent
enabled: signalGenerator.period != 0.25
onPressed: {
- //console.log("Down pressed")
signalGenerator.period /= 2
periodIndex--
timer.restart()
@@ -142,7 +136,6 @@ ElectricalComponent {
}
Image {
- //id: valueContainer
source: Activity.url + "valueContainer.svg"
sourceSize.height: 0.818 * parent.height
sourceSize.width: 0.557 * parent.width
@@ -156,7 +149,6 @@ ElectricalComponent {
fontSizeMode: Text.Fit
minimumPointSize: 6
font.pointSize: 40
- //font.pixelSize: 40
color: "white"
style: Text.Outline
styleColor: "black"
diff --git a/src/activities/digital_electricity/components/DigitalLight.qml \
b/src/activities/digital_electricity/components/Switch.qml similarity index 74%
copy from src/activities/digital_electricity/components/DigitalLight.qml
copy to src/activities/digital_electricity/components/Switch.qml
index f8c444c..6454bf2 100644
--- a/src/activities/digital_electricity/components/DigitalLight.qml
+++ b/src/activities/digital_electricity/components/Switch.qml
@@ -1,4 +1,4 @@
-/* GCompris - DigitalLight.qml
+/* GCompris - Switch.qml
*
* Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
*
@@ -20,21 +20,20 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.3
+import "../digital_electricity.js" as Activity
+
import GCompris 1.0
ElectricalComponent {
- id: digitalLight
- imgWidth: 0.2
- imgHeight: 0.18
- imgSrc: "DigitalLightOff.svg"
- toolTipTxt: qsTr("Digital Light")
- terminalSize: 0.358
+ id: switchComponent
+ terminalSize: 0.275
noOfInputs: 1
noOfOutputs: 1
- information: qsTr("Digital light is used to check the output of other digital \
components. It forwards " +
- "its input to its output. If the input is 1, then the digital \
light will glow, else " +
- "it will turn off.")
+ information: qsTr("Switch is used to maintain easy connection between two \
terminals. If the switch is " + + "turned on, then the two \
terminals are connected and current can flow through the " + + \
"switch. If the switch is turned off, then the connection between terminal is broken, \
" + + "and current can not flow through it.")
truthTable: []
@@ -48,8 +47,8 @@ ElectricalComponent {
Component {
id: inputTerminal
TerminalPoint {
- posX: 0.066
- posY: 0.497
+ posX: 0.037
+ posY: 0.499
type: "In"
}
}
@@ -62,22 +61,16 @@ ElectricalComponent {
Component {
id: outputTerminal
TerminalPoint {
- posX: 0.934
- posY: 0.497
+ posX: 0.963
+ posY: 0.499
type: "Out"
}
}
}
function updateOutput(wireVisited) {
-
var terminal = outputTerminals.itemAt(0)
- terminal.value = inputTerminals.itemAt(0).value == 1 ? 1 : 0
- if(terminal.value == 1)
- imgSrc = "DigitalLightOn.svg"
- else
- imgSrc = "DigitalLightOff.svg"
-
+ terminal.value = imgSrc == "switchOn.svg" ? inputTerminals.itemAt(0).value : \
0 for(var i = 0 ; i < terminal.wires.length ; ++i)
terminal.wires[i].to.value = terminal.value
diff --git a/src/activities/digital_electricity/components/TerminalPoint.qml \
b/src/activities/digital_electricity/components/TerminalPoint.qml index \
2c7ce0f..3c5c623 100644
--- a/src/activities/digital_electricity/components/TerminalPoint.qml
+++ b/src/activities/digital_electricity/components/TerminalPoint.qml
@@ -64,7 +64,6 @@ Rectangle {
anchors.fill: parent
onPressed: {
selected = true
- console.log("Pressed Terminal",type,value)
Activity.terminalPointSelected(terminalPoint)
}
}
diff --git a/src/activities/digital_electricity/components/AndGate.qml \
b/src/activities/digital_electricity/components/XorGate.qml similarity index 74%
copy from src/activities/digital_electricity/components/AndGate.qml
copy to src/activities/digital_electricity/components/XorGate.qml
index b88dd01..31da5a5 100644
--- a/src/activities/digital_electricity/components/AndGate.qml
+++ b/src/activities/digital_electricity/components/XorGate.qml
@@ -1,4 +1,4 @@
-/* GCompris - AndGate.qml
+/* GCompris - XorGate.qml
*
* Copyright (C) 2016 Pulkit Gupta <pulkitnsit@gmail.com>
*
@@ -23,25 +23,21 @@ import QtQuick 2.3
import GCompris 1.0
ElectricalComponent {
- id: andGate
- imgWidth: 0.15
- imgHeight: 0.12
- imgSrc: "gateAnd.svg"
- toolTipTxt: qsTr("AND gate")
- terminalSize: 0.246
+ id: xorGate
+ terminalSize: 0.229
noOfInputs: 2
noOfOutputs: 1
- property variant inputTerminalPosY: [0.219, 0.773]
+ property variant inputTerminalPosY: [0.248, 0.762]
- information: qsTr("AND gate takes 2 or more binary input in its input terminals \
and outputs a single " +
- "value. The output is 0 if any of the input is 0, else it is \
1. In this activity, " +
- "a 2 input AND gate is shown. Truth table for 2 input AND gate \
is:")
-
- truthTable: [['A','B',"A.B"],
- ['0','0','0'],
- ['0','1','0'],
- ['1','0','0'],
- ['1','1','1']]
+ information: qsTr("XOR gate takes 2 or more binary input in its input terminals \
and outputs a single " + + "value. The output is 1 if number of \
'1' in input is odd, and 0 if number of '1' in " + + "input is \
even. In this activity, a 2 input XOR gate is shown. Truth table for " + + \
"2 input XOR gate is:") + truthTable: [['A','B',"A^B"],
+ ['0','0','0'],
+ ['0','1','1'],
+ ['1','0','1'],
+ ['1','1','0']]
property alias inputTerminals: inputTerminals
property alias outputTerminals: outputTerminals
@@ -68,7 +64,7 @@ ElectricalComponent {
id: outputTerminal
TerminalPoint {
posX: 0.955
- posY: 0.5
+ posY: 0.509
type: "Out"
}
}
@@ -76,8 +72,7 @@ ElectricalComponent {
function updateOutput(wireVisited) {
var terminal = outputTerminals.itemAt(0)
- terminal.value = inputTerminals.itemAt(0).value & \
inputTerminals.itemAt(1).value
- //console.log("component",andGate,terminal.value)
+ terminal.value = inputTerminals.itemAt(0).value ^ \
inputTerminals.itemAt(1).value for(var i = 0 ; i < terminal.wires.length ; ++i)
terminal.wires[i].to.value = terminal.value
diff --git a/src/activities/digital_electricity/components/Zero.qml \
b/src/activities/digital_electricity/components/Zero.qml index 33125ee..45beeec \
100644
--- a/src/activities/digital_electricity/components/Zero.qml
+++ b/src/activities/digital_electricity/components/Zero.qml
@@ -20,16 +20,10 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
import QtQuick 2.3
-//import "digital_electricity.js" as Activity
-
import GCompris 1.0
ElectricalComponent {
id: zero
- imgWidth: 0.12
- imgHeight: 0.2
- imgSrc: "zero.svg"
- toolTipTxt: qsTr("Zero input")
terminalSize: 0.205
noOfInputs: 0
noOfOutputs: 1
diff --git a/src/activities/digital_electricity/digital_electricity.js \
b/src/activities/digital_electricity/digital_electricity.js index f3f661f..95ff893 \
100644
--- a/src/activities/digital_electricity/digital_electricity.js
+++ b/src/activities/digital_electricity/digital_electricity.js
@@ -22,7 +22,7 @@
.pragma library
.import QtQuick 2.3 as Quick
-var currentLevel = 0
+var currentLevel = 1
var numberOfLevel = 4
var items
var url = "qrc:/gcompris/src/activities/digital_electricity/resource/"
@@ -34,79 +34,143 @@ var selectedTerminal
var deletedIndex = []
var components = []
var connected = []
-//var colors = ["red","green","blue","blueviolet","silver"]
function start(items_) {
items = items_
- currentLevel = 0
+ currentLevel = 1
+ initLevel()
+}
+
+function stop() {
+
+ for(var i = 0 ; i < components.length ; ++i) {
+ var j
+ for(j = 0 ; j < deletedIndex.length ; ++j) {
+ if(deletedIndex[j] == i)
+ break
+ }
+ if(j == deletedIndex.length)
+ removeComponent(i)
+ }
+}
+
+function initLevel() {
+
+ items.bar.level = currentLevel
+ var sizeMultiplier = 1 + (1 / (1.5 * currentLevel))
items.availablePieces.model.append( {
"imgName": "zero.svg",
"componentSrc": "Zero.qml",
- "imgWidth": 0.12,
- "imgHeight": 0.2,
+ "imgWidth": sizeMultiplier * 0.12,
+ "imgHeight": sizeMultiplier * 0.2,
"toolTipText": qsTr("Zero input")
})
items.availablePieces.model.append( {
"imgName": "one.svg",
"componentSrc": "One.qml",
- "imgWidth": 0.12,
- "imgHeight": 0.2,
+ "imgWidth": sizeMultiplier * 0.12,
+ "imgHeight": sizeMultiplier * 0.2,
"toolTipText": qsTr("One input")
})
items.availablePieces.model.append( {
- "imgName": "gateAnd.svg",
- "componentSrc": "AndGate.qml",
- "imgWidth": 0.15,
- "imgHeight": 0.12,
- "toolTipText": qsTr("AND gate")
- })
- items.availablePieces.model.append( {
- "imgName": "BCDTo7Segment.svg",
- "componentSrc": "BCDToSevenSegment.qml",
- "imgWidth": 0.3,
- "imgHeight": 0.4,
- "toolTipText": qsTr("BCD To 7 Segment")
- })
- items.availablePieces.model.append( {
- "imgName": "sevenSegmentDisplay.svgz",
- "componentSrc": "SevenSegment.qml",
- "imgWidth": 0.18,
- "imgHeight": 0.4,
- "toolTipText": qsTr("7 Segment Display")
- })
- items.availablePieces.model.append( {
"imgName": "DigitalLightOff.svg",
"componentSrc": "DigitalLight.qml",
- "imgWidth": 0.2,
- "imgHeight": 0.18,
+ "imgWidth": sizeMultiplier * 0.12,
+ "imgHeight": sizeMultiplier * 0.12,
"toolTipText": qsTr("Digital Light")
})
items.availablePieces.model.append( {
- "imgName": "signalGenerator.svg",
- "componentSrc": "SignalGenerator.qml",
- "imgWidth": 0.25,
- "imgHeight": 0.18,
- "toolTipText": qsTr("Signal Generator")
+ "imgName": "gateAnd.svg",
+ "componentSrc": "AndGate.qml",
+ "imgWidth": sizeMultiplier * 0.15,
+ "imgHeight": sizeMultiplier * 0.12,
+ "toolTipText": qsTr("AND gate")
})
- initLevel()
-}
-
-function stop() {
-
- for(var i = 0 ; i < components.length ; ++i) {
- var j
- for(j = 0 ; j < deletedIndex.length ; ++j) {
- if(deletedIndex[j] == i)
- break
- }
- if(j == deletedIndex.length)
- removeComponent(i)
+ if(currentLevel > 1) {
+ items.availablePieces.model.append( {
+ "imgName": "gateNand.svg",
+ "componentSrc": "NandGate.qml",
+ "imgWidth": sizeMultiplier * 0.15,
+ "imgHeight": sizeMultiplier * 0.12,
+ "toolTipText": qsTr("NAND gate")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "gateNor.svg",
+ "componentSrc": "NorGate.qml",
+ "imgWidth": sizeMultiplier * 0.15,
+ "imgHeight": sizeMultiplier * 0.12,
+ "toolTipText": qsTr("NOR gate")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "gateNot.svg",
+ "componentSrc": "NotGate.qml",
+ "imgWidth": sizeMultiplier * 0.15,
+ "imgHeight": sizeMultiplier * 0.12,
+ "toolTipText": qsTr("NOT gate")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "gateOr.svg",
+ "componentSrc": "OrGate.qml",
+ "imgWidth": sizeMultiplier * 0.15,
+ "imgHeight": sizeMultiplier * 0.12,
+ "toolTipText": qsTr("OR gate")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "gateXor.svg",
+ "componentSrc": "XorGate.qml",
+ "imgWidth": sizeMultiplier * 0.15,
+ "imgHeight": sizeMultiplier * 0.12,
+ "toolTipText": qsTr("XOR gate")
+ })
+ }
+ if(currentLevel > 2) {
+ items.availablePieces.model.append( {
+ "imgName": "comparator.svg",
+ "componentSrc": "Comparator.qml",
+ "imgWidth": sizeMultiplier * 0.3,
+ "imgHeight": sizeMultiplier * 0.25,
+ "toolTipText": qsTr("Comparator")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "BCDTo7Segment.svg",
+ "componentSrc": "BCDToSevenSegment.qml",
+ "imgWidth": sizeMultiplier * 0.3,
+ "imgHeight": sizeMultiplier * 0.4,
+ "toolTipText": qsTr("BCD To 7 Segment")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "sevenSegmentDisplay.svgz",
+ "componentSrc": "SevenSegment.qml",
+ "imgWidth": sizeMultiplier * 0.18,
+ "imgHeight": sizeMultiplier * 0.4,
+ "toolTipText": qsTr("7 Segment Display")
+ })
+ }
+ if(currentLevel > 3) {
+ items.availablePieces.model.append( {
+ "imgName": "switchOff.svg",
+ "componentSrc": "Switch.qml",
+ "imgWidth": sizeMultiplier * 0.18,
+ "imgHeight": sizeMultiplier * 0.15,
+ "toolTipText": qsTr("Switch")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "signalGenerator.svg",
+ "componentSrc": "SignalGenerator.qml",
+ "imgWidth": sizeMultiplier * 0.25,
+ "imgHeight": sizeMultiplier * 0.18,
+ "toolTipText": qsTr("Signal Generator")
+ })
+ items.availablePieces.model.append( {
+ "imgName": "bcdCounter.svg",
+ "componentSrc": "BcdCounter.qml",
+ "imgWidth": sizeMultiplier * 0.3,
+ "imgHeight": sizeMultiplier * 0.4,
+ "toolTipText": qsTr("BCD Counter")
+ })
}
-}
-
-function initLevel() {
items.availablePieces.view.currentDisplayedGroup = 0
items.availablePieces.view.previousNavigation = 1
@@ -121,18 +185,36 @@ function initLevel() {
updateToolTip("")
}
+function nextLevel() {
+
+ if(numberOfLevel < ++currentLevel ) {
+ currentLevel = 1
+ }
+ reset();
+}
+
+function previousLevel() {
+
+ if(--currentLevel < 1) {
+ currentLevel = numberOfLevel
+ }
+ reset();
+}
+
function reset() {
deselect()
stop()
+ items.availablePieces.model.clear()
initLevel()
}
-function createComponent(x, y, src) {
+// Creates component from ListWidget to the drawing board area
+function createComponent(x, y, componentIndex) {
x = x / items.backgroundContainer.width
y = y / items.backgroundContainer.height
- //console.log("x",x,"y",y)
+
var index
if(deletedIndex.length > 0) {
index = deletedIndex[deletedIndex.length - 1]
@@ -141,38 +223,33 @@ function createComponent(x, y, src) {
else
index = components.length
- /*var electricComponent
- var componentLocation = \
"qrc:/gcompris/src/activities/digital_electricity/components/"
- if(src == "one.svg")
- electricComponent = Qt.createComponent(componentLocation + "One.qml")
- else if(src == "zero.svg")
- electricComponent = Qt.createComponent(componentLocation + "Zero.qml")
- else if(src == "gateAnd.svg")
- electricComponent = Qt.createComponent(componentLocation + "AndGate.qml")
- else if(src == "BCDTo7Segment.svg")
- electricComponent = Qt.createComponent(componentLocation + \
"BCDToSevenSegment.qml")
- else if(src == "sevenSegmentDisplay.svgz")
- electricComponent = Qt.createComponent(componentLocation + \
"SevenSegment.qml")
- else if(src == "DigitalLightOff.svg")
- electricComponent = Qt.createComponent(componentLocation + \
"DigitalLight.qml")
- else if(src == "signalGenerator.svg")
- electricComponent = Qt.createComponent(componentLocation + \
"SignalGenerator.qml")*/
-
- var electricComponent = \
Qt.createComponent("qrc:/gcompris/src/activities/digital_electricity/components/" + \
src) + var component = items.availablePieces.repeater.itemAt(componentIndex)
+ var electricComponent = \
Qt.createComponent("qrc:/gcompris/src/activities/digital_electricity/components/" + + \
component.source)
//console.log("Error loading component:", electricComponent.errorString())
components[index] = electricComponent.createObject(
items.backgroundContainer, {
"index": index,
"posX": x,
- "posY": y
+ "posY": y,
+ "imgSrc": component.imageName,
+ "toolTipTxt": component.toolTipTxt,
+ "imgWidth": component.imageWidth,
+ "imgHeight": component.imageHeight
});
+
toolDeleteSticky = false
deselect()
componentSelected(index)
updateComponent(index)
}
+/* Creates wire between two terminals. Condition for creation of wire is that an \
input terminal + * can only be connected to 1 wire, output terminals can be connected \
by any number of wires, and + * an input terminal can be connected with an output \
terminal only. 'connected' variable is used + * to make sure that an input is \
connected by only 1 wire. +*/
function terminalPointSelected(terminal) {
if(selectedTerminal == -1 || selectedTerminal == terminal)
@@ -180,18 +257,12 @@ function terminalPointSelected(terminal) {
else if((selectedTerminal.type != terminal.type) && (selectedTerminal.parent != \
terminal.parent)) {
var inTerminal = terminal.type == "In" ? terminal : selectedTerminal
var outTerminal = terminal.type == "Out" ? terminal : selectedTerminal
- //console.log("in, connected[inIndex]",connected[inIndex],"inIndex",inIndex)
if(connected[inTerminal] == undefined || connected[inTerminal] == -1) {
- //console.log("in2")
var wireComponent = \
Qt.createComponent("qrc:/gcompris/src/activities/digital_electricity/Wire.qml")
-
- //var colorIndex = Math.floor(Math.random() * colors.length)
var wire = wireComponent.createObject(
items.backgroundContainer, {
"from": outTerminal,
"to": inTerminal
- //"wireColor": colors[colorIndex]
- //"index": index
});
inTerminal.value = outTerminal.value
inTerminal.wires.push(wire)
@@ -204,19 +275,23 @@ function terminalPointSelected(terminal) {
deselect()
}
else {
- //console.log("else")
deselect()
selectedTerminal = terminal
terminal.selected = true
}
}
+/* Updates the output of the component. 'wireVisited' is used to update the value of
+ * each wire once which will avoid updating the outputs of components in an infinite \
loop. +*/
function updateComponent(index) {
- //console.log("updateComponent",index)
var wireVisited = []
components[index].updateOutput(wireVisited)
}
+/* Updates the orientation of the wire. It is called whenever a new wire is created \
or + * an object is rotated.
+*/
function updateWires(index) {
var component = components[index]
@@ -225,16 +300,14 @@ function updateWires(index) {
var rotatedAngle = component.initialAngle * Math.PI / 180
for(var i = 0 ; i < component.noOfInputs ; ++i) {
- var terminal = component.inputTerminals.itemAt(i) \
//terminals[component.inputs[i]] + var terminal = \
component.inputTerminals.itemAt(i) if(terminal.wires.length != 0) {
var wire = terminal.wires[0]
var otherAngle = wire.from.parent.initialAngle * Math.PI / 180
- //components[terminals[wire.from].componentIndex].initialAngle * Math.PI \
/ 180 var x = wire.from.xCenterFromComponent
var y = wire.from.yCenterFromComponent
var x1 = wire.from.xCenter - x + x * Math.cos(otherAngle) - y * \
Math.sin(otherAngle)
var y1 = wire.from.yCenter - y + x * Math.sin(otherAngle) + y * \
Math.cos(otherAngle)
- //console.log(otherComponentAngle,x,y,x1,y1)
x = terminal.xCenterFromComponent
y = terminal.yCenterFromComponent
@@ -248,13 +321,10 @@ function updateWires(index) {
wire.y = y1
wire.width = width
wire.rotation = angle
- //wire.rotateAngle = angle
}
}
- //console.log("component \
index",component.index,"component.outputs.length",component.outputs.length) for(var \
i = 0 ; i < component.noOfOutputs ; ++i) {
- var terminal = component.outputTerminals.itemAt(i) \
//terminals[component.outputs[i]]
- //console.log("terminal \
index",terminal.index,"component.outputs[i]",component.outputs[i]) + var \
terminal = component.outputTerminals.itemAt(i) for(var j = 0 ; j < \
terminal.wires.length ; ++j) { var x = terminal.xCenterFromComponent
var y = terminal.yCenterFromComponent
@@ -305,15 +375,13 @@ function removeComponent(index) {
var component = components[index]
for(var i = 0 ; i < component.noOfInputs ; ++i) {
- var terminal = component.inputTerminals.itemAt(i) \
//terminals[component.inputs[i]] + var terminal = \
component.inputTerminals.itemAt(i)
if(terminal.wires.length != 0) // Input Terminal can have only 1 wire
removeWire(terminal.wires[0])
}
for(var i = 0 ; i < component.noOfOutputs ; ++i) {
var terminal = component.outputTerminals.itemAt(i)
- //console.log("Remove terminal.wireIndex.length",terminal.wireIndex.length)
while (terminal.wires.length != 0) {
- //console.log("terminal.wireIndex[j]",terminal.wireIndex[j])
removeWire(terminal.wires[0]) // Output Terminal can have more than 1 \
wire }
}
@@ -331,13 +399,10 @@ function removeWire(wire) {
inTerminal.wires.splice(removeIndex,1)
removeIndex = outTerminal.wires.indexOf(wire)
outTerminal.wires.splice(removeIndex,1)
- //removeIndex = connected.indexOf(wire.to)
- //connected.splice(wire.to,1)
connected[wire.to] = -1
inTerminal.value = 0
wire.destroy()
- //deletedWireIndex.push(index)
updateComponent(inTerminal.parent.index)
deselect()
}
@@ -354,16 +419,12 @@ function rotateLeft() {
components[selectedIndex].rotationAngle = -2
components[selectedIndex].rotateComponent.start()
- /*components[selectedIndex].initialAngle = \
components[selectedIndex].rotationAngle == -360 ? 0 :
- \
components[selectedIndex].rotationAngle*/ }
function rotateRight() {
components[selectedIndex].rotationAngle = 2
components[selectedIndex].rotateComponent.start()
- /*components[selectedIndex].initialAngle = \
components[selectedIndex].rotationAngle == 360 ? 0 :
- \
components[selectedIndex].rotationAngle*/ }
function displayInfo() {
@@ -402,17 +463,3 @@ function displayInfo() {
function updateToolTip(toolTipTxt) {
items.toolTip.show(toolTipTxt)
}
-
-function nextLevel() {
- if(numberOfLevel <= ++currentLevel ) {
- currentLevel = 0
- }
- initLevel();
-}
-
-function previousLevel() {
- if(--currentLevel < 0) {
- currentLevel = numberOfLevel - 1
- }
- initLevel();
-}
diff --git a/src/activities/digital_electricity/resource/DigitalLightOff.svg \
b/src/activities/digital_electricity/resource/DigitalLightOff.svg index \
9fae91c..8c853dc 100644
--- a/src/activities/digital_electricity/resource/DigitalLightOff.svg
+++ b/src/activities/digital_electricity/resource/DigitalLightOff.svg
@@ -10,59 +10,49 @@
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg16385"
- sodipodi:docname="DigitalLightOff2.svg"
- viewBox="0 0 372.36474 137.649"
+ sodipodi:docname="DigitalLightOff.svg"
+ viewBox="0 0 222.08279 137.64879"
sodipodi:version="0.32"
version="1.0"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:version="0.91 r13725"
- width="372.36475"
- height="137.649">
+ width="222.08278"
+ height="137.64879">
<defs
id="defs16387">
<radialGradient
- id="radialGradient12538"
+ id="radialGradient10493"
gradientUnits="userSpaceOnUse"
cy="260.35999"
cx="387"
r="14.136"
inkscape:collect="always"
- gradientTransform="matrix(3.6655,0,0,3.6655,-1292.4,-13.65)">
+ gradientTransform="matrix(4.8685999,0,0,4.8685999,-1761.4586,-1181.1004)">
<stop
- id="stop12431"
- style="stop-color:#bcbcbc"
+ id="stop3714"
+ style="stop-color:#f7c76a"
offset="0" />
<stop
- id="stop12433"
- style="stop-color:#676767"
- offset=".86724" />
+ id="stop3716"
+ style="stop-color:red"
+ offset=".83767" />
<stop
- id="stop12435"
- style="stop-color:#404040"
- offset=".95510" />
+ id="stop3718"
+ style="stop-color:#631a04"
+ offset=".89703" />
<stop
- id="stop12437"
- style="stop-color:#090938"
- offset="1" />
- </radialGradient>
- <linearGradient
- id="linearGradient12540"
- y2="198.03"
- gradientUnits="userSpaceOnUse"
- x2="362.88"
- gradientTransform="translate(-194.95,719.957)"
- y1="198.03"
- x1="279.37"
- inkscape:collect="always">
+ id="stop4764"
+ style="stop-color:#63210e"
+ offset=".91966" />
<stop
- id="stop5538"
- style="stop-color:white"
- offset="0" />
+ id="stop4768"
+ style="stop-color:#fd0005;stop-opacity:.58549"
+ offset=".96896" />
<stop
- id="stop5540"
- style="stop-color:#fefaf9;stop-opacity:.26943"
+ id="stop3720"
+ style="stop-color:#ff1501;stop-opacity:0"
offset="1" />
- </linearGradient>
+ </radialGradient>
</defs>
<sodipodi:namedview
id="base"
@@ -71,12 +61,14 @@
inkscape:window-y="-8"
pagecolor="#ffffff"
inkscape:window-height="705"
- inkscape:zoom="1.4135715"
+ width="107px"
+ inkscape:zoom="1.9990919"
inkscape:window-x="-8"
+ height="161px"
borderopacity="1.0"
inkscape:current-layer="layer1"
- inkscape:cx="92.981867"
- inkscape:cy="57.582412"
+ inkscape:cx="7.3167649"
+ inkscape:cy="102.15533"
inkscape:window-width="1366"
inkscape:pageopacity="0.0"
inkscape:document-units="px"
@@ -90,85 +82,29 @@
id="layer1"
inkscape:label="Calque 1"
inkscape:groupmode="layer"
- transform="translate(-145.61656,-822.86108)">
- <g
- id="g4176"
- transform="matrix(1.3282226,0,0,1.3282226,179.69539,-357.78349)">
- <circle
- id="path10625"
- style="fill:url(#radialGradient12538);stroke:#000000;stroke-width:0.9999851"
- cx="126.1485"
- cy="940.70758"
- r="51.317001" />
- <path
- id="path10627"
- style="opacity:0.32115;fill:url(#linearGradient12540)"
- d="m 126.554,894.99 c -20.747,0 -38.047,14.81 -41.969,34.4 19.432,3.36 \
14.597,7.16 27.469,10.94 15.469,4.55 22.523,-16.35 33,-13 7.059,2.26 14.985,1.38 \
22.718,-1.09 -5.053,-18.02 -21.594,-31.25 -41.218,-31.25 z"
- inkscape:connector-curvature="0" />
- </g>
- <path
- d="m 472.17743,891.20975 -56.45776,0.24423"
- style="fill:none;stroke:#000000;stroke-width:5.10401392px"
- id="path2906-6"
- inkscape:connector-curvature="0" />
+ transform="translate(30.568758,-17.67454)">
<circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:5.58755302;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
- id="path5637-1"
- cx="489.44751"
- cy="893.45752"
- r="21.879631"
- transform="matrix(0.99999064,-0.00432583,0.00432583,0.99999064,0,0)" />
+ r="68.1604"
+ cy="86.49894"
+ cx="122.68963"
+ style="fill:url(#radialGradient10493);stroke:#000000;stroke-width:1.32799995;stroke-miterlimit:4;stroke-dasharray:none"
+ id="path3749" />
<path
- d="m 191.41242,891.33187 56.45829,0"
+ d="m -2.5378739,86.145555 56.4582849,0"
style="fill:none;stroke:#000000;stroke-width:5.10401392px"
id="path2906"
inkscape:connector-curvature="0" />
- <circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:5.58755302;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ <ellipse
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:3.40048909;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
id="path5637"
- cx="-170.28996"
- cy="-891.33185"
- r="21.879631"
- transform="scale(-1,-1)" />
- <rect
- style="opacity:0.71399997;fill:#b3a9a9;fill-opacity:0.93377482"
- id="rect4432"
- width="30.713917"
- height="76.253799"
- x="247.97324"
- y="853.20496" />
- <text
- xml:space="preserve"
- style="font-style:normal;font-weight:normal;font-size:31.01107788px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- x="256.80392"
- y="883.33215"
- id="text4434"
- sodipodi:linespacing="125%"><tspan
- sodipodi:role="line"
- id="tspan4436"
- x="256.80392"
- y="883.33215"
- style="text-align:start;text-anchor:start">I</tspan><tspan
- sodipodi:role="line"
- x="256.80392"
- y="922.09601"
- id="tspan4438"
- style="text-align:center;text-anchor:middle" /></text>
- <text
- xml:space="preserve"
- style="font-style:normal;font-weight:normal;font-size:19.03339005px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- x="251.91016"
- y="917.82703"
- id="text4232"
- sodipodi:linespacing="125%"><tspan
- sodipodi:role="line"
- id="tspan4234"
- x="251.91016"
- y="917.82703"
- style="font-size:30.45342445px">N</tspan></text>
+ cx="15.518754"
+ cy="-85.892723"
+ transform="scale(-1,-1)"
+ rx="13.349759"
+ ry="13.281483" />
</g>
<metadata
- id="metadata22">
+ id="metadata20">
<rdf:RDF>
<cc:Work>
<dc:format>image/svg+xml</dc:format>
@@ -182,10 +118,10 @@
<dc:title>Openclipart</dc:title>
</cc:Agent>
</dc:publisher>
- <dc:title>Voyant Blanc Eteint - White Light OFF</dc:title>
- <dc:date>2007-09-06T14:32:23</dc:date>
- <dc:description />
- <dc:source>https://openclipart.org/detail/5294/voyant-blanc-eteint---white-light-off-by-fatboy178</dc:source>
+ <dc:title></dc:title>
+ <dc:date>2007-09-06T13:40:36</dc:date>
+ <dc:description>Voyant rouge de l'électricien et de l'automaticien \
insdustriel</dc:description> + \
<dc:source>https://openclipart.org/detail/5288/voyant-rouge-allume---red-light-on-by-fatboy178</dc:source>
<dc:creator>
<cc:Agent>
<dc:title>fatboy178</dc:title>
@@ -194,6 +130,9 @@
<dc:subject>
<rdf:Bag>
<rdf:li>automatisme</rdf:li>
+ <rdf:li>electrique</rdf:li>
+ <rdf:li>insdustrie</rdf:li>
+ <rdf:li>rouge</rdf:li>
<rdf:li>voyant</rdf:li>
</rdf:Bag>
</dc:subject>
diff --git a/src/activities/digital_electricity/resource/DigitalLightOn.svg \
b/src/activities/digital_electricity/resource/DigitalLightOn.svg index \
409167e..85aae68 100644
--- a/src/activities/digital_electricity/resource/DigitalLightOn.svg
+++ b/src/activities/digital_electricity/resource/DigitalLightOn.svg
@@ -7,52 +7,101 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg16385"
- sodipodi:docname="DigitalLightOn2.svg"
- viewBox="0 0 372.36472 137.649"
+ sodipodi:docname="DigitalLightOn.svg"
+ viewBox="0 0 221.74172 137.6456"
sodipodi:version="0.32"
version="1.0"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
inkscape:version="0.91 r13725"
- width="372.36472"
- height="137.649">
+ width="221.74171"
+ height="137.6456">
<defs
id="defs16387">
- <radialGradient
- id="radialGradient10493"
- gradientUnits="userSpaceOnUse"
- cy="260.35999"
- cx="387"
- r="14.136"
+ <linearGradient
inkscape:collect="always"
- gradientTransform="matrix(4.8685999,0,0,4.8685999,-1761.4586,-1181.1004)">
- <stop
- id="stop3714"
- style="stop-color:#f7c76a"
- offset="0" />
- <stop
- id="stop3716"
- style="stop-color:red"
- offset=".83767" />
+ id="linearGradient4202">
<stop
- id="stop3718"
- style="stop-color:#631a04"
- offset=".89703" />
+ id="stop4206"
+ offset="0"
+ style="stop-color:#008000;stop-opacity:0;" />
<stop
- id="stop4764"
- style="stop-color:#63210e"
- offset=".91966" />
+ id="stop4204"
+ offset="1"
+ style="stop-color:#008000;stop-opacity:1;" />
+ </linearGradient>
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4156">
<stop
- id="stop4768"
- style="stop-color:#fd0005;stop-opacity:.58549"
- offset=".96896" />
+ style="stop-color:#ffff00;stop-opacity:1"
+ offset="0"
+ id="stop4158" />
<stop
- id="stop3720"
- style="stop-color:#ff1501;stop-opacity:0"
- offset="1" />
- </radialGradient>
+ style="stop-color:#008000;stop-opacity:0;"
+ offset="1"
+ id="stop4160" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4156"
+ id="radialGradient4162"
+ cx="122.68963"
+ cy="86.49894"
+ fx="122.68963"
+ fy="86.49894"
+ r="68.824501"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.92735489,-0.0106776,0.01036594,0.90028726,-80.235033,-87.816056)" \
/> + <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4202"
+ id="radialGradient4208"
+ cx="122.2437"
+ cy="86.79232"
+ fx="122.2437"
+ fy="86.79232"
+ r="68.824501"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-123.94441,-98.044517)" />
+ <filter
+ inkscape:collect="always"
+ style="color-interpolation-filters:sRGB"
+ id="filter4409"
+ x="-0.0288"
+ width="1.0576"
+ y="-0.0288"
+ height="1.0576">
+ <feGaussianBlur
+ inkscape:collect="always"
+ stdDeviation="1.5169535"
+ id="feGaussianBlur4411" />
+ </filter>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4202"
+ id="radialGradient4161"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="translate(-123.94441,-98.044517)"
+ cx="122.2437"
+ cy="86.79232"
+ fx="122.2437"
+ fy="86.79232"
+ r="68.824501" />
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4156"
+ id="radialGradient4163"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.92735489,-0.0106776,0.01036594,0.90028726,-80.235033,-87.816056)"
+ cx="122.68963"
+ cy="86.49894"
+ fx="122.68963"
+ fy="86.49894"
+ r="68.824501" />
</defs>
<sodipodi:namedview
id="base"
@@ -62,13 +111,13 @@
pagecolor="#ffffff"
inkscape:window-height="705"
width="107px"
- inkscape:zoom="0.99954595"
+ inkscape:zoom="1.9990919"
inkscape:window-x="-8"
height="161px"
borderopacity="1.0"
inkscape:current-layer="layer1"
- inkscape:cx="49.212024"
- inkscape:cy="99.276241"
+ inkscape:cx="47.927009"
+ inkscape:cy="89.09076"
inkscape:window-width="1366"
inkscape:pageopacity="0.0"
inkscape:document-units="px"
@@ -77,78 +126,63 @@
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
- inkscape:window-maximized="1" />
+ inkscape:window-maximized="1"
+ showguides="false" />
<g
id="layer1"
inkscape:label="Calque 1"
inkscape:groupmode="layer"
- transform="translate(79.133758,-17.674438)">
- <circle
- r="68.1604"
- cy="86.49894"
- cx="122.68963"
- style="fill:url(#radialGradient10493);stroke:#000000;stroke-width:1.32820272"
- id="path3749" />
- <path
- d="m 247.42711,86.023435 -56.45776,0.24423"
- style="fill:none;stroke:#000000;stroke-width:5.10401392px"
- id="path2906-6"
- inkscape:connector-curvature="0" />
- <circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:5.58755302;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
- id="path5637-1"
- cx="268.18237"
- cy="87.306503"
- r="21.879631"
- transform="matrix(0.99999064,-0.00432583,0.00432583,0.99999064,0,0)" />
+ transform="translate(30.22576,-17.969522)">
+ <g
+ id="g3343"
+ transform="matrix(1.0051153,0,0,0.99997523,33.145236,0.00214958)" />
<path
- d="m -33.337894,86.145555 56.458285,0"
- style="fill:none;stroke:#000000;stroke-width:5.10401392px"
+ d="m -2.3108042,86.145571 56.7470852,0"
+ style="fill:none;stroke:#000000;stroke-width:5.11698818px"
id="path2906"
inkscape:connector-curvature="0" />
- <circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:5.58755302;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ <ellipse
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:3.40048909;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
id="path5637"
- cx="54.46035"
- cy="-86.145531"
- r="21.879631"
- transform="scale(-1,-1)" />
- <rect
- style="opacity:0.71399997;fill:#b3a9a9;fill-opacity:0.93377482"
- id="rect4432"
- width="30.713917"
- height="76.253799"
- x="23.222921"
- y="48.018642" />
- <text
- xml:space="preserve"
- style="font-style:normal;font-weight:normal;font-size:31.01107788px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- x="32.053612"
- y="78.145836"
- id="text4434"
- sodipodi:linespacing="125%"><tspan
- sodipodi:role="line"
- id="tspan4436"
- x="32.053612"
- y="78.145836"
- style="text-align:start;text-anchor:start">I</tspan><tspan
- sodipodi:role="line"
- x="32.053612"
- y="116.90968"
- id="tspan4438"
- style="text-align:center;text-anchor:middle" /></text>
- <text
- xml:space="preserve"
- style="font-style:normal;font-weight:normal;font-size:19.03339005px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- x="27.159842"
- y="112.64072"
- id="text4232"
- sodipodi:linespacing="125%"><tspan
- sodipodi:role="line"
- id="tspan4234"
- x="27.159842"
- y="112.64072"
- style="font-size:30.45342445px">N</tspan></text>
+ cx="15.175756"
+ cy="-86.138397"
+ transform="scale(-1,-1)"
+ rx="13.349759"
+ ry="13.281483" />
+ <g
+ id="g4414"
+ transform="matrix(1.0051153,0,0,0.99997523,87.724804,98.044238)">
+ <circle
+ transform="matrix(-1,0,0,1,32.737722,0)"
+ r="68.1604"
+ cy="-11.252197"
+ cx="-1.7007041"
+ style="fill:url(#radialGradient4161);fill-opacity:1;stroke:#000000;stroke-width:1.32820272"
+ id="path3749-0" />
+ <circle
+ r="63.206394"
+ cy="-11.252198"
+ cx="34.438423"
+ style="opacity:1;fill:url(#radialGradient4163);fill-opacity:1;stroke:#000000 \
;stroke-width:2.43199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4409)"
+ id="path3749" />
+ </g>
+ <g
+ transform="matrix(1.0051153,0,0,0.99997523,87.724804,98.044238)"
+ id="g4430">
+ <circle
+ id="circle4432"
+ style="fill:url(#radialGradient4208);fill-opacity:1;stroke:#000000;stroke-width:1.32820272"
+ cx="-1.7007041"
+ cy="-11.252197"
+ r="68.1604"
+ transform="matrix(-1,0,0,1,32.737722,0)" />
+ <circle
+ id="circle4434"
+ style="opacity:1;fill:url(#radialGradient4162);fill-opacity:1;stroke:#000000 \
;stroke-width:2.43199992;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter4409)"
+ cx="34.438423"
+ cy="-11.252198"
+ r="63.206394" />
+ </g>
</g>
<metadata
id="metadata20">
diff --git a/src/activities/digital_electricity/resource/bcdCounter.svg \
b/src/activities/digital_electricity/resource/bcdCounter.svg new file mode 100644
index 0000000..ea16169
--- /dev/null
+++ b/src/activities/digital_electricity/resource/bcdCounter.svg
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="255.46976mm"
+ height="157.1337mm"
+ viewBox="0 0 905.2078 556.77294"
+ id="svg4252"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="bcdCounter.svg">
+ <defs
+ id="defs4254" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.49497475"
+ inkscape:cx="222.66374"
+ inkscape:cy="262.56419"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ inkscape:window-width="1366"
+ inkscape:window-height="705"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1" />
+ <metadata
+ id="metadata4257">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(4.4027244,-296.1158)">
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;fo \
nt-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;s \
troke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="630.85413"
+ y="791.60858"
+ id="text5022"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan5024"
+ x="630.85413"
+ y="791.60858" /></text>
+ <rect
+ style="opacity:1;fill:#97e2e2;fill-opacity:0.93377482;stroke:#000000;stroke-wi \
dth:5.51777029;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:1" + \
id="rect4800" + width="507.20468"
+ height="535.77606"
+ x="-710.31415"
+ y="-847.31525"
+ transform="matrix(-0.99999534,0.00305151,-0.00305151,-0.99999534,0,0)" />
+ <circle
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:8.01058006;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ id="path5637-5"
+ cx="-862.93359"
+ cy="-820.15302"
+ r="31.367491"
+ transform="matrix(-0.99999534,0.00305151,-0.00305151,-0.99999534,0,0)" />
+ <path
+ d="m 713.50979,822.17686 121.14255,-0.36967"
+ style="fill:none;stroke:#000000;stroke-width:9.5966053px"
+ id="path2902"
+ inkscape:connector-curvature="0" />
+ <circle
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:8.01058006;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ id="path5637-7"
+ cx="-863.93848"
+ cy="-490.6897"
+ r="31.367491"
+ transform="matrix(-0.99999534,0.00305151,-0.00305151,-0.99999534,0,0)" />
+ <path
+ d="m 713.26584,491.02592 121.14255,-0.36967"
+ style="fill:none;stroke:#000000;stroke-width:9.5966053px"
+ id="path2904"
+ inkscape:connector-curvature="0" />
+ <circle
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:8.01058006;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ id="path5637-5-5"
+ cx="-863.42792"
+ cy="-658.01282"
+ r="31.367491"
+ transform="matrix(-0.99999534,0.00305151,-0.00305151,-0.99999534,0,0)" />
+ <path
+ d="m 713.00754,657.46428 121.14255,-0.36967"
+ style="fill:none;stroke:#000000;stroke-width:9.5966053px"
+ id="path2902-5"
+ inkscape:connector-curvature="0" />
+ <circle
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:8.01058006;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ id="path5637-5-58"
+ cx="-864.4165"
+ cy="-334.12811"
+ r="31.367683"
+ transform="matrix(-0.99999534,0.00305151,-0.00305151,-0.99999534,0,0)" />
+ <path
+ d="m 712.01449,332.03944 121.14255,-0.36967"
+ style="fill:none;stroke:#000000;stroke-width:9.5966053px"
+ id="path2902-59"
+ inkscape:connector-curvature="0" />
+ <circle
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:8.01058674;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ id="path5637-5-9"
+ cx="27.271914"
+ cy="575.77087"
+ r="31.367697"
+ transform="matrix(0.99997936,-0.0064243,0.0064243,0.99997936,0,0)" />
+ <path
+ d="M 205.6959,575.9963 61.961745,576.91971"
+ style="fill:none;stroke:#000000;stroke-width:11.38643551px"
+ id="path2902-4"
+ inkscape:connector-curvature="0" />
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:46.22131729px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="689.56409"
+ y="653.89655"
+ id="text4869"
+ sodipodi:linespacing="125%"
+ transform="scale(0.96378613,1.0375746)"><tspan
+ sodipodi:role="line"
+ id="tspan4871"
+ x="689.56409"
+ y="653.89655">B</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:46.22131729px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="690.21826"
+ y="489.9187"
+ id="text4994"
+ sodipodi:linespacing="125%"
+ transform="scale(0.96378613,1.0375746)"><tspan
+ sodipodi:role="line"
+ id="tspan4996"
+ x="690.21826"
+ y="489.9187">C</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:46.22131729px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="688.04047"
+ y="343.28659"
+ id="text5000"
+ sodipodi:linespacing="125%"
+ transform="scale(0.96378613,1.0375746)"><tspan
+ sodipodi:role="line"
+ id="tspan5002"
+ x="688.04047"
+ y="343.28659">D</tspan></text>
+ <text
+ xml:space="preserve"
+ style="font-style:normal;font-weight:normal;font-size:45.46774292px;line-heigh \
t:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-op \
acity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ x="664.53094"
+ y="833.31848"
+ id="text4608"
+ sodipodi:linespacing="125%"><tspan
+ sodipodi:role="line"
+ id="tspan4610"
+ x="664.53094"
+ y="833.31848">A</tspan></text>
+ </g>
+</svg>
diff --git a/src/activities/digital_electricity/resource/switchOff.svg \
b/src/activities/digital_electricity/resource/switchOff.svg index 18a7feb..31ecf68 \
100644
--- a/src/activities/digital_electricity/resource/switchOff.svg
+++ b/src/activities/digital_electricity/resource/switchOff.svg
@@ -10,9 +10,9 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="282.29874mm"
+ width="246.68341mm"
height="66.751198mm"
- viewBox="0 0 1000.2711 236.51998"
+ viewBox="0 0 874.07506 236.51998"
id="svg4287"
version="1.1"
inkscape:version="0.91 r13725"
@@ -246,7 +246,7 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
- inkscape:cx="281.83123"
+ inkscape:cx="219.20178"
inkscape:cy="161.11459"
inkscape:document-units="px"
inkscape:current-layer="layer1"
@@ -276,7 +276,7 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(-39.512972,-372.36225)">
+ transform="translate(-102.14243,-372.36225)">
<rect
style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.90100002;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.96688741"
id="rect5610"
@@ -292,17 +292,17 @@
x="161.85126"
y="488.19547" />
<circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:14.78639317;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000 \
;stroke-width:7.35996771;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
id="path5637"
- cx="974.49066"
- cy="489.90796"
- r="57.900265" />
+ cx="943.71753"
+ cy="490.37653"
+ r="28.820017" />
<circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:14.7864027;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000 \
;stroke-width:7.35996819;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
id="path5637-7"
- cx="104.80647"
- cy="491.33649"
- r="57.900299" />
+ cx="134.64243"
+ cy="490.37622"
+ r="28.820015" />
<g
id="g5249"
transform="matrix(1.7324934,0,0,1.7324934,-11.127632,-810.78349)">
diff --git a/src/activities/digital_electricity/resource/switchOn.svg \
b/src/activities/digital_electricity/resource/switchOn.svg index 0841beb..617a621 \
100644
--- a/src/activities/digital_electricity/resource/switchOn.svg
+++ b/src/activities/digital_electricity/resource/switchOn.svg
@@ -10,9 +10,9 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="282.29874mm"
+ width="246.68343mm"
height="66.678886mm"
- viewBox="0 0 1000.2711 236.26376"
+ viewBox="0 0 874.07512 236.26376"
id="svg4287"
version="1.1"
inkscape:version="0.91 r13725"
@@ -397,8 +397,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.49497475"
- inkscape:cx="281.83123"
- inkscape:cy="164.08907"
+ inkscape:cx="257.15356"
+ inkscape:cy="164.08905"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
@@ -427,33 +427,7 @@
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- transform="translate(-39.512972,-375.59296)">
- <rect
- style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.90100002;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.96688741"
- id="rect5610"
- width="88.912064"
- height="4.8535476"
- x="829.16779"
- y="491.29807" />
- <rect
- style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.9012959;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.96688741"
- id="rect5610-1"
- width="88.912064"
- height="4.8535476"
- x="161.85126"
- y="491.29807" />
- <circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:14.78639317;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
- id="path5637"
- cx="974.49066"
- cy="493.72482"
- r="57.900265" />
- <circle
- style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:14.7864027;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
- id="path5637-7"
- cx="104.80647"
- cy="493.72482"
- r="57.900299" />
+ transform="translate(-103.61098,-375.59295)">
<g
id="g5272"
transform="matrix(1.7306165,0,0,1.7306165,656.49394,-806.27102)">
@@ -627,5 +601,31 @@
</g>
</g>
</g>
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.90100002;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.96688741"
+ id="rect5610"
+ width="88.912064"
+ height="4.8535476"
+ x="830.63635"
+ y="491.17563" />
+ <rect
+ style="opacity:1;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.9012959;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.96688741"
+ id="rect5610-1"
+ width="88.912064"
+ height="4.8535476"
+ x="163.31981"
+ y="491.17563" />
+ <circle
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:7.35996771;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ id="path5637"
+ cx="945.1861"
+ cy="493.35672"
+ r="28.820017" />
+ <circle
+ style="opacity:0.64899998;fill:#000000;fill-opacity:0.93377482;stroke:#000000; \
stroke-width:7.35996819;stroke-miterlimit:3.54999995;stroke-dasharray:none;stroke-opacity:0.05298013"
+ id="path5637-7"
+ cx="136.11098"
+ cy="493.35641"
+ r="28.820015" />
</g>
</svg>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic