2 * Copyright (C) 2016 The Qt Company Ltd.
3 * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 import QtQuick.Window 2.1
20 import QtQuick.Layouts 1.1
25 flags: Qt.FramelessWindowHint
26 width: container.width * container.scale
27 height: container.height * container.scale
33 anchors.centerIn: parent
37 source: './images/menubar_background.png'
45 anchors.horizontalCenter: parent.horizontalCenter
46 Layout.preferredHeight: 80
52 Layout.fillWidth: true
53 Layout.fillHeight: true
54 Layout.preferredHeight: 510
64 anchors.horizontalCenter: parent.horizontalCenter
65 Layout.fillHeight: true
66 Layout.preferredHeight: 130
81 target: applicationArea
100 target: applicationArea
109 transitions: Transition {
113 easing.type: "OutQuad"
117 target: applicationArea
119 easing.type: "OutQuad"
125 easing.type: "OutQuad"
139 anchors.right: parent.right
140 anchors.top: parent.top
146 anchors.right: parent.right
147 anchors.rightMargin: 20
148 anchors.top: parent.top
150 source: './images/normal.png'
155 property string btnState: 'normal'
157 if (container.state === 'normal') {
165 function turnToFullscreen() {
166 image.source = './images/fullscreen.png'
167 container.state = 'fullscreen'
168 container.opacity = 0.0
169 touchArea.switchArea(1)
171 function turnToNormal() {
172 image.source = './images/normal.png'
173 container.state = 'normal'
174 container.opacity = 1.0
175 touchArea.switchArea(0)