diff --git a/lib/firmata/qmlfirmataplugin.dll b/lib/firmata/qmlfirmataplugin.dll index 0d79287..e81620f 100644 Binary files a/lib/firmata/qmlfirmataplugin.dll and b/lib/firmata/qmlfirmataplugin.dll differ diff --git a/qml/InitWnd.qml b/qml/InitWnd.qml index bc40b7f..2207ab9 100644 --- a/qml/InitWnd.qml +++ b/qml/InitWnd.qml @@ -43,7 +43,7 @@ Rectangle{ Rectangle{ anchors.fill: parent color: "black" - opacity: 0.6 + opacity: 0.8 } Rectangle { id: focus @@ -53,14 +53,14 @@ Rectangle{ NumberAnimation { duration: 1000 loops: Animation.Infinite - easing.type: Easing.InOutBounce + easing.type: Easing.InOutQuad } } Behavior on y { NumberAnimation { duration: 1000 loops: Animation.Infinite - easing.type: Easing.InOutBounce + easing.type: Easing.InOutQuad } } @@ -72,56 +72,23 @@ Rectangle{ Row { Image { id: computer - source:"../image/computer.png" - Behavior on scale { - NumberAnimation { - duration: 1000 - loops: Animation.Infinite - easing.type: Easing.InOutBounce - } - } - + source: "../image/computer.png" } Image { id: add source:"../image/add.png" scale: 0.5 - Behavior on scale { - NumberAnimation { - duration: 1000 - loops: Animation.Infinite - easing.type: Easing.InOutBounce - } - - } - - } + } Image { id: wired source: "../image/wired.png" - Behavior on scale { - NumberAnimation { - duration: 1000 - loops: Animation.Infinite - easing.type: Easing.InOutBounce - } - - } - } } Image { id: click anchors.horizontalCenter: parent.horizontalCenter source: "../image/click.png" - Behavior on scale { - NumberAnimation { - duration: 1000 - loops: Animation.Infinite - easing.type: Easing.InOutBounce - } - } - } + } } } Label { diff --git a/qml/ProcessingWnd.qml b/qml/ProcessingWnd.qml index 57e34e8..5b69daa 100644 --- a/qml/ProcessingWnd.qml +++ b/qml/ProcessingWnd.qml @@ -5,34 +5,13 @@ import "firmata" Rectangle{ id: main - PortSelector { - id: port - anchors.top: main.top - height:40 - width: main.width - Rectangle { - visible: false - anchors.fill: parent - color: "black" - opacity: 0.5 - } - - Component.onCompleted: { - } - onDataReceived: { - dataUpdate(rawValue) - } - - - - } QChartGallery{ id: gallery anchors.left: main.left anchors.top: port.bottom width: main.width - height: main.height - port.height + height: main.height Rectangle{ visible: false diff --git a/qml/StandbyWnd.qml b/qml/StandbyWnd.qml index b125dd9..0d04751 100644 --- a/qml/StandbyWnd.qml +++ b/qml/StandbyWnd.qml @@ -1,30 +1,97 @@ import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.3 +import QtQml.StateMachine 1.0 as DSM + Rectangle{ - id: flashingblob - width: 75; height: 75 - color: "blue" - opacity: 1.0 - - MouseArea { - anchors.fill: parent - onClicked: { - animateColor.start() - animateOpacity.start() - } - } - - PropertyAnimation {id: animateColor; target: flashingblob; properties: "color"; to: "green"; duration: 100} - - NumberAnimation { - id: animateOpacity - target: flashingblob - properties: "opacity" - from: 0.99 - to: 1.0 - loops: Animation.Infinite - easing {type: Easing.OutBack; overshoot: 500} - } + id: standbyWnd + color: "yellow" + opacity: 0.5 + clip: true + Item { + id: container + width: parent.width + height: parent.height - label.height + + Image { + id: switchOn + visible: false + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter + source:"../image/switch.png" + scale: 1.5 + Behavior on y { + NumberAnimation { + duration: 1000 + loops: Animation.Infinite + easing.type: Easing.InOutQuad + } + } + } + Image { + id: click + x: parent.x + y: parent.height - click.paintedHeight * 1.5 + source: "../image/click.png" + scale: 1.5 + Behavior on y { + NumberAnimation { + duration: 1000 + loops: Animation.Infinite + easing.type: Easing.InOutQuad + } + } + } + + } + + Label { + id: label + anchors.top: container.bottom + width: parent.width + height: 30 + text: "장비의 전원을 켜주세요" + font.pixelSize: 20 + font.bold: true + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + DSM.StateMachine { + id: stateMachine + initialState: initState + running: true + DSM.State { + id: initState + DSM.TimeoutTransition{ + targetState: clickedState + timeout: 2000 + } + onEntered: { + switchOn.visible = true + click.x = switchOn.x + 15 + click.y = switchOn.y + (switchOn.paintedWidth * 1.5 ) / 2 + } + onExited: { + } + } + DSM.State { + id: clickedState + DSM.TimeoutTransition{ + targetState: initState + timeout: 2000 + } + onEntered: { + click.x = switchOn.x + 15 + click.y = container.y + container.height + 200 + } + onExited: { + } + } + + } + + +// easing {type: Easing.OutBack; overshoot: 500} +// } } diff --git a/qml/main.qml b/qml/main.qml index a40c8b6..fe7c47e 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -21,12 +21,21 @@ ApplicationWindow{ target: initWnd onComPortOpened:{ console.log("open") - sgStandby() + while(1) + { + if( pathView.currentIndex == 1) + break; + pathView.incrementCurrentIndex() + } } - onComPortClosed:{ console.log("close") - sgInit() + while(1) + { + if( pathView.currentIndex == 0) + break; + pathView.incrementCurrentIndex() + } } } @@ -65,6 +74,7 @@ ApplicationWindow{ id: pathView anchors.fill: parent model: itemModel + interactive: false path: Path { startX: main.width /2 startY: main.height /2 @@ -83,7 +93,6 @@ ApplicationWindow{ signal: main.sgStandby } onEntered: { - pathView.incrementCurrentIndex() } onExited: { }