qmlfrontend/Page1.qml
branchqmlfrontend
changeset 12876 b544bbbd0696
parent 12863 fe16fa088b69
equal deleted inserted replaced
12863:fe16fa088b69 12876:b544bbbd0696
     1 import QtQuick 2.7
     1 import QtQuick 2.7
     2 import Hedgewars.Engine 1.0
     2 import Hedgewars.Engine 1.0
     3 
     3 
     4 Page1Form {
     4 Page1Form {
       
     5   tickButton.onClicked: {
       
     6     item1.tick(100);
       
     7 }
     5   gameButton.onClicked: {
     8   gameButton.onClicked: {
     6     HWEngine.runQuickGame()
     9     HWEngine.runQuickGame()
     7 }
    10   }
     8   button1.onClicked: {
    11   button1.onClicked: {
     9     HWEngine.getPreview()
    12     HWEngine.getPreview()
    10   }
    13   }
    11 
    14 
    12   Connections {
    15   Connections {
    13       target: HWEngine
    16       target: HWEngine
    14       onPreviewImageChanged: {
    17       onPreviewImageChanged: {
    15           previewImage.source = "image://preview/image"
    18           previewImage.source = "image://preview/image"
    16       }
    19       }
    17       onPreviewIsRendering: {
    20       onPreviewIsRendering: {
    18         console.log("==========")
       
    19           previewImage.source = "qrc:/res/iconTime.png"
    21           previewImage.source = "qrc:/res/iconTime.png"
    20       }
    22       }
    21       onPreviewHogCountChanged: {
    23       onPreviewHogCountChanged: {
    22       }
    24       }
    23   }
    25   }
    24 
       
    25 }
    26 }