[Pkg-privacy-commits] [tails-installer] 20/210: Accomodate the QML code to the exported properties
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:24 UTC 2017
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.
commit 48e7ff73455b9124c79bd00c1015541c88ffc880
Author: Martin Briza <mbriza at redhat.com>
Date: Wed Feb 18 11:07:42 2015 +0100
Accomodate the QML code to the exported properties
---
liveusb/components/ImageDetails.qml | 42 +++++++++++++++++++++++--------------
liveusb/components/ImageList.qml | 8 +++----
liveusb/liveusb.qml | 14 +++++++++++--
3 files changed, 42 insertions(+), 22 deletions(-)
diff --git a/liveusb/components/ImageDetails.qml b/liveusb/components/ImageDetails.qml
index 7a9615b..3b7ea09 100644
--- a/liveusb/components/ImageDetails.qml
+++ b/liveusb/components/ImageDetails.qml
@@ -75,12 +75,17 @@ Item {
anchors.right: parent.right
spacing: 32
Layout.alignment: Qt.AlignLeft
- IndicatedImage {
- id: iconRect
- source: "http://upload.wikimedia.org/wikipedia/commons/3/3f/Fedora_logo.svg"
- sourceSize.width: 64
- sourceSize.height: 64
- fillMode: Image.PreserveAspectFit
+ Item {
+ width: 64
+ height: 64
+ IndicatedImage {
+ id: iconRect
+ anchors.centerIn: parent
+ source: liveUSBData.releases[mainWindow.currentImageIndex].logo
+ sourceSize.width: parent.width
+ sourceSize.height: parent.height
+ fillMode: Image.PreserveAspectFit
+ }
}
ColumnLayout {
@@ -91,21 +96,22 @@ Item {
Layout.fillWidth: true
anchors.left: parent.left
font.pointSize: 11
- text: "Fedora Workstation 21"
+ text: liveUSBData.releases[mainWindow.currentImageIndex].name
}
Text {
anchors.right: parent.right
font.pointSize: 11
- text: "953MB"
+ text: liveUSBData.releases[mainWindow.currentImageIndex].size > 0 ? (liveUSBData.releases[mainWindow.currentImageIndex].size + " MB") : ""
color: "gray"
}
}
Text {
- text: "64bit"
+ text: liveUSBData.releases[mainWindow.currentImageIndex].arch
color: "gray"
}
Text {
- text: "Released on December 21st 2014"
+ // I'm sorry, everyone, I can't find a better way to determine if the date is valid
+ text: liveUSBData.releases[mainWindow.currentImageIndex].releaseDate.toLocaleDateString().length > 0 ? ("Released on " + liveUSBData.releases[mainWindow.currentImageIndex].releaseDate.toLocaleDateString()) : ""
font.pointSize: 8
color: "gray"
}
@@ -115,14 +121,18 @@ Item {
Layout.fillWidth: true
width: Layout.width
wrapMode: Text.WordWrap
- text: "Lorem ipsum, quia dolor sit, amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt, ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit, qui in ea voluptate velit esse, quam nihil molestiae consequatur, vel illum, qui dolorem eum fugiat, quo voluptas nulla pariatur?"
+ text: liveUSBData.releases[mainWindow.currentImageIndex].fullDescription
font.pointSize: 9
}
- IndicatedImage {
- Layout.fillWidth: true
- fillMode: Image.PreserveAspectFit
- source: "http://fedora.cz/wp-content/uploads/2013/12/fedora-20-gnome-10.png"
- sourceSize.width: width
+ Repeater {
+ id: screenshotRepeater
+ model: ["http://fedora.cz/wp-content/uploads/2013/12/fedora-20-gnome-10.png", "http://fedora.cz/wp-content/uploads/2013/12/fedora-20-gnome-10.png"]
+ IndicatedImage {
+ Layout.fillWidth: true
+ fillMode: Image.PreserveAspectFit
+ source: screenshotRepeater.model[index]
+ sourceSize.width: width
+ }
}
}
}
diff --git a/liveusb/components/ImageList.qml b/liveusb/components/ImageList.qml
index 3881fe7..4195149 100644
--- a/liveusb/components/ImageList.qml
+++ b/liveusb/components/ImageList.qml
@@ -152,7 +152,7 @@ Item {
right: parent.right
}
Repeater {
- model: selectedOsList
+ model: liveUSBData.titleReleases
delegate: imageDelegate
}
}
@@ -223,7 +223,7 @@ Item {
height: 54
}
- model: osList
+ model: liveUSBData.releases
delegate: imageDelegate
}
style: ScrollViewStyle {
@@ -275,7 +275,7 @@ Item {
width: height
smooth: true
- source: icon
+ source: logo
}
Item {
id: textRect
@@ -294,7 +294,7 @@ Item {
// font.weight: Font.Bold
}
Text {
- text: description
+ text: shortDescription
anchors {
top: parent.verticalCenter
left: parent.right
diff --git a/liveusb/liveusb.qml b/liveusb/liveusb.qml
index 0fa9317..54bbb66 100644
--- a/liveusb/liveusb.qml
+++ b/liveusb/liveusb.qml
@@ -3,6 +3,8 @@ import QtQuick.Controls 1.3
import QtQuick.Window 2.2
import QtQuick.Dialogs 1.2
+import LiveUSB 1.0
+
import "components"
ApplicationWindow {
@@ -13,11 +15,17 @@ ApplicationWindow {
maximumWidth: minimumWidth
title: "LiveUSB Creator"
+ Component.onCompleted: {
+ console.log(liveUSBData.releases)
+ console.log(liveUSBData.releases[0])
+ console.log(liveUSBData.releases[0].name)
+ }
+
SystemPalette {
id: palette
}
- property int currentImageIndex: 1
+ property int currentImageIndex: 0
property bool canGoBack: false
Behavior on x {
@@ -30,7 +38,7 @@ ApplicationWindow {
duration: 80
}
}
-
+/*
ListModel {
id: selectedOsList
ListElement {
@@ -58,6 +66,7 @@ ApplicationWindow {
hasDetails: true
}
}
+*/
ListModel {
id: osList
@@ -248,6 +257,7 @@ ApplicationWindow {
Connections {
target: contentLoader.item
onStepForward: {
+ mainWindow.currentImageIndex = index
contentList.currentIndex = 1
canGoBack = true
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git
More information about the Pkg-privacy-commits
mailing list