Warning, /plasma-bigscreen/calamares-bigscreen-branding/bigscreen/show.qml is written in an unsupported language. File is not indexed.

0001 /* === This file is part of Calamares - <https://calamares.io> ===
0002  *
0003  *   SPDX-FileCopyrightText: 2015 Teo Mrnjavac <teo@kde.org>
0004  *   SPDX-FileCopyrightText: 2018 Adriaan de Groot <groot@kde.org>
0005  *   SPDX-License-Identifier: GPL-3.0-or-later
0006  *
0007  *   Calamares is Free Software: see the License-Identifier above.
0008  *
0009  */
0010 
0011 import QtQuick 2.0;
0012 import calamares.slideshow 1.0;
0013 
0014 Presentation
0015 {
0016     id: presentation
0017 
0018     function nextSlide() {
0019         console.log("QML Component (default slideshow) Next slide");
0020         presentation.goToNextSlide();
0021     }
0022 
0023     Timer {
0024         id: advanceTimer
0025         interval: 1000
0026         running: presentation.activatedInCalamares
0027         repeat: true
0028         onTriggered: nextSlide()
0029     }
0030 
0031     Slide {
0032 
0033         Image {
0034             id: background
0035             source: "squid.png"
0036             width: 200; height: 200
0037             fillMode: Image.PreserveAspectFit
0038             anchors.centerIn: parent
0039         }
0040         Text {
0041             anchors.horizontalCenter: background.horizontalCenter
0042             anchors.top: background.bottom
0043             text: "This is a customizable QML slideshow.<br/>"+
0044                   "Distributions should provide their own slideshow and list it in <br/>"+
0045                   "their custom branding.desc file.<br/>"+
0046                   "To create a Calamares presentation in QML, import calamares.slideshow,<br/>"+
0047                   "define a Presentation element with as many Slide elements as needed."
0048             wrapMode: Text.WordWrap
0049             width: presentation.width
0050             horizontalAlignment: Text.Center
0051         }
0052     }
0053 
0054     Slide {
0055         centeredText: qsTr("This is a second Slide element.")
0056     }
0057 
0058     Slide {
0059         centeredText: qsTr("This is a third Slide element.")
0060     }
0061 
0062     // When this slideshow is loaded as a V1 slideshow, only
0063     // activatedInCalamares is set, which starts the timer (see above).
0064     //
0065     // In V2, also the onActivate() and onLeave() methods are called.
0066     // These example functions log a message (and re-start the slides
0067     // from the first).
0068     function onActivate() {
0069         console.log("QML Component (default slideshow) activated");
0070         presentation.currentSlide = 0;
0071     }
0072 
0073     function onLeave() {
0074         console.log("QML Component (default slideshow) deactivated");
0075     }
0076 
0077 }