|
|
@@ -5,10 +5,12 @@ import QtWebSockets 1.0
|
|
|
import "./simplify.js" as Simplify
|
|
|
|
|
|
ApplicationWindow {
|
|
|
+ id: aw
|
|
|
visible: true
|
|
|
- width: 640
|
|
|
+ width: 800
|
|
|
height: 480
|
|
|
title: qsTr("Hello World")
|
|
|
+ color: "#fffffe"
|
|
|
|
|
|
WebSocket {
|
|
|
id: socket
|
|
|
@@ -30,6 +32,7 @@ ApplicationWindow {
|
|
|
id: item1
|
|
|
width: parent.width
|
|
|
height: parent.height
|
|
|
+
|
|
|
//property alias gridLayout1: gridLayout1
|
|
|
property alias button4: button4
|
|
|
property alias mouseArea1: mouseArea1
|
|
|
@@ -44,6 +47,7 @@ ApplicationWindow {
|
|
|
}
|
|
|
|
|
|
Grid {
|
|
|
+
|
|
|
id: grid1
|
|
|
width: parent.width
|
|
|
height: parent.height
|
|
|
@@ -56,8 +60,9 @@ ApplicationWindow {
|
|
|
|
|
|
Rectangle {
|
|
|
id: canvasCol
|
|
|
- width: 400
|
|
|
- height: 300
|
|
|
+ height: parent.height
|
|
|
+ width: height*4/3
|
|
|
+ color: aw.color
|
|
|
|
|
|
Canvas {
|
|
|
id: canvas
|
|
|
@@ -73,12 +78,21 @@ ApplicationWindow {
|
|
|
property real alpha: 1.0
|
|
|
property variant points_array: []
|
|
|
property string curImageUrl: "https://plataforma.especificosba.com.ar/diapo/EBA/1.png"
|
|
|
- width: 300
|
|
|
- height: 300
|
|
|
+ width: parent.width
|
|
|
+ height: parent.height
|
|
|
|
|
|
onPaint: paint_canvas()
|
|
|
onLineWidthChanged: requestPaint()
|
|
|
- onImageLoaded: requestPaint()
|
|
|
+ onImageLoaded: {
|
|
|
+ clean_path()
|
|
|
+ requestPaint()
|
|
|
+ }
|
|
|
+
|
|
|
+ function clean_path() {
|
|
|
+ points_array = []
|
|
|
+ requestPaint()
|
|
|
+ //ws.send()..
|
|
|
+ }
|
|
|
|
|
|
function start_path() {
|
|
|
points_array.push([])
|
|
|
@@ -157,9 +171,12 @@ ApplicationWindow {
|
|
|
}
|
|
|
Column {
|
|
|
id: columnLayout1
|
|
|
- spacing: 6
|
|
|
+ spacing: 15
|
|
|
+ width: parent.width - canvasCol.width - parent.spacing*2
|
|
|
|
|
|
Button {
|
|
|
+ width:parent.width
|
|
|
+ height:40
|
|
|
id: button2
|
|
|
text: qsTr("Anterior")
|
|
|
enabled: socket.active
|
|
|
@@ -167,6 +184,8 @@ ApplicationWindow {
|
|
|
}
|
|
|
|
|
|
Button {
|
|
|
+ height:40
|
|
|
+ width:parent.width
|
|
|
id: button1
|
|
|
text: qsTr("Siguiente")
|
|
|
enabled: socket.active
|
|
|
@@ -174,17 +193,16 @@ ApplicationWindow {
|
|
|
}
|
|
|
|
|
|
Button {
|
|
|
+ height:40
|
|
|
+ width:parent.width
|
|
|
id: button4
|
|
|
text: qsTr("Limpiar")
|
|
|
enabled: socket.active
|
|
|
+ onClicked: canvas.clean_path()
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- Column {
|
|
|
- id: columnLayout2
|
|
|
- transformOrigin: Item.Center
|
|
|
-
|
|
|
Button {
|
|
|
+ height:40
|
|
|
+ width:parent.width
|
|
|
id: button3
|
|
|
text: qsTr("Break")
|
|
|
isDefault: false
|