[Pkg-privacy-commits] [tails-installer] 05/210: Start working on a QML UI
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:22 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 7824a45e900fea516f510f515f70c25b8b539be3
Author: Martin Briza <mbriza at redhat.com>
Date: Mon Jan 26 15:35:39 2015 +0100
Start working on a QML UI
---
liveusb/components/Arrow.qml | 15 +++++
liveusb/components/ImageList.qml | 102 +++++++++++++++++++++++++++++
liveusb/liveusb.qml | 137 +++++++++++++++++++++++++++++++++++++++
liveusb/liveusb.qmlproject | 20 ++++++
4 files changed, 274 insertions(+)
diff --git a/liveusb/components/Arrow.qml b/liveusb/components/Arrow.qml
new file mode 100644
index 0000000..7508be2
--- /dev/null
+++ b/liveusb/components/Arrow.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.4
+
+Item {
+ height: 10
+ width: 5
+ clip: true
+ Rectangle {
+ x: -8
+ y: -1
+ rotation: 45
+ width: 10
+ height: 10
+ color: "black"
+ }
+}
diff --git a/liveusb/components/ImageList.qml b/liveusb/components/ImageList.qml
new file mode 100644
index 0000000..8220575
--- /dev/null
+++ b/liveusb/components/ImageList.qml
@@ -0,0 +1,102 @@
+import QtQuick 2.4
+
+Rectangle {
+ id: root
+
+ property alias currentIndex: osListView.currentIndex
+ signal triggered
+
+ clip: true
+ border {
+ color: "#c3c3c3"
+ width: 1
+ }
+ radius: 6
+ color: "white"
+ ListView {
+ id: osListView
+ clip: true
+ anchors.fill: parent
+ model: osList
+ delegate: Rectangle {
+ width: parent.width - 2
+ height: 84
+ x: 1
+ y: 1
+ color: "transparent"
+ Rectangle {
+ id: iconRect
+ anchors {
+ top: parent.top
+ left: parent.left
+ bottom: parent.bottom
+ leftMargin: 32
+ topMargin: 16
+ bottomMargin: anchors.topMargin
+ }
+ width: height
+
+ color: "transparent"
+ border.color: "#c3c3c3"
+ border.width: 1
+ }
+ Item {
+ id: textRect
+ anchors {
+ verticalCenter: parent.verticalCenter
+ left: iconRect.right
+ leftMargin: 28
+ }
+ Text {
+ text: name
+ anchors {
+ bottom: parent.verticalCenter
+ left: parent.left
+ bottomMargin: 2
+ }
+ font.weight: Font.Bold
+ }
+ Text {
+ text: description
+ anchors {
+ top: parent.verticalCenter
+ left: parent.right
+ topMargin: 2
+ }
+ color: "#a1a1a1"
+ font.weight: Font.Bold
+ }
+ }
+ Arrow {
+ visible: hasDetails
+ anchors {
+ verticalCenter: parent.verticalCenter
+ right: parent.right
+ rightMargin: 20
+ }
+ }
+ Rectangle {
+ height: 1
+ color: "#c3c3c3"
+ width: parent.width
+ anchors.bottom: parent.bottom
+ }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ root.currentIndex = index
+ root.triggered()
+ }
+ onPressed: {
+ parent.color = "#ededed"
+ }
+ onReleased: {
+ parent.color = "transparent"
+ }
+ onCanceled: {
+ parent.color = "transparent"
+ }
+ }
+ }
+ }
+}
diff --git a/liveusb/liveusb.qml b/liveusb/liveusb.qml
new file mode 100644
index 0000000..1c48dd6
--- /dev/null
+++ b/liveusb/liveusb.qml
@@ -0,0 +1,137 @@
+import QtQuick 2.4
+import QtQuick.Controls 1.3
+import QtQuick.Window 2.2
+import QtQuick.Dialogs 1.2
+
+import "components"
+
+ApplicationWindow {
+ width: 800
+ height: 480
+
+ ListModel {
+ id: osList
+ ListElement {
+ name: "Custom OS..."
+ description: "<pick from file chooser>"
+ icon: ""
+ hasDetails: false
+ }
+ ListElement {
+ name: "Fedora Workstation"
+ description: "Fedora Workstation 21 64bit"
+ icon: ""
+ hasDetails: true
+ }
+ ListElement {
+ name: "Fedora Workstation"
+ description: "Fedora Workstation 20 64bit"
+ icon: ""
+ hasDetails: true
+ }
+ ListElement {
+ name: "Ubuntu Desktop"
+ description: "Ubuntu 14.04.1 LTS 64bit"
+ icon: ""
+ hasDetails: true
+ }
+ ListElement {
+ name: "Ubuntu Desktop"
+ description: "Ubuntu 14.10 64bit"
+ icon: ""
+ hasDetails: true
+ }
+ }
+
+ toolBar: ToolBar {
+ id: toolBar
+ height: 48
+ z: 2
+
+ anchors {
+ top: parent.top
+ right: parent.right
+ left: parent.left
+ }
+
+ ComboBox {
+ anchors {
+ right: searchButton.left
+ top: parent.top
+ bottom: parent.bottom
+ margins: 6
+ }
+ width: 148
+ model: ["64bit (detected)", "32bit"]
+ }
+
+ Button {
+ id: searchButton
+ width: height
+ anchors {
+ right: spacer.left
+ top: parent.top
+ bottom: parent.bottom
+ margins: 6
+ }
+ }
+
+ Rectangle {
+ id: spacer
+ width: 1
+ color: "#c3c3c3"
+ anchors {
+ right: quitButton.left
+ top: parent.top
+ bottom: parent.bottom
+ margins: 6
+ }
+ }
+
+ Button {
+ id: quitButton
+ //flat: true
+ anchors {
+ right: parent.right
+ top: parent.top
+ bottom: parent.bottom
+ margins: 6
+ }
+ width: height
+ Item {
+ anchors.fill: parent
+ rotation: 45
+ transformOrigin: Item.Center
+ Rectangle {
+ width: 2
+ height: 12
+ radius: 1
+ anchors.centerIn: parent
+ color: "#a1a1a1"
+ }
+ Rectangle {
+ width: 12
+ height: 2
+ radius: 1
+ anchors.centerIn: parent
+ color: "#a1a1a1"
+ }
+ }
+ }
+
+ }
+
+ ImageList {
+ anchors {
+ top: parent.top
+ bottom: parent.bottom
+ left: parent.left
+ right: parent.right
+ topMargin: 48
+ bottomMargin: anchors.topMargin
+ leftMargin: 64
+ rightMargin: anchors.leftMargin
+ }
+ }
+}
+
diff --git a/liveusb/liveusb.qmlproject b/liveusb/liveusb.qmlproject
new file mode 100644
index 0000000..1badbd5
--- /dev/null
+++ b/liveusb/liveusb.qmlproject
@@ -0,0 +1,20 @@
+/* File generated by Qt Creator */
+
+import QmlProject 1.1
+
+Project {
+ mainFile: "liveusb.qml"
+
+ /* Include .qml, .js, and image files from current directory and subdirectories */
+ QmlFiles {
+ directory: [".", "components"]
+ }
+ JavaScriptFiles {
+ directory: "."
+ }
+ ImageFiles {
+ directory: "."
+ }
+ /* List of plugin directories passed to QML runtime */
+ // importPaths: [ "../exampleplugin" ]
+}
--
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