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) {
207 function turnToFullscreen() {
208 image.source = './images/fullscreen.png'
209 container.state = 'fullscreen'
210 container.opacity = 0.0
211 touchArea.switchArea(1)
214 function turnToNormal() {
215 image.source = './images/normal.png'
216 container.state = 'normal'
217 container.opacity = 1.0
218 touchArea.switchArea(0)
221 function enableSplitSwitchBtn() {
222 splitSwitchImage.source = './images/split_switch.png'
223 splitSwitchBtn.enableSplitSwitchBtn = true
226 function disableSplitSwitchBtn() {
227 splitSwitchImage.source = './images/split_switch_disable.png'
228 splitSwitchBtn.enableSplitSwitchBtn = false;
231 function switchSplitArea(val) {
232 homescreenHandler.changeLayout(val);