qmlfrontend/Page1.qml
author Grigory Ustinov <grenka@altlinux.org>
Mon, 12 Nov 2018 20:05:24 +0300
changeset 14203 73c5ba3aac45
parent 14159 8354b390f1a2
child 14299 21be7838a127
permissions -rw-r--r--
Verify and update russian translations for refreshed strings in 04:XX / part 2 (last)
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
14148
745c73e0e644 Start working on frontend to rust engine rewrite
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 {
14148
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
     5
  tickButton.onClicked: {
14159
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14148
diff changeset
     6
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14148
diff changeset
     7
    //    item1.tick(100)
14148
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
     8
  }
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
     9
  gameButton.onClicked: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    10
    HWEngine.runQuickGame()
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    11
  }
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    12
  button1.onClicked: {
14148
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    13
    HWEngine.getPreview()
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    14
  }
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    15
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    16
  Connections {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    17
    target: HWEngine
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    18
    onPreviewImageChanged: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    19
      previewImage.source = "image://preview/image"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    20
    }
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    21
    onPreviewIsRendering: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    22
      previewImage.source = "qrc:/res/iconTime.png"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12859
diff changeset
    23
    }
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    24
  }
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    25
}