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) {
197 function turnToFullscreen() {
198 image.source = './images/fullscreen.png'
199 container.state = 'fullscreen'
200 container.opacity = 0.0
201 touchArea.switchArea(1)
204 function turnToNormal() {
205 image.source = './images/normal.png'
206 container.state = 'normal'
207 container.opacity = 1.0
208 touchArea.switchArea(0)
211 function enableSplitSwitchBtn() {
212 splitSwitchImage.source = './images/split_switch.png'
213 splitSwitchBtn.enableSplitSwitchBtn = true
216 function disableSplitSwitchBtn() {
217 splitSwitchImage.source = './images/split_switch_disable.png'
218 splitSwitchBtn.enableSplitSwitchBtn = false;
221 function switchSplitArea(val) {
222 homescreenHandler.changeLayout(val);