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
36 source: './images/menubar_fullscreen_background.png'
41 anchors.centerIn: parent
45 source: './images/menubar_background.png'
55 anchors.horizontalCenter: parent.horizontalCenter
56 Layout.preferredHeight: 80
62 Layout.fillWidth: true
63 Layout.fillHeight: true
64 Layout.preferredHeight: 510
74 anchors.horizontalCenter: parent.horizontalCenter
75 Layout.fillHeight: true
76 Layout.preferredHeight: 130
91 target: applicationArea
110 target: applicationArea
119 transitions: Transition {
123 easing.type: "OutQuad"
127 target: applicationArea
129 easing.type: "OutQuad"
135 easing.type: "OutQuad"
145 anchors.right: parent.right
146 anchors.rightMargin: 17
147 anchors.top: parent.top
148 anchors.topMargin: 182
154 anchors.centerIn: parent
155 source: './images/normal.png'
160 property string btnState: 'normal'
162 if (container.state === 'normal') {
175 anchors.right: switchBtn.left
176 anchors.top: parent.top
177 anchors.topMargin: 182
179 property bool enableSplitSwitchBtn: false
184 anchors.centerIn: parent
185 source: './images/split_switch_disable.png'
189 property bool changed : false
192 if (splitSwitchBtn.enableSplitSwitchBtn) {
210 anchors.left: parent.left
211 anchors.top: parent.top
216 homescreenHandler.reboot();
222 function turnToFullscreen() {
223 image.source = './images/fullscreen.png'
224 container.state = 'fullscreen'
225 container.opacity = 0.0
226 touchArea.switchArea(1)
229 function turnToNormal() {
230 image.source = './images/normal.png'
231 container.state = 'normal'
232 container.opacity = 1.0
233 touchArea.switchArea(0)
236 function enableSplitSwitchBtn() {
237 splitSwitchImage.source = './images/split_switch.png'
238 splitSwitchBtn.enableSplitSwitchBtn = true
241 function disableSplitSwitchBtn() {
242 splitSwitchImage.source = './images/split_switch_disable.png'
243 splitSwitchBtn.enableSplitSwitchBtn = false;
246 function switchSplitArea(val) {
247 homescreenHandler.changeLayout(val);