qmlfrontend/Page1.qml
author unc0rr
Tue, 26 Dec 2017 01:36:58 +0100
branchqmlfrontend
changeset 12866 488782d9aba9
parent 12863 0c6fb706f747
child 12868 fe16fa088b69
permissions -rw-r--r--
Recreate uFLRunQueue in Qt, render previews
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     1
import QtQuick 2.7
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12859
diff changeset
     2
import Hedgewars.Engine 1.0
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     3
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     4
Page1Form {
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     5
  button1.onClicked: {
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12859
diff changeset
     6
    console.log("Button clicked")
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12859
diff changeset
     7
    HWEngine.getPreview()
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     8
  }
12866
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
     9
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    10
  Connections {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    11
      target: HWEngine
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    12
      onPreviewImageChanged: {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    13
          previewImage.source = "image://preview/image"
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    14
      }
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    15
      onPreviewIsRendering: {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    16
        console.log("==========")
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    17
          previewImage.source = "qrc:/res/iconTime.png"
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    18
      }
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    19
      onPreviewHogCountChanged: {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    20
      }
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    21
  }
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    22
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    23
}