123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- import QtQuick 2.15
- import QtQuick.Window 2.15
- import QtQuick.Layouts 1.3
- import QtQuick.Controls 2.14
- import QtQuick.Dialogs 1.3
- import QtQuick.Controls.Styles 1.4
- import QtQuick.VirtualKeyboard 2.15
- import TService 1.0
- Window {
- id:main_window
- width: 1280
- height: 760
- visible: true
- title: qsTr("油气回收测试装备")
- flags:Qt.FramelessWindowHint
- Image {
- id: bg
- anchors.horizontalCenter: parent.horizontalCenter
- fillMode: Image.PreserveAspectFit
- source: "img/main_zjtj_bj.jpg"
- }
- Rectangle{
- id: logo
- x: 20
- y: 20
- width:300
- height:100
- color:"transparent"
- Image {
- anchors.fill:parent
- fillMode: Image.PreserveAspectFit
- source:"img/zjtj_logo.png"
- }
- }
- Button {
- text: "点击进入"
- font.bold: true
- font.pixelSize: 24
- width:240
- height:120
- anchors.centerIn: parent
- background: Image {
- anchors.fill:parent
- fillMode: Image.PreserveAspectFit
- source:"img/blue_button.png"
- }
- //icon.source: "img/blue_button.png"
- //icon.color: "transparent"
- onClicked: myLoder.sourceComponent = mainpage // 切换显示主页面
- }
- Button {
- //text: "点击进入"
- width:80
- height:80
- anchors.right: parent.right
- anchors.rightMargin: 40;
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 40;
- //color:"transparent"
- background:Image {
- anchors.fill:parent
- fillMode: Image.PreserveAspectFit
- source:"img/shutdown_red.png"
- }
- onClicked: {
- Qt.quit()
- }
- }
- /*
- Item {
- id: cornerItem
- x: 0
- y: 0
- }
- property int activeFocusItemBottom : activeFocusItem == null ? 0 : Math.min(height, cornerItem.mapFromItem(activeFocusItem, 0, activeFocusItem.height).y + 50)
- */
- Loader{
- id:myLoder
- anchors.centerIn: parent
- }
- //Component.onCompleted: myLoder.sourceComponent = firstpage
- Component{
- id:firstpage
- PageFirst{
- width:300
- height: 200
- anchors.centerIn: parent
- }
- }
- Component{
- id:mainpage
- PageMain{
- width: 1280
- height: 760
- anchors.centerIn: parent
- }
- }
- InputPanel {
- id: inputPanel
- z: 99
- x: 0
- y: main_window.height
- width: main_window.width
- states: State {
- name: "visible"
- when: inputPanel.active
- PropertyChanges {
- target: inputPanel
- y: main_window.height - inputPanel.height
- }
- }
- transitions: Transition {
- from: ""
- to: "visible"
- reversible: true
- ParallelAnimation {
- NumberAnimation {
- properties: "y"
- duration: 250
- easing.type: Easing.InOutQuad
- }
- }
- }
- }
- }
|