Ktam3874/pitx software guide – Kontron KTAM3874-pITX User Manual

Page 255

Advertising
background image

KTD-S0057-I

Page 251 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide

gradient:

Gradient

{

GradientStop

{

position: 0

color:

"lightsteelblue"

}

GradientStop

{

position:

1.0

color:

"steelblue"

}

}

radius: height / 2 - 2

}

Text
{

text: Math.round (progress * 100) + "%"

anchors.horizontalCenter:

parent.horizontalCenter

anchors.verticalCenter:

parent.verticalCenter

color:

"white"

font.bold:

true

font.pixelSize:

15

}
}

File RssModel.qml (header with Qt

TM

license see 'main.cpp'):

import QtQuick 1.0

XmlListModel
{

property string tags : ""

function commasep (x)

{

return x.replace (' ',',')

}

source:

"http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+commasep(tags)+"&" :

"")+"format=rss2"

query:

"/rss/channel/item"

namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";"

XmlRole { name: "title"; query: "title/string ()" }

XmlRole { name: "imagePath"; query: "media:thumbnail/@url/string()" }

XmlRole { name: "url"; query: "media:content/@url/string()" }

XmlRole { name: "description"; query: "description/string()" }

XmlRole { name: "tags"; query: "media:category/string()" }

XmlRole { name: "photoWidth"; query: "media:content/@width/string()" }

XmlRole { name: "photoHeight"; query: "media:content/@height/string()" }

XmlRole { name: "photoType"; query: "media:content/@type/string()" }

XmlRole { name: "photoAuthor"; query: "author/string()" }

XmlRole { name: "photoDate"; query: "pubDate/string()" }

}

Advertising
This manual is related to the following products: