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
Rectangle {
id: box
width: 1000; height: 700
property alias view: view
Rectangle {
id: banner
color: "lightgray"
width: parent.width;height: 120
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
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 1000)
gradient: Gradient {
GradientStop { position: 0.0; color: "white" }
GradientStop { position: 1.0; color: "#2397D4" }
}
}
Column {
anchors.centerIn: parent
Label {
//: the %1 will be replaced with the user name
text: qsTr("Welcome to Mageia, %1").arg(user)+'\n\n'
font.bold: true
}
Label {
text: qsTr("We are going to guide you through a few important steps
and help you with the configuration of your newly installed system.
Now, click on Media sources to go to the first step.");
textFormat: Text.RichText
}
}
}
// Configure source page
Rectangle {
property var title: qsTr("Media sources")
width: view.width; height: view.height
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 1000)
gradient: Gradient {
GradientStop { position: 0.0; color: "white" }
GradientStop { position: 1.0; color: "#2397D4" }
}
}
Column {
anchors.left: parent.left
anchors.leftMargin: 20
y:35
Label { text: qsTr("Configure software repositories"); font.bold: true; }
Label { text: qsTr("Mageia official repositories contain:"); }
GridLayout {
columns: 2
Rectangle {id: coreBg
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" }
}
}
width: 80;
height: 30
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Label {
anchors.centerIn: parent
text: qsTr("core"); }
}
Label {
text: qsTr("- the free-open-source packages");
wrapMode: Text.WordWrap
Layout.maximumWidth: slideshow.width * .6
}
Rectangle {id: nonfreeBg
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" }
}
}
width: 80; height: 30
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Label {
anchors.centerIn: parent
text: qsTr("nonfree");
color: "white"}
}
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 * .8
wrapMode: Text.WordWrap
}
Rectangle {id: taintedBg
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" }
}
}
width: 80; height: 30
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Label {
anchors.centerIn: parent
text: qsTr("tainted");
color: "white" }
}
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 * .8
}
Rectangle {
color: "lightgrey"
width: 80; height: 30
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Label { anchors.centerIn: parent
text: qsTr("backports"); }
}
Label {
text: qsTr("- includes software published after a Mageia release, or another version of software already present and not replaced.");
wrapMode: Text.WordWrap
Layout.maximumWidth: slideshow.width * .8
}
Button {
Layout.maximumWidth: slideshow.width * .25
Layout.columnSpan: 2
Layout.alignment: Qt.AlignHCenter
objectName: "launch"
onClicked: { launch.command(["drakrpm-edit-media",])}
style: ButtonStyle {
label: Label {
text: qsTr("Edit software repositories")+" *";
width: parent.width
wrapMode: Text.WordWrap
}
}
}
Rectangle {id: noteBg
color: "gold";
width: 70
height: 30
Layout.alignment: Qt.AlignTop
Layout.fillWidth: true
Label { anchors.centerIn: parent
text: qsTr("Note! ")
}
}
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 cdrom entry from the list of repositories.")+"
"+
qsTr("Now, please enable or disable the online repositories of your choice: click on the Edit software repositories button. Select at least the release and updates pair. Debug and Testing are for special cases.")+"
"+
qsTr("After you have checked and enabled the repositories you need, you can go to the next slide.
");
wrapMode: Text.WordWrap
textFormat: Text.RichText
Layout.fillWidth: true
Layout.maximumWidth: slideshow.width * .85
}
}
Label {
x: 84
text: qsTr("(*) Administrator password is needed.")
Layout.maximumWidth: slideshow.width * .25
wrapMode: Text.WordWrap
font.italic: true
}
}
}
// Update page
Rectangle {
property var title: qsTr("Update")
width: view.width; height: view.height
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 1000)
gradient: Gradient {
GradientStop { position: 0.0; color: "white" }
GradientStop { position: 1.0; color: "#2397D4" }
}
}
Column {
x:10; y: 35
Label { text: qsTr("How Mageia manages updates"); font.bold: true; padding: 10 }
Label {
width: slideshow.width * .9
padding: 10
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
}
Button {
x:10
width: view.width * .18;
objectName: "launch"
onClicked:{ launch.command(["drakrpm-update",])}
style: ButtonStyle {
label: Label {
horizontalAlignment: TextInput.AlignHCenter
text: qsTr("Check system updates")+" *";
width: parent.width
wrapMode: Text.WordWrap
}
}
}
}
Label {
anchors {bottom: parent.bottom; }
anchors.bottomMargin: 10
x:20
text: qsTr("(*) User password is needed")
wrapMode: Text.WordWrap
font.italic: true
}
}
// 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
LinearGradient {
anchors.fill: parent
start: Qt.point(0, 0)
end: Qt.point(0, 1000)
gradient: Gradient {
GradientStop { position: 0.0; color: "white" }
GradientStop { position: 1.0; color: "#2397D4" }
}
}
Column {
x: 10; y: 35
Label {
text: qsTr("Mageia Control Center (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
}
Label {
padding: 5
text: "