-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.qml
387 lines (371 loc) · 11.3 KB
/
main.qml
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
import QtQuick 2.5
import QtQuick.Window 2.1
import QtQuick.Controls 1.4
import QtQuick.Dialogs 1.2
import QtGraphicalEffects 1.0
ApplicationWindow {
id: app
visibility: Window.FullScreen;
// width: app.width
// height: app.height
visible: true
title: qsTr("Infoscreen")
property color bgColor: "transparent"
property color txtColor: "transparent"
readonly property int bgcount : 4
property int currentSlide: 4
function tcp_change(pZoom,pArea,pPage) {
// view.currentIndex=pArea;
// view.incrementCurrentIndex()
switch (pArea) {
case 4: bgimg.source = "qrc:/rsrc/Vakioruutu.jpg";
bgimg.scale = 1;
currentSlide = 4;
break;
case 3: bgimg.source = "qrc:/rsrc/Stepperit_servot.jpg";
bgimg.scale = 1;
currentSlide = 3;
break;
case 2: bgimg.source = "qrc:/rsrc/3d-printtaus.jpg";
bgimg.scale = 1;
currentSlide = 2;
break;
case 1: bgimg.source = "qrc:/rsrc/Skannerit 1.jpg";
bgimg.scale = 1;
currentSlide = 1;
break;
case 6: bgimg.source = "qrc:/rsrc/Hubble.jpg";
bgimg.scale = (pZoom+100)/100;
currentSlide = 6;
break;
case 5: if (currentSlide === 1 && pPage === 2) {
bgimg.source = "qrc:/rsrc/Skannerit 2.jpg";
console.info("wjat");
currentSlide = 11;
} else if (currentSlide === 11 && pPage !== 0) {
bgimg.source = "qrc:/rsrc/Skannerit 1.jpg";
currentSlide = 1;
console.info("the wjat");
}
console.info("case 5");
break;
default: break;
}
}
signal currentItemChanged(int current)
property alias current: view.currentIndex
// onCurrentChanged: {
// //topcornerimage.visible = falscreen_anglese
// //bottomcornerimage.visible = false
// if(current==0)
// bgimg.source = "qrc:/rsrc/Vakioruutu.jpg"
// else if(current % bgcount == 0)
// {
// bgimg.source = "qrc:/rsrc/Skannerit 1.jpg"
// }
// else if(current % bgcount == 1)
// {
// bgimg.source = "qrc:/rsrc/Skannerit 2.jpg";
// }
// else if(current % bgcount == 2)
// {
// bgimg.source = "qrc:/rsrc/Stepperit_servot.jpg";
// // topcornerimage.visible = true
// }
// else if(current % bgmyQmlFunctioncount == 3)
// {
// bgimg.source = "qrc:/rsrc/3d-printtaus.jpg";
// // topcornerimage.visible = true
// }
/*
else if(current % 9 == 4)screen_angle
{
bgimg.source = "qrc:/rsrc/dragon.jpg";
// topcornerimage.visible = true
}
else if(current % 9 == 5)
{
bgto listviewimg.source = "qrc:/rsrc/cloud.jpg";
// topcornerimage.visible = true
}
else if(current % 9 == 7)
{
bgimg.source = "qrc:/rsrc/square.jpg";
// topcornerimage.visible = true
}
else if(current % 9 == 8)
{
bgimg.source = "qrc:/rsrc/nyc.jpg";
// topcornerimage.visible =screen_angle true
}*/
// }
ListModel {
id: qtConModel
ListElement {
name: "Intro"
path: "01_qtCon_intro.qml"
time: 1
next: "rcse"
}
ListElement {
name: "Rolisteam CharacterSheet Editor"
path: "02_qtCon_rcse.qml"
time: 1
next: "stay in touch"
}
ListElement {
name: "Stay In Touch"
path: "03_qtCon_stayintouch.qml"
time: 1
next: ""
}
}
ListModel {
id: panelModel
ListElement {
name: "Intro"
path: "01_intro.qml"
time: 1
next: "Présentation de Rolisteam"
}
ListElement {
name: "Présentation de Rolisteam"
path: "02_presentation.qml"
time: 1
next: "définition Jdr"
}
ListElement {
name: "Introduction au jdr"
path: "03_jdr_et_rolisteam.qml"
time: 1
next: "Les contraintt childes"
}
ListElement {
name: "Contraintes"
path: "04_jdr_avantages_pb.qml"
time: 1
next: "Avantages de l'informatique"
}
ListElement {
name: "Le jdr virtuel le plus"
path: "05_avantage_jdr_virtuel.qml"
time: 1
next: "Fonctionnalités"
}
ListElement {
name: "Fonctionnalités Rolisteam"
path: "06_fonctionnalites_rolisteam.qml"
time: 1
next: "Système de dés"
}
ListElement {
name: "Dice Parser"
path: "13_dice_parser.qml"
time: 1
next: "RCSE"
}
ListElement {
name: "RCSE"
path: "14_rcse.qml"
time: 1
next: "Son usage"
}
/*ListElement {
name: "Les Nouveautés 1.9"
path: "15_nouveaute_1_8.qml"
time: 1
next: "À vto listviewenir"
}*/
/*ListElement {
name: "Début de rolisteam"
pathQListBox *list = Q_CHILD( parent, QListBox, "list" );: "07_rolisteam_debut.qml"
time: 1
next: "rolistik à rolisteam"
}*/
/* ListElement {
name: "Rolistik à Rolisteam"
path: "08_Rolistik_a_Rolisteam.qml"
time: 1
next: "Frise"
}*/
/*ListElement {
name: "La frise"
path: "10_frise_chronologique.qml"
time: 1
next: "Usage"
}*/
ListElement {
name: "Son usage"
path: "11_son_usage.qml"
time: 1
next: "Fonctionnement"
}
ListElement {
name: "Son fonctionnement"
path: "12_son_fonctionnement.qml"
time: 1
next: "L'avenir"
}
ListElement {
name: "Projets d'avenir"
path: "16_projet_avenir.qml"
time: 1
next: "Réussites"
}
ListElement {
name: "Réussites"
path: "17_reussites.qml"
time: 1
next: "Leçons"
}
ListElement {
name: "Les leçons"
path: "18_les_lecons.qml"
time: 1
next: "Libre et Rolisteam"
}
ListElement {
name: "Objectif Rolisteam Libre"
path: "19_objectif_rolisteam_libre.qml"
time: 1
next: "Need You"
}
ListElement {
name: "Rolisteam a besoin de vous "
path: "19_grafilabor.qml"
time: 1
next: "Fin FAQ"
}
ListElement {
name: "Fin "
path: "20_FAQ.qml"
time: 1
next: ""
}
/*ListElement {
name: "Contact"
path: "03_qtCon_stayintouch.qml"
time: 1
next: ""
}*/
}
//Component.onCompleted: app.currentItemChanged(0)
/* onVisibleChanged: trigger.start()
Rectangle {
id: rect
anchors.fill: parent
color: app.bgColor
}*/
Image {
id: bgimg
anchors.fill: parent
// fillMode: Image.Center
source: "qrc:/rsrc/Vakioruutu.jpg"
verticalAlignment: Image.AlignBottom
}
onVisibleChanged: trigger.start()
PathView {
id: view
anchors.fill: parent
model: panelModel
highlightRangeMode:PathView.StrictlyEnforceRange
snapMode: PathView.SnapOneItem
delegate: Loader {
//property variant model: model
source: "pages/"+path
width: app.width
height: app.height
}
onOffsetChanged: {
if(Math.floor(offset)===offset)
{
//app.currentItemChanged(offset)
trigger.start()
}
}
focus: true
Keys.onLeftPressed: {
decrementCurrentIndex()
}
Keys.onRightPressed:{
incrementCurrentIndex()
}
Keys.onEscapePressed: {
if(app.visibility === Window.FullScreen)
{
app.visibility = Window.Windowed;
}
else
{
app.visibility = Window.FullScreen;
}
}
path: Path {
startX: view.width/2
startY: view.height/2
PathLine { x: view.width/2+view.width*panelModel.count; y: view.height/2 }
}
}
ListView {
id: listView1
x: app.width*0.02
y: app.height*0.3
width: parent.width/2
height: app.height*0.2
delegate: Item {
width: parent.width
height: listView1.height/listView1.count
Text {
color: view.currentIndex>=index ? "black" : "gray"
text: name
font.pointSize: (app.height >100 ? app.height : 800)/48
anchors.verticalCenter: parent.verticalCenter
font.bold: true
}
}
visible: false //view.currentIndex>0 ? true : false
model: ListModel {
ListElement {
name: "Overview"
index:1
}
ListElement {
name: "Scanner_1"
index:2
}
ListElement {
name: "Stepper"
index:3
}
ListElement {
name: "3dprint"
index:4
}
}
}
Text {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: 50
anchors.bottomMargin: 50
color: app.txtColor
text: (view.currentIndex+1)+"/"+view.count
visible: false
// visible: view.currentIndex>0 ? true : false
}
Image {
anchors.fill: parent
source: "qrc:/rsrc/Masque-Video.png"
//opacity: 0.5
fillMode: Image.Pad
visible: false
}
Text {
anchors.top: parent.top
color: app.txtColor
anchors.right: parent.right
text: panelModel.get(view.currentIndex).next+">"
visible: false
// visible: panelModel.get(view.currentIndex).next !== "" ? true : false
}
}