blob: 3b0a26c5f09746d9cd5b6b5ee00d1181a808f2b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
/**
* @licence app begin@
* SPDX-License-Identifier: MPL-2.0
*
* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
*
* \file NavigationSettings.qml
*
* \brief This file is part of the navigation hmi.
*
* \author Martin Schaller <martin.schaller@it-schaller.de>
* \author Philippe Colliot <philippe.colliot@mpsa.com>
*
* \version 1.1
*
* This Source Code Form is subject to the terms of the
* Mozilla Public License (MPL), v. 2.0.
* If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* For further information see http://www.genivi.org/.
*
* List of changes:
* 2014-03-05, Philippe Colliot, migration to the new HMI design
* <date>, <name>, <description of change>
*
* @licence end@
*/
import QtQuick 2.1
import "Core"
import "Core/genivi.js" as Genivi;
import "Core/style-sheets/style-constants.js" as Constants;
import "Core/style-sheets/NavigationAppSettings-css.js" as StyleSheet;
import lbs.plugin.dbusif 1.0
NavigationAppHMIMenu {
id: menu
property string pagefile:"NavigationAppSettings"
next: back
prev: back
DBusIf {
id:dbusIf;
}
NavigationAppHMIBgImage {
id: content
image:StyleSheet.navigation_app_settings_background[Constants.SOURCE];
anchors { fill: parent; topMargin: parent.headlineHeight}
Text {
x:StyleSheet.simulationTitle[Constants.X]; y:StyleSheet.simulationTitle[Constants.Y]; width:StyleSheet.simulationTitle[Constants.WIDTH]; height:StyleSheet.simulationTitle[Constants.HEIGHT];color:StyleSheet.simulationTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.simulationTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.simulationTitle[Constants.PIXELSIZE];
id:simulationTitle;
style: Text.Sunken;
smooth: true
text: Genivi.gettext("Simulation")
}
StdButton {
x:StyleSheet.simu_mode_enable[Constants.X]; y:StyleSheet.simu_mode_enable[Constants.Y]; width:StyleSheet.simu_mode_enable[Constants.WIDTH]; height:StyleSheet.simu_mode_enable[Constants.HEIGHT];
id:simu_mode; next:back; prev:preferences; disabled:false;
source:
{
if (Genivi.simulationMode==true)
{
source=StyleSheet.simu_mode_enable[Constants.SOURCE];
}
else
{
source=StyleSheet.simu_mode_disable[Constants.SOURCE];
}
}
function setState(name)
{
if (name=="ENABLE")
{
source=StyleSheet.simu_mode_enable[Constants.SOURCE];
}
else
{
source=StyleSheet.simu_mode_disable[Constants.SOURCE];
}
}
onClicked:
{
if (Genivi.simulationMode==true)
{ //hide the panel
Genivi.simulationMode=false;
simu_mode.setState("DISABLE");
}
else
{ //show the panel
Genivi.simulationMode=true;
simu_mode.setState("ENABLE");
}
}
}
StdButton {
source:StyleSheet.preferences[Constants.SOURCE]; x:StyleSheet.preferences[Constants.X]; y:StyleSheet.preferences[Constants.Y]; width:StyleSheet.preferences[Constants.WIDTH]; height:StyleSheet.preferences[Constants.HEIGHT];textColor:StyleSheet.preferencesText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.preferencesText[Constants.PIXELSIZE];
id:preferences; text: Genivi.gettext("Preference"); disabled:false; next:languageAndUnit; prev:back;
onClicked: {
entryMenu("NavigationAppSettingsPreferences",menu);
}
}
StdButton {
source:StyleSheet.languageAndUnit[Constants.SOURCE]; x:StyleSheet.languageAndUnit[Constants.X]; y:StyleSheet.languageAndUnit[Constants.Y]; width:StyleSheet.languageAndUnit[Constants.WIDTH]; height:StyleSheet.languageAndUnit[Constants.HEIGHT];textColor:StyleSheet.languageAndUnitText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.languageAndUnitText[Constants.PIXELSIZE];
id:languageAndUnit; text: Genivi.gettext("LanguageAndUnits"); disabled:false; next:back; prev:preferences;
onClicked: {
entryMenu("NavigationAppSettingsLanguageAndUnits",menu);
}
}
StdButton {
source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE];
id:back; text: Genivi.gettext("Back"); disabled:false; next:simu_mode; prev:languageAndUnit;
onClicked:{leaveMenu();}
}
}
Component.onCompleted: {
}
}
|