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"
135 anchors.right: parent.right
136 anchors.rightMargin: 17
137 anchors.top: parent.top
144 anchors.centerIn: parent
145 source: './images/normal.png'
150 property string btnState: 'normal'
152 if (container.state === 'normal') {
165 anchors.right: switchBtn.left
166 anchors.top: parent.top
169 property bool enableSplitSwitchBtn: false
174 anchors.centerIn: parent
175 source: './images/split_switch_disable.png'
179 property bool changed : false
182 if (splitSwitchBtn.enableSplitSwitchBtn) {
200 anchors.left: parent.left
201 anchors.top: parent.top
206 homescreenHandler.reboot();
212 function turnToFullscreen() {
213 image.source = './images/fullscreen.png'
214 container.state = 'fullscreen'
215 container.opacity = 0.0
216 touchArea.switchArea(1)
219 function turnToNormal() {
220 image.source = './images/normal.png'
221 container.state = 'normal'
222 container.opacity = 1.0
223 touchArea.switchArea(0)
226 function enableSplitSwitchBtn() {
227 splitSwitchImage.source = './images/split_switch.png'
228 splitSwitchBtn.enableSplitSwitchBtn = true
231 function disableSplitSwitchBtn() {
232 splitSwitchImage.source = './images/split_switch_disable.png'
233 splitSwitchBtn.enableSplitSwitchBtn = false;
236 function switchSplitArea(val) {
237 homescreenHandler.changeLayout(val);