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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
|
import QtQuick 2.0
import QtQml.Models 2.1
import QtQuick.Layouts 1.3
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtGraphicalEffects 1
import QtQuick.Window 2
import Qt.labs.settings 1.0
import QtQuick.Dialogs 1.1
Rectangle {
id: box
width: 1000 * Screen.devicePixelRatio; height: 650 * Screen.devicePixelRatio
property alias view: view
//: For Right to Left language, set this string to RTL
property var direction: qsTr("LTR")
LayoutMirroring.enabled: (direction == "LTR" ? false : true)
// for tests
//LayoutMirroring.enabled: true
LayoutMirroring.childrenInherit: true
Settings {
property alias width: box.width
property alias height: box.height
}
Component {
id: slidebackground
LinearGradient {
start: Qt.point(0, 0)
end: Qt.point(0, box.height)
gradient: Gradient {
GradientStop { position: 1.0; color: "#2397D4" }
GradientStop { position: 0.0; color: "#262F45" }
}
}
}
Rectangle {
id: banner
opacity: 0.95
layer.enabled: true
width: parent.width;height: 120
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 400)
gradient: Gradient {
GradientStop { position: 0.0; color: "lightgray" }
GradientStop { position: 1.0; color: "white" }
}
}
Image {
anchors.fill: parent
anchors.bottomMargin: 10
anchors.topMargin: 10
source: "img/mageia-2013-black-alpha.png"
fillMode: Image.PreserveAspectFit
}
}
Rectangle {
id: slideshow
property Item displayItem: null
anchors {left: parent.left; top: buttonbox.bottom; bottom: parent.bottom; right: parent.right}
color: "#2397D4"
width: parent.width
ObjectModel {
id: itemModel
// Welcome page
Rectangle {
//: the button in buttons bar
property var title: qsTr("Welcome")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
anchors.centerIn: parent
anchors.verticalCenter: parent.verticalCenter
Label {
//: the %1 will be replaced with the user name
anchors.horizontalCenter: parent.horizontalCenter
horizontalAlignment: TextInput.AlignHCenter
text: qsTr("Welcome to Mageia, %1").arg(user)+'\n'
font.weight: Font.DemiBold
font.pixelSize: Qt.application.font.pixelSize * 1.5
color: "white"
}
Label {
horizontalAlignment: TextInput.AlignHCenter
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("We are going to guide you through a few important steps and help<BR />you with the configuration of your newly installed system.<BR /><BR />Now, click on <i>Media sources</i> to go to the first step.");
textFormat: Text.RichText
color: "white"
}
}
}
// Configure source page
Rectangle {
property var title: qsTr("Media sources")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
//Column {
//anchors.left: parent.left
// y: 10
GridLayout {
columns: 2
Label {
Layout.columnSpan: 2
Layout.topMargin: 10
Layout.leftMargin: 10
text: qsTr("Configure software repositories"); font.bold: true;
color: "white" }
Label {
Layout.columnSpan: 2
Layout.topMargin: 10
Layout.leftMargin: 10
text: qsTr("Mageia official repositories contain:");
color: "white" }
Button {id: coreBg
Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
//height: Qt.application.font.pixelSize * 1.3
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
//: Should be as displayed in software manager, thus in general not translated
text: qsTr("core");
font.bold: true; color: "black";
}
background: Rectangle {
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 20)
gradient: Gradient {
GradientStop { position: 0.0; color: "lightgreen" }
GradientStop { position: 1.0; color: "green" }
}
}
}
}
}
Label {
text: qsTr("- the free-open-source packages");
wrapMode: Text.WordWrap
Layout.maximumWidth: slideshow.width -20 - coreBg.width
color: "white"
}
Button {
Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
//: Should be as displayed in software manager, thus in general not translated
text: qsTr("nonfree");
font.bold: true; color: "white";
}
background: Rectangle {
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 20)
gradient: Gradient {
GradientStop { position: 0.0; color: "red" }
GradientStop { position: 1.0; color: "darkred" }
}
}
}
}
}
Label {
width: parent.width
text: qsTr("- closed-source programs, e.g. Nvidia proprietary drivers, non-free drivers for some Wi-Fi cards, etc");
Layout.maximumWidth: slideshow.width - 110
wrapMode: Text.WordWrap
color: "white"
}
Button {
Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
//: Should be as displayed in software manager, thus in general not translated
text: qsTr("tainted");
font.bold: true; color: "white";
}
background: Rectangle {
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 20)
gradient: Gradient {
GradientStop { position: 0.0; color: "red" }
GradientStop { position: 1.0; color: "darkred" }
}
}
}
}
}
Label {
text: qsTr("- these packages (eg audio and video codecs needed for certain multimedia files or commercial DVDs) may infringe on patents or copyright laws in certain countries. ");
wrapMode: Text.WordWrap
Layout.maximumWidth: slideshow.width -110
color: "white"
}
Button {
Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
//: Should be as displayed in software manager, thus in general not translated
text: qsTr("backports");
font.bold: true; color: "black";
}
background: Rectangle {
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 20)
gradient: Gradient {
GradientStop { position: 0.0; color: "lightgray" }
GradientStop { position: 1.0; color: "darkgray" }
}
}
}
}
}
Label {
text: qsTr("- include new versions of packages, and new packages, that do not meet the updates policy.");
wrapMode: Text.WordWrap
Layout.maximumWidth: slideshow.width -110
color: "white"
}
Button {
Layout.margins: 5
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
text: qsTr("Note! ");
font.bold: true; color: "black";
}
background: Rectangle {
color: "#e6c200";
}
}
}
Label { text: qsTr("If you enabled the online repositories during installation, some media sources should be installed already. Otherwise, we will now configure these online repositories.
If this computer will have access to the Internet, you can delete the <i>Local</i> entry from the list of repositories.");
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
Layout.fillWidth: true
Layout.maximumWidth: slideshow.width - 110
}
Label { text: qsTr("Now, please enable or disable the online repositories of your choice: click on the <i>Edit software repositories</i> button. Select at least the <i>release</i> and <i>updates</i> pair. <i>Debug</i> and <i>Testing</i> are for special cases.")+"<BR />"+
qsTr("After you have checked and enabled the repositories you need, you can go to the next slide.")
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
Layout.fillWidth: true
Layout.maximumWidth: slideshow.width - 10
Layout.columnSpan: 2
Layout.margins: 10
}
MButton {
Layout.maximumWidth: slideshow.width * .40
Layout.columnSpan: 2
Layout.alignment: Qt.AlignHCenter
objectName: "launch"
onMbuttonClicked: { launch.command(["drakrpm-edit-media",])}
buttonText: qsTr("Edit software sources")+" *"
}
}
Label {
anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) Administrator password is needed.")
Layout.maximumWidth: slideshow.width * .4
font.italic: true
color: "white"
}
}
// Update page
Rectangle {
property var title: qsTr("Update")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
spacing: 10
Label { text: qsTr("How Mageia manages updates"); font.bold: true;
topPadding: 30 ; leftPadding: 20
color: "white"}
Label {
width: slideshow.width - 40
padding: 20
text: qsTr("Mageia provides software which may be updated in order to fix bugs or security issues. It is highly recommended that you update your system regularly. \
An Update icon will appear in your task bar when new updates are available. To run the updates, just click on the icon below and give your user password - or use the Software Manager (root password). \
This is a background process and you will be able to use your computer normally during the updates."+"\n");
wrapMode: Text.WordWrap
color: "white"
}
MButton {
anchors.horizontalCenter: parent.horizontalCenter
objectName: "launch"
onMbuttonClicked: { launch.command(["drakrpm-update",])}
buttonText: qsTr("Check system updates")+" *"
}
MButton {
anchors.horizontalCenter: parent.horizontalCenter
objectName: "link"
//: (en) indicates that the content of the link is in English
onMbuttonClicked: { link.weblink("https://advisories.mageia.org/")}
buttonText: qsTr("Advisories of updates (en)")
}
}
Label {
anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) User password is needed")
wrapMode: Text.WordWrap
font.italic: true
color: "white"
}
}
// MCC Page
Rectangle {
//: The button in the buttons bar, shortcut for Mageia Control Center
property var title: qsTr("MCC")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
x: 10; y: 30
spacing: 10
Label {
text: qsTr("<b>Mageia Control Center</b> (aka drakconf) is a set of tools to help you configure your system.")
width: view.width * 0.9
padding: 10
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
}
Label {
padding: 5
anchors.horizontalCenter: parent.horizontalCenter
text: "<ul><li>"+qsTr("Software Management")+"</li><li>"
+ qsTr("Hardware")+"</li><li>"
+ qsTr("Network and Internet")+"</li><li>"
+ qsTr("System")+"</li><li>"
+ qsTr("Network Sharing")+"</li><li>"
+ qsTr("Local Disks")+"</li><li>"
+ qsTr("Security")+"</li><li>"
+ qsTr("Boot")+"</li></ul>";
wrapMode: Text.WordWrap;textFormat: Text.RichText
color: "white"
}
MButton {
anchors.horizontalCenter: parent.horizontalCenter
objectName: "launch"
onMbuttonClicked: { launch.command(["drakconf",])}
buttonText: qsTr("Mageia Control Center")+" *"
}
MButton {
anchors.horizontalCenter: parent.horizontalCenter
objectName: "link"
onMbuttonClicked: { link.weblink("https://www.mageia.org/doc")}
buttonText: qsTr("MCC documentation")
}
}
Label {
anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) Administrator password is needed")
wrapMode: Text.WordWrap
font.italic: true
color: "white"
}
}
// Install software page
Rectangle {
property var title: qsTr("Install software")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
Label {
text: qsTr("Install and remove software")
width: slideshow.width
topPadding: 30; leftPadding: 20;
padding: 10
font.bold: true
wrapMode: Text.WordWrap
color: "white"
}
Label {
text: qsTr("With Mageia, you will find the software in the media repositories. Mageia users simply access these media via one of the Software Managers.");
width: slideshow.width
padding: 20
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
}
MButton {
anchors.left: parent.left; anchors.leftMargin: 20;
width: slideshow.width * .35
objectName: "launch"
onMbuttonClicked: { launch.command(["rpmdrake",])}
buttonText: qsTr("RPMdrake")+" *"
}
Label {
text: qsTr("The next slide shows a small selection of popular applications - any of which may be installed at this point.<BR/>");
width: slideshow.width
padding: 20
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
}
Label {
text: qsTr("You can find a more detailed list here:");
width: slideshow.width
padding: 20
wrapMode: Text.WordWrap
textFormat: Text.RichText
color: "white"
}
MButton {
anchors.left: parent.left; anchors.leftMargin: 20
width: slideshow.width * .35
objectName: "link"
//: Translate only if the link is to a specific page for your language
onMbuttonClicked: { link.weblink(qsTr("https://wiki.mageia.org/en/List_of_applications"))}
buttonText: qsTr("List of applications (wiki)")
}
}
Label {
anchors {top: parent.bottom; topMargin: 3; horizontalCenter: parent.left; horizontalCenterOffset: parent.width * .4 }
text: qsTr("(*) Administrator password is needed")
wrapMode: Text.WordWrap
font.italic: true
color: "white"
}
}
// Applications page
function update_list(group) {
appListDM.items.remove(0,appListDM.count );
var rowCount = appList.count;
for( var i = 0;i < rowCount;i++ )
{
var entry = appList.get(i);
var pattern = new RegExp(group, "g");
if(pattern.test(entry.group) && !pyinstallable.other(entry.name, entry.repo)) {
appListDM.items.insert(entry, "group");
}
}
for(var child in applicationsListView.contentItem.children) {
if (applicationsListView.contentItem.children[child].naturalwidth > softListRect.installwidth ) {
softListRect.installwidth = applicationsListView.contentItem.children[child].naturalwidth
}
}
appListDM.filterOnGroup = "items";
}
Rectangle {
property var title: qsTr("Applications")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
Rectangle {
// warning banner
id: warning
width: view.width
height: warnText.height
color: "gold"
Label {
id: warnText
width: view.width
horizontalAlignment: TextInput.AlignHCenter
font.pixelSize: Qt.application.font.pixelSize * .9
text: qsTr("Here is a small selection of popular applications - any of which may be installed or launched at this point.")+"<BR />"+qsTr("Ensure that you have enabled the <i>Media sources</i>.")
textFormat: Text.RichText
wrapMode: Text.WordWrap
color: "black"
font.weight: Font.DemiBold
}
}
Item {
width: row.width
height: 200
Row {
id: row
// Under the warning
// Software categories
Component { //The hightlight
id: catHighlight
Rectangle {
width: categoriesList.width
height: Qt.application.font.pixelSize + 16
color: "#262F45"
y: categoriesList.currentItem.y;
}
}
ListView {
id:categoriesList
width: 190
highlight: catHighlight
highlightFollowsCurrentItem: false
focus: true
model: [{'name': qsTr("Featured"), 'group': "featured"},
{'name': qsTr("Games"),'group': "games"},
{'name':qsTr("Internet"),'group': "internet"},
{'name':qsTr("Video"),'group': "video"},
{'name':qsTr("Audio"),'group': "audio"},
{'name':qsTr("Office"),'group': "office"},
{'name':qsTr("Graphics"),'group': "graphics"},
{'name':qsTr("System"),'group': "system"},
{'name':qsTr("Programming"),'group': "programming"}]
height: (Qt.application.font.pixelSize + 16) * 9
delegate: Rectangle{
property variant myGroup: modelData.group
width: parent.width
height: Qt.application.font.pixelSize + 16
color:"#20FFFFFF"
Label {id: catLabel;
anchors.horizontalCenter: parent.horizontalCenter
text: modelData.name ;
padding: 7
color: "white"
}
MouseArea {
anchors.centerIn: parent
width: parent.width
height: 25
onClicked: {
categoriesList.currentIndex = index;
itemModel.update_list(modelData.group);
}
}
}
}
Rectangle {
// Software list
id: softListRect
height: view.height
width: view.width - categoriesList.width
color: "transparent"
// the width of install and Launch button will be calculated then updated. We give here a minimal size
property real installwidth: Qt.application.font.pixelSize * 2
DelegateModel {
id: appListDM
model: AppList {id: appList}
groups: [
DelegateModelGroup {
includeByDefault: false
name: "group"
}
]
filterOnGroup: "group"
Component.onCompleted: {
var rowCount = appList.count;
items.remove(0,rowCount);
for( var i = 0;i < rowCount;i++ )
{
var entry = appList.get(i);
var pattern = /featured/g;
if(pattern.test(entry.group) && !pyinstallable.other(entry.name, entry.repo) ) {
items.insert(entry, "group");
}
}
// The lsit has to be painted first for buttons width evaluation
applicationsListView.forceLayout()
for(var child in applicationsListView.contentItem.children) {
if (applicationsListView.contentItem.children[child].naturalwidth > softListRect.installwidth ) {
softListRect.installwidth = applicationsListView.contentItem.children[child].naturalwidth
}
}
console.log("Screen: ", Screen.devicePixelRatio, Screen.pixelDensity)
}
delegate: Row {
spacing: 10
property int naturalwidth : optButton.item.implicitWidth
Image {
source: icon
width: 32
height: 32
}
//CheckBox{ enabled: installable
//}
Column{
Label {
text: title
font.weight: Font.DemiBold
color: "white"
}
Label {
text: description
font.italic: true
font.pixelSize: Qt.application.font.pixelSize * .9
width: view.width - (190 + 44 +38 + softListRect.installwidth + tag.width )
wrapMode: Text.WordWrap
color: "white"
}
}
Loader {
id: optButton
Component { id: button;
Button {
width: softListRect.installwidth;
height: Qt.application.font.pixelSize * 1.3
objectName: "launch"
onClicked: {
launch.command(["gurpmi",name,])}
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
verticalAlignment: TextInput.AlignVCenter
text: qsTr("Install");
font.pixelSize: Qt.application.font.pixelSize * .8
color: "black"
}
}
}
}
Component { id: launcher;
Button {
width: softListRect.installwidth;
height: Qt.application.font.pixelSize * 1.3
objectName: "launch"
onClicked: {
launch.command([command,])}
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
verticalAlignment: TextInput.AlignVCenter
text: qsTr("Launch");
font.pixelSize: Qt.application.font.pixelSize * .8
color: "black"
}
}
}
}
Component { id: dummy;Label {text: qsTr("Installed")
padding: 2
horizontalAlignment: TextInput.AlignHCenter
font.pixelSize: Qt.application.font.pixelSize * .8
width: softListRect.installwidth
color: "white"
}
}
sourceComponent: ( pyinstallable.installable(name, repo)) ? button : (command === "" ? dummy : launcher)
}
Loader {
id: tag
Component {
id: repotag
Rectangle {
color: "#FF4C4C"
radius: 3
width: Qt.application.font.pixelSize * 3.5; height: Qt.application.font.pixelSize * 1.3
Label {
anchors.centerIn: parent
text: repo
font.pixelSize: Qt.application.font.pixelSize * .8
color: "white"
}
}
}
Component { id: dumm;
Label {
width: Qt.application.font.pixelSize * 3.5;
text: " "}}
sourceComponent: repo == "" ? dumm : repotag
}
}
}
Rectangle {
height: view.height-warning.height
width: view.width-200
color: "transparent"
ListView {
id: applicationsListView
anchors.fill: parent
clip: true
model: appListDM
spacing: 5
}
}
}
}
}
}
}
// Configuration summary Page
Rectangle {
Version {id:version}
property var title: qsTr("Your configuration")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
Rectangle{
height: 50
width:1
color:"transparent"
}
ListView {
id: confList
width: view.width
height: view.height -150
model: ConfList
delegate: Label {
text: name
leftPadding: 50
textFormat: Text.RichText
color: "white"
}
}
MButton {
anchors.horizontalCenter: parent.horizontalCenter
objectName: "launch"
onMbuttonClicked: { about.open() }
buttonText: qsTr("About")
}
MessageDialog {
id: about
title: qsTr("About Mageiawelcome")
//: %1 will be replaced with the release number, %2 with author's names
text: qsTr("Release %1<br />Authors : %2").arg(version.version).arg("Daniel Napora, Papoteur, Antony Baker<br />")
//: replace with the list of translator's names
detailedText: qsTr("Translators: English is the source language")
standardButtons: StandardButton.Close
}
}
}
// Links page
Rectangle {
property var title: qsTr("More information")
width: view.width; height: view.height
Loader { sourceComponent: slidebackground ;
anchors.fill: parent}
Column {
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
Grid {
columns: 3
spacing: view.width * .03
Label {
horizontalAlignment: TextInput.AlignHCenter
width: view.width * .2
text: qsTr("Documentation")
wrapMode: Text.WordWrap
font.bold: true
color: "white"
}
Label {
horizontalAlignment: TextInput.AlignHCenter
width: view.width * .2
text: qsTr("Support")
wrapMode: Text.WordWrap
font.bold: true
color: "white"
}
Label {
horizontalAlignment: TextInput.AlignHCenter
width: view.width * .2
text: qsTr("Community")
wrapMode: Text.WordWrap
font.bold: true
color: "white"
}
Repeater{
model: [{'name': qsTr("Release notes"), 'url':
//: Translate only if the link is to a specific page for your language
qsTr("https://wiki.mageia.org/en/Mageia_7_Release_Notes")},
{'name': qsTr("Forums"),'url':
//: Translate only if the link is to a specific page for your language
qsTr("https://forums.mageia.org/en/")},
{'name': qsTr("Community Center"),'url': "https://www.mageia.org/community/"},
{'name': qsTr("Errata"), 'url':
//: Translate only if the link is to a specific page for your language
qsTr("https://wiki.mageia.org/en/Mageia_7_Errata")},
{'name': qsTr("Wiki"), 'url':
//: Translate only if the link is to a specific page for your language
qsTr("https://wiki.mageia.org/en/Documentation")},
{'name': qsTr("Contribute"),'url': "https://www.mageia.org/contribute/"},
{'name': qsTr("Newcomers Howto"),'url':
//: Translate only if the link is to a specific page for your language
qsTr("https://wiki.mageia.org/en/Newcomers_start_here")},
{'name': qsTr("Chat Room"),
//: Translate only if the link is to a specific page for your language
'url': qsTr("irc://irc.freenode.net/#mageia")},
{'name': qsTr("Donations"),'url': "https://www.mageia.org/donate/"},
{'name': qsTr("Documentation"),'url': "https://www.mageia.org/doc/"},
{'name': qsTr("Bugs tracker"),'url': "https://bugs.mageia.org/"},
{'name': qsTr("Join us!"),'url': "https://identity.mageia.org/"}]
delegate: Button {
width: view.width * .2
objectName: "link"
onClicked: { link.weblink(modelData.url)}
style: ButtonStyle {
label: Label {
text: modelData.name
horizontalAlignment: TextInput.AlignHCenter
color: "black"
width: parent.width
wrapMode: Text.WordWrap }
background: Rectangle {
color: "lightgrey"
radius: 5
}
}
}
}
}
}
}
}
ListView {
id: view
z: 1
anchors.rightMargin: 0
anchors.leftMargin: 0
anchors.topMargin: 0
anchors { fill: parent; bottomMargin: startCB.implicitHeight +10 }
model: itemModel
preferredHighlightBegin: 0; preferredHighlightEnd: 0
highlightRangeMode: ListView.StrictlyEnforceRange
orientation: ListView.Horizontal
snapMode: ListView.SnapOneItem; flickDeceleration: 2000
highlightFollowsCurrentItem: true
highlightMoveDuration: 800
cacheBuffer: 200
}
}
Rectangle {
id: buttonbox
width: banner.width; height: buttonRow.height
anchors { top: banner.bottom; }
color: "#262F45"
RowLayout {
id: buttonRow
Rectangle {
Layout.preferredWidth: 8
Layout.preferredHeight: buttonbox.height
color: buttonbox.color
}
Repeater {
model: itemModel.count
Button {
Layout.fillHeight: true
Layout.preferredWidth: (buttonbox.width - 8)/8-9;
Layout.topMargin: 6
Layout.bottomMargin: 6
style: ButtonStyle {
background: Rectangle {
radius: 5
color: view.currentIndex == index ? "#2397D4" : "white"
}
label: Label{
text: itemModel.get(index).title
font.pointSize: 9
color: view.currentIndex == index ? "white" : "#262F45"
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
wrapMode : Text.WordWrap
}
}
onClicked: view.currentIndex = index
}
}
}
}
Row {
anchors.right: box.right
anchors.bottom: box.bottom
anchors.margins: 6
CheckBox {
id:startCB
text: qsTr("Show this window at startup")
checked: startupcheck
onClicked: norun.setRunAtLaunch(checked)
}
}
Connections {
target: launch
onInstalled: {
// get the signal to reload the applist
console.log("Reload applications list")
itemModel.update_list(categoriesList.currentItem.myGroup)
}
}
}
|