GCompris-qt
39 title: activityInfo.title
40 titleIcon: activityInfo.difficulty != 0 ?
"qrc:/gcompris/src/core/resource/difficulty" +
41 activityInfo.difficulty +
".svg" :
""
42 property QtObject activityInfo: ActivityInfoTree.currentActivity
45 if(activityInfo.icon) {
47 "' height='" + 100 *
ApplicationInfo.
ratio +
"' src='qrc:/gcompris/src/activities/" + activityInfo.icon +
"'/>"
52 function reformat(
string) {
53 var text =
string.replace(/^ (.*)\n/gm,
'<ul><li>$1</li></ul>')
54 text = text.replace(/\n/gm,
'<br/>')
58 function getContent() {
59 var contentText = getIcon()
60 contentText += "<b>" + activityInfo.description + "</b>"
61 contentText += "<br/><br/>"
62 if(activityInfo.author) {
63 contentText +=
"<b>" + qsTr(
"Author") +
": </b>" + activityInfo.author
64 contentText +=
"<br/><br/>"
66 if(activityInfo.prerequisite) {
67 contentText +=
"<b>" + qsTr(
"Prerequisite") +
": </b>" + activityInfo.prerequisite
68 contentText +=
"<br/><br/>"
70 if(activityInfo.goal) {
71 var goal = reformat(activityInfo.goal)
72 contentText += "<b>" + qsTr("Goal") + ": </b>" + goal
73 contentText += "<br/><br/>"
75 if(activityInfo.manual) {
76 var manual = reformat(activityInfo.manual)
77 contentText += "<b>" + qsTr("Manual") + ": </b>" + manual
78 contentText += "<br/><br/>"
80 if(activityInfo.credit) {
81 contentText +=
"<b>" + qsTr(
"Credit") +
": </b>" + activityInfo.credit
82 contentText +=
"<br/><br/>"
84 if(activityInfo.section) {
85 contentText +=
"<b>" + qsTr(
"Section: ") +
"</b>" + activityInfo.section
86 contentText +=
" (" + activityInfo.name.split(
'/')[0] +
")"
87 contentText +=
"<br/><br/>"
A general purpose singleton that exposes miscellaneous native functions to the QML layer...
qreal ratio
Ratio factor used for scaling of sizes on high-dpi devices.
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:47 by
doxygen 1.8.9.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.