qmlfrontend/Page1Form.ui.qml
author unC0Rr
Tue, 22 Aug 2023 08:35:46 +0200
branchtransitional_engine
changeset 15975 2146cb7be36f
parent 14915 a3ad06ac390e
child 16010 a73b9770467a
permissions -rw-r--r--
Merge default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     1
import QtQuick 2.7
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     2
import QtQuick.Controls 2.0
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     3
import QtQuick.Layouts 1.3
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     4
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     5
import Hedgewars.Engine 1.0
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     6
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     7
Item {
14915
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
     8
  id: element
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
     9
  property alias button1: button1
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    10
  property alias previewImage: previewImage
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    11
  property alias gameButton: gameButton
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    12
  width: 1024
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    13
  height: 800
14915
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    14
  property alias netButton: netButton
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    15
  property alias tickButton: tickButton
14294
21be7838a127 Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents: 14154
diff changeset
    16
  property alias gameView: gameView
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    17
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    18
  ColumnLayout {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    19
    anchors.fill: parent
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    20
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    21
    RowLayout {
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    22
      Layout.alignment: Qt.AlignHCenter
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    23
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    24
      Button {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    25
        id: button1
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    26
        text: qsTr("Preview")
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    27
      }
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    28
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    29
      Button {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    30
        id: gameButton
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    31
        text: qsTr("Game")
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    32
      }
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    33
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    34
      Button {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    35
        id: tickButton
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    36
        text: qsTr("Tick")
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    37
      }
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    38
    }
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    39
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    40
    Rectangle {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    41
      border.color: "orange"
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    42
      border.width: 5
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    43
      radius: 5
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    44
14298
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    45
      Layout.minimumHeight: 256
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    46
      Layout.fillWidth: true
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    47
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    48
      gradient: Gradient {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    49
        GradientStop {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    50
          position: 0
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    51
          color: "lightblue"
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    52
        }
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    53
        GradientStop {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    54
          position: 0.9
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    55
          color: "blue"
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    56
        }
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    57
        GradientStop {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    58
          position: 0.9
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    59
          color: "darkblue"
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    60
        }
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    61
        GradientStop {
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    62
          position: 1.0
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    63
          color: "darkblue"
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    64
        }
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    65
      }
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    66
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    67
      Image {
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    68
        id: previewImage
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    69
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    70
        anchors.fill: parent
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    71
        anchors.margins: parent.radius
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    72
        source: "qrc:/res/iconTime.png"
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    73
        fillMode: Image.PreserveAspectFit
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    74
        cache: false
14154
8354b390f1a2 Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents: 14143
diff changeset
    75
      }
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    76
    }
14298
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    77
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    78
    GameView {
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    79
      id: gameView
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    80
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    81
      Layout.fillWidth: true
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    82
      Layout.fillHeight: true
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14294
diff changeset
    83
    }
14294
21be7838a127 Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents: 14154
diff changeset
    84
  }
14915
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    85
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    86
  Button {
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    87
    id: netButton
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    88
    text: qsTr("Net")
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    89
    anchors.bottom: parent.bottom
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    90
    anchors.bottomMargin: 8
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    91
    anchors.left: parent.left
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    92
    anchors.leftMargin: 8
a3ad06ac390e Proof of concept for new net game client
unc0rr
parents: 14298
diff changeset
    93
  }
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    94
}