@@ -16,12 +16,14 @@
17import QtQuick 2.0
17import QtQuick 2.0
18import Ubuntu.Components 0.1
18import Ubuntu.Components 0.1
19import "../"
20import "../"
21/*! This preview widget shows a header
22/*! This preview widget shows a header
22 * The title comes in widgetData["title"]
23 * The title comes in widgetData["title"]
23 * The mascot comes in widgetData["mascot"]
24 * The mascot comes in widgetData["mascot"]
24 * The subtitle comes in widgetData["subtitle"]
25 * The subtitle comes in widgetData["subtitle"]
26+ * The attributes comes in widgetData["attributes"]
27PreviewWidget {
29PreviewWidget {
@@ -35,6 +37,7 @@ PreviewWidget {
35 readonly property url mascot: root.widgetData["mascot"] || ""
37 readonly property url mascot: root.widgetData["mascot"] || ""
36 readonly property string title: root.widgetData["title"] || ""
38 readonly property string title: root.widgetData["title"] || ""
37 readonly property string subtitle: root.widgetData["subtitle"] || ""
39 readonly property string subtitle: root.widgetData["subtitle"] || ""
40+ readonly property var attributes: root.widgetData["attributes"] || null
38 readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
41 readonly property color fontColor: root.scopeStyle ? root.scopeStyle.foreground : Theme.palette.normal.baseText
40 implicitHeight: row.height + row.margins * 2
43 implicitHeight: row.height + row.margins * 2
@@ -115,6 +118,16 @@ PreviewWidget {
115 text: headerRoot.subtitle
118 text: headerRoot.subtitle
123+ active: titleLabel.text && headerRoot.attributes
124+ anchors { left: parent.left; right: parent.right }
125+ sourceComponent: CardAttributes {
126+ id: previewAttributes
127+ objectName: "previewAttributes"
128+ model: headerRoot.attributes