David 10 anos atrás
pai
commit
9153af5ab0
1 arquivos alterados com 13 adições e 4 exclusões
  1. 13 4
      main.qml

+ 13 - 4
main.qml

@@ -10,6 +10,7 @@ ApplicationWindow {
     width: 1280
     height: 720
     color: "#fffffe"
+    property alias label1: label1
 
     WebSocket {
         property int total_slides: 5
@@ -99,6 +100,7 @@ ApplicationWindow {
 
         onCurImageChanged: {
             canvas.change_image(curPDF, curImage)
+            label1.text=curImage+"/"+socket.total_slides
         }
 
         Grid {
@@ -251,7 +253,7 @@ ApplicationWindow {
 
                 Column {
                     width: parent.width
-                    height: parent.height/2
+                    height: parent.height/2-20
                     Button {
                         width: parent.width
                         height: 70
@@ -266,7 +268,7 @@ ApplicationWindow {
                         width: parent.width
                         id: button2
                         text: qsTr("Siguiente")
-                        enabled: socket.active
+                        enabled: socket.active && (item1.curImage < socket.total_slides)
                         onClicked: socket.next_diapo()
                     }
 
@@ -275,15 +277,21 @@ ApplicationWindow {
                         width: parent.width
                         id: button3
                         text: qsTr("Limpiar")
-                        enabled: socket.active
+                        enabled: socket.active && (item1.curImage>1)
                         onClicked: socket.clear_path()
                     }
 
                 }
+                Label {
+                    id: label1
+                    width: parent.width
+                    height: 30
+                }
+
                 Column {
                     id: column1
                     width: parent.width
-                    height: parent.height/2
+                    height: parent.height/2-20
 
                     Button {
                         width: parent.width
@@ -331,6 +339,7 @@ ApplicationWindow {
                 }
 
 
+
             }
         }
     }