Commit d7fe6bc2 authored by Michael Winkelmann's avatar Michael Winkelmann

First commit

parents
/* File generated by Qt Creator */
import QmlProject 1.1
Project {
mainFile: "TrainingCert/Example.qml"
/* Include .qml, .js, and image files from current directory and subdirectories */
QmlFiles {
directory: "."
}
JavaScriptFiles {
directory: "."
}
ImageFiles {
directory: "./common"
}
/* List of plugin directories passed to QML runtime */
importPaths: [ "common" ]
}
import QtQuick 2.0
import "../common"
SlideWithTitle {
id: root
property var items: ["Point1", "Point2", "Point3"]
BulletPointList {
model: root.items
color: Style.black
anchors.top: titleItem.bottom
anchors.left: root.left
anchors.right: root.right
anchors.margins: root.margins
anchors.bottom: root.bottom
}
}
import QtQuick 2.0
import "../common" 1.0
Item {
id: root
property real margins: 60
property string title: "Test"
QtShape {
id: shape
topLeftCornerSize: root.margins
bottomRightCornerSize: root.margins
anchors.fill: parent
color: Style.blue5
}
SlideText {
id: titleText
text: root.title
anchors.top: root.top
anchors.left: root.left
anchors.right: root.right
anchors.margins: root.margins
color: Style.white
height: root.height / 5
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: height / 1.5
}
BulletPointList {
model: [ "Point1", "*Point2", "**Point3" ]
color: Style.white
anchors.top: titleText.bottom
anchors.left: root.left
anchors.right: root.right
anchors.margins: root.margins
anchors.bottom: root.bottom
}
}
import QtQuick 2.0
import "../common" 1.0
SlideBackground {
id: root
property real margins: 60
property string title: "Test"
property string layout: "left"
QtShape {
id: shape
topLeftCornerSize: root.cornerSize
bottomRightCornerSize: root.cornerSize
anchors.top: root.top
anchors.bottom: root.bottom
width: root.width / 2
x: root.layout === "left" ? 0 : root.width / 2
color: Style.blue5
}
SlideText {
id: titleText
text: root.title
anchors.top: root.top
anchors.left: shape.left
anchors.right: root.right
anchors.margins: root.margins
color: Style.white
height: root.height / 10
width: root.width / 2
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: height / 1.5
}
BulletPointList {
anchors.top: titleText.bottom
anchors.bottom: root.bottom
anchors.left: root.left
width: root.width / 2
anchors.margins: root.margins
model: [ "Point1", "Point2", "Point3"]
color: root.layout === "left" ? Style.white : Style.black
}
BulletPointList {
anchors.top: titleText.bottom
anchors.bottom: root.bottom
anchors.right: root.right
anchors.left: root.horizontalCenter
anchors.margins: root.margins
model: [ "Point1", "Point2", "Point3"]
color: root.layout === "left" ? Style.black : Style.white
}
}
import QtQuick 2.0
import "../common"
SlideBackground {
id: root
readonly property bool isMaster: true
property real margins: 60
property int slideNumber: 0
property string date: ""
property string copyright: "© 2018 The Qt Company"
Row {
id: footer
y: root.height - root.margins
anchors.margins: root.margins
anchors.left: root.left
anchors.right: root.right
height: 12
SlideText {
id: textSlideNumber
width: root.width / 12
text: Number(root.slideNumber).toString()
anchors.top: footer.top
anchors.bottom: footer.bottom
font.pointSize: 9
color: Style.gray3
}
SlideText {
id: textDate
width: root.width / 6
text: root.date
anchors.top: footer.top
anchors.bottom: footer.bottom
font.pointSize: 9
color: Style.gray3
}
SlideText {
id: textCopyright
text: root.copyright
anchors.top: footer.top
anchors.bottom: footer.bottom
font.pointSize: 9
color: Style.gray3
}
}
}
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QML Presentation System.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.5
import QtQuick.Window 2.0
Item {
}
import QtQuick 2.0
import "../common"
SlideBackground {
id: root
property real margins: 60
property string title: "Test"
property real titleFontSize: 44
property color titleColor: Style.black
property string titleAlign: "Left"
readonly property Item titleItem: titleText
SlideText {
id: titleText
text: root.title
anchors.top: root.top
anchors.left: root.left
anchors.right: root.right
anchors.margins: root.margins
color: root.titleColor
height: root.height / 5
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignLeft
font.pixelSize: root.titleFontSize
z: 100
}
}
import QtQuick 2.0
TrainingCerts {
participants: [
"John Doe",
"Max Mustermann"
]
courseInfo: "Berlin, Germany, October 22nd - 26th, 2018"
courseContent:
[
"C++ Introduction",
"Qt Essentials",
"Qt Object System",
"Meta-Object System",
"QML Language",
"<br>Qt Quick Controls 2",
"QML/C++ Bindings",
"Model/View Framework",
"Internationalization",
"Threading",
]
trainer: "Max Power, Qt Advisor and Trainer"
}
import QtQuick 2.0
TrainingCerts {
participants: [
"Ömür Dursunbek",
"Joachim Hepp",
"Duong Ho Xuan",
"Fabian Holz",
"Tobias Kafka",
"Norbert Kiefer",
"Raphaela Leucht",
"Mahesh Maharjan",
"Renee Paiva Klug",
"Bernd Richter",
"Manuel Schmidtberger",
"Alto Speckhardt",
"Bernd Steinwender",
"Fabian Zaengel",
]
courseInfo: "In Biberach an der Riß, Germany, October 22nd - 26th, 2018"
courseContent:
[
"C++ Introduction",
"Qt Essentials",
"Qt Object System",
"Meta-Object System",
"QML Language",
"<br>Qt Quick Controls 2",
"QML/C++ Bindings",
"Model/View Framework",
"Internationalization",
"Threading",
]
trainer: "Michael Winkelmann, Qt Advisor and Trainer"
}
import QtQuick 2.0
import "../common" 1.0
SlideBackground {
id: root
width: 1280
height: 800
property string participant
property string courseInfo
property var courseContent
property string trainer
Image {
id: qtLogo
source: "../common/qt_logo_with_text_green_rgb.png"
smooth: true
fillMode: Image.PreserveAspectFit
anchors.margins: 30
anchors.right: root.right
anchors.top: root.top
width: 140
}
SlideText {
id: textCert
text: "Course Certificate"
horizontalAlignment: Qt.AlignHCenter
anchors.left: root.left
anchors.right: root.right
font.pixelSize: 48
height: 60
anchors.top: root.top
anchors.topMargin: 30
verticalAlignment: Qt.AlignVCenter
}
SlideText {
id: textParticipant
text: participant
font.bold: true
font.pixelSize: 48
anchors.left: root.left
anchors.right: root.right
anchors.top: textCert.bottom
height: 90
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter
}
SlideText {
id: textHasCompleted
text: "has completed"
horizontalAlignment: Qt.AlignHCenter
anchors.top: textParticipant.bottom
height: 50
y: 180
font.pixelSize: 20
anchors.left: root.left
anchors.right: root.right
}
Row {
id: trainingBox
anchors.topMargin: 15
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: textHasCompleted.verticalCenter
spacing: 10
Image {
sourceSize.height: 50
sourceSize.width: 50
fillMode: Image.PreserveAspectFit
source: "../common/qt_logo_green_256x256px.png"
}
SlideText {
text: "Training"
anchors.verticalCenter: parent.verticalCenter
fontSizeMode: Text.FixedSize
font.pixelSize: 28
font.bold: true
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
SlideText {
id: textCourseInfo
anchors.top: trainingBox.bottom
text: courseInfo
horizontalAlignment: Qt.AlignHCenter
height: 60
font.pixelSize: 28
anchors.left: root.left
anchors.right: root.right
}
SlideText {
id: textCourseContent
anchors.top: textCourseInfo.bottom
anchors.left: root.left
anchors.right: root.right
text: "Course content:"
height: 30
horizontalAlignment: Qt.AlignHCenter
font.pixelSize: 20
font.bold: true
}
SlideText {
id: textCourseContentItems
anchors.top: textCourseContent.bottom
anchors.left: root.left
anchors.leftMargin: root.width / 12
anchors.right: root.right
anchors.rightMargin: root.width / 12
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
text: {
var s = "";
for (var i = 0; i < courseContent.length; ++i) {
s += courseContent[i];
if (i !== courseContent.length-1) {
s += " | ";
}
}
return s;
}
height: 60
horizontalAlignment: Qt.AlignHCenter
font.pixelSize: 16
}
Rectangle {
id: line
color: Style.black
anchors.bottom: textTrainer.top
anchors.horizontalCenter: root.horizontalCenter
width: root.width/3
height: 1
}
SlideText {
id: textTrainer
text: trainer
anchors.bottom: root.bottom
anchors.horizontalCenter: root.horizontalCenter
anchors.bottomMargin: 30
fontSizeMode: Text.FixedSize
font.pixelSize: 16
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
import QtQuick 2.0
Item {
id: root
width: 29.7 * 72 / 2.54
height: 21.0 * 72 / 2.54
property var participants
property string courseInfo
property var courseContent
property string trainer
Repeater {
model: participants
anchors.centerIn: parent
TrainingCert {
anchors.centerIn: parent
width: (29.7 - 1) * 72 / 2.54
height: (21.0 - 1) * 72 / 2.54
courseInfo: root.courseInfo
courseContent: root.courseContent
trainer: root.trainer
participant: modelData
}
}
}
import QtQuick 2.0
Column {
id: root
property var model
property color color: Style.black
property real indent: 40
property string bulletChar: "›";
property real fontSize: 0
Repeater {
id: repeater
model: root.model
SlideText {
function calcIndentLevel(str) {
for (var i = 0; i < str.length; ++i) {
if (str.charAt(i) !== "*")
return i;
}
return str.length;
}
anchors.left: root.left
anchors.right: root.right
anchors.leftMargin: calcIndentLevel(modelData) * root.indent
width: root.width
height: root.height / repeater.count - calcIndentLevel(modelData) * 4
text: {
var s = "";
if (root.bulletChar.length > 0) {
s += root.bulletChar + " ";
}
var level = calcIndentLevel(modelData);
return s + String(modelData).substring(level,modelData.length);
}
color: root.color
font.pixelSize: {
var size = height / 1.5;
if (root.fontSize === 0.0) {
if (size > 48) return 48;
if (size < 8) return 8;
} else {
size = root.fontSize;
}
return size - 4 * calcIndentLevel(modelData);
}
}
}
}
import QtQuick 2.0
Item
{
id: root
clip: true
property real topLeftCornerSize: 60
property real bottomRightCornerSize: 60
property color color: Style.blue5
Rectangle {
anchors.top: root.top
anchors.right: root.right
x: topLeftCornerSize
height: root.height - bottomRightCornerSize
width: root.width - topLeftCornerSize
color: root.color
}
Rectangle {
anchors.bottom: root.bottom
anchors.left: root.left
height: root.height - topLeftCornerSize
width: root.width - bottomRightCornerSize
color: root.color
}
Item {
id: anchorTopLeft
width: topLeftCornerSize * 2
height: topLeftCornerSize * 2
}
Item {
id: anchorBottomRight
anchors.right: root.right
anchors.bottom: root.bottom
width: bottomRightCornerSize * 2 - 1
height: bottomRightCornerSize * 2 - 1
}
Rectangle {
width: topLeftCornerSize * Math.SQRT2
height: topLeftCornerSize * Math.SQRT2
rotation: 45
transformOrigin: Item.Center
anchors.centerIn: anchorTopLeft
color: root.color
}
Rectangle {
width: bottomRightCornerSize * Math.SQRT2
height: bottomRightCornerSize * Math.SQRT2
rotation: 45
transformOrigin: Item.Center
anchors.centerIn: anchorBottomRight
color: root.color
}
}
import QtQuick 2.0
Item {
id: root
clip: true
property real cornerSize: 60
property color cornerColor: Style.green1
property bool showCorners: true
Rectangle {
visible: root.showCorners
color: root.cornerColor
width: root.cornerSize * Math.SQRT2
height: root.cornerSize * Math.SQRT2
x: -width/2
y: -height/2
rotation: 45
}
Rectangle {
visible: root.showCorners
color: root.cornerColor
width: root.cornerSize * Math.SQRT2
height: root.cornerSize * Math.SQRT2
x: root.width - width/2
y: root.height - height/2
rotation: 45
}
}
import QtQuick 2.0
Text {
font.family: "Titillium Web"
}
pragma Singleton
import QtQuick 2.0
QtObject {
readonly property color green1: "#41cd52"
readonly property color green2: "#21be2b"
readonly property color green3: "#17a81a"
readonly property color gray1: "#f3f3f4"
readonly property color gray2: "#cecfd5"
readonly property color gray3: "#b5b7bf"
readonly property color gray4: "#9d9faa"
readonly property color gray5: "#848895"
readonly property color blue1: "#6b7080"
readonly property color blue2: "#53586b"
readonly property color blue3: "#3a4055"
readonly property color blue4: "#222840"
readonly property color blue5: "#09102b"
readonly property color black: "#000000"
readonly property color white: "#FFFFFF"
}
module common
singleton Style 1.0 Style.qml
QtShape 1.0 QtShape.qml
import QtQuick 2.0
import "../Slides" 1.0
import "../common" 1.0
Presentation {
width: 720
height: 480
SlideBackground {
anchors.fill: parent
readonly property bool isMaster: true
}
Rectangle {
// anchors.fill: parent
width: 100
height: 100
color: "red"
opacity: 0.5
}