@@ -165,6 +165,28 @@ Item {
170+ property int numOfAttributes: 0
171+ property var model: []
172+ property bool hasAttributes: {
173+ var attributes = components["attributes"];
174+ var hasAttributesFlag = attributes != undefined;
175+ // TODO: we should get num of attributes from components
176+ if (hasAttributesFlag) {
177+ numOfAttributes = 3;
179+ return hasAttributesFlag
182+ onNumOfAttributesChanged: {
184+ for (var i = 0; i < numOfAttributes; i++) {
185+ model.push( {"value":"text"+(i+1), "icon":"image://theme/ok" } );
169 id: cardLoader
191 id: cardLoader
170 property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
192 property var fields: ["art", "mascot", "title", "subtitle", "summary", "attributes"]
@@ -174,7 +196,7 @@ Item {
174 "title": "—\n—",
196 "title": "—\n—",
175 "subtitle": "—",
197 "subtitle": "—",
176 "summary": "—\n—\n—\n—\n—",
198 "summary": "—\n—\n—\n—\n—",
177− "attributes": [{"value":"text1","icon":"image://theme/ok"},{"value":"text2","icon":"image://theme/cancel"},{"value":"text3","icon":"image://theme/ok"}]
199+ "attributes": attributesModel.model
179 sourceComponent: cardTool.cardComponent
201 sourceComponent: cardTool.cardComponent
180 onLoaded: {
202 onLoaded: {