Skip to content

Commit

Permalink
move remaining function_help to json and update it's translation hand…
Browse files Browse the repository at this point in the history
…ling
  • Loading branch information
jef-n committed Sep 20, 2015
1 parent 2affb27 commit 82b34af
Show file tree
Hide file tree
Showing 237 changed files with 1,186 additions and 839 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def featureOmbb(self, layer, writer, progress):
height])
writer.addFeature(outFeat)
else:
progress.setInfo(self.tr("Can't calculate an OMBB for features n°") + str(inFeat.id()) + ".")
progress.setInfo(self.tr("Can't calculate an OMBB for feature {0}.").format(inFeat.id()))
current += 1
progress.setPercentage(int(current * total))

Expand Down
1 change: 0 additions & 1 deletion resources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ INSTALL(DIRECTORY cpt-city-qgis-min DESTINATION ${QGIS_DATA_DIR}/resources)
INSTALL(DIRECTORY themes DESTINATION ${QGIS_DATA_DIR}/resources)

ADD_SUBDIRECTORY(context_help)
ADD_SUBDIRECTORY(function_help)
32 changes: 0 additions & 32 deletions resources/function_help/CMakeLists.txt

This file was deleted.

3 changes: 2 additions & 1 deletion resources/function_help/json/$area
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"function": "$area",
"name": "$area",
"type": "function",
"description": "Returns the area of the current feature.",
"examples": [ { "expression":"$area", "returns":"42"}]
}
3 changes: 2 additions & 1 deletion resources/function_help/json/$atlasfeature
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"function": "$atlasfeature",
"name": "$atlasfeature",
"type": "function",
"description": "In atlas generation, returns the current feature that is iterated over on the coverage layer. This can be used with the 'attribute' function to return attribute values from the current atlas feature.",
"examples": [ { "expression":"attribute( $atlasfeature, 'name' )", "returns":"value stored in 'name' attribute for the current atlas feature"}]
}
Expand Down
3 changes: 2 additions & 1 deletion resources/function_help/json/$atlasfeatureid
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"function": "$atlasfeatureid",
"name": "$atlasfeatureid",
"type": "function",
"description": "Returns the feature id of the current row while using atlas. This enables you to use features of atlas in rules and for example show or hide features based on their id.",
"examples": [ { "expression":"$atlasfeatureid = $id", "returns":"true"}]
}
Expand Down
3 changes: 2 additions & 1 deletion resources/function_help/json/$atlasgeometry
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"function": "$atlasgeometry",
"name": "$atlasgeometry",
"type": "function",
"description": "Returns the geometry of the current feature iterated in atlas. Can be used for rule based display of geometry when using atlas. For example to only show geometries of other layers when their geometry intersects the iterated geometry of features using atlas.",
"examples": [ { "expression":"intersects( $atlasgeometry, $geometry )", "returns":"true"}]
}
Expand Down
8 changes: 8 additions & 0 deletions resources/function_help/json/$currentfeature
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "$currentfeature",
"type": "function",
"description": "Returns the current feature being evaluated. This can be used with the 'attribute' function to evaluate attribute values from the current feature.",
"examples": [
{ "expression":"attribute( $currentfeature, 'name' )", "returns":"value stored in 'name' attribute for the current feature"}
]
}
7 changes: 7 additions & 0 deletions resources/function_help/json/$feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "$feature",
"type": "function",
"description": "In atlas generation, returns the current feature number that is iterated over on the coverage layer.",
"examples": [ { "expression":"$feature", "returns":"2"}
]
}
7 changes: 7 additions & 0 deletions resources/function_help/json/$geometry
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "$geometry",
"type": "function",
"description": "Returns the geometry of the current feature. Can be used for processing with other functions.",
"examples": [ { "expression":"geomToWKT( $geometry )", "returns":"POINT(6 50)"}
]
}
7 changes: 7 additions & 0 deletions resources/function_help/json/$id
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "$id",
"type": "function",
"description": "Returns the feature id of the current row.",
"examples": [ { "expression":"$id", "returns":"42"}
]
}
7 changes: 5 additions & 2 deletions resources/function_help/json/$length
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"function": "$length",
"name": "$length",
"type": "function",
"description": "Returns the length of a linestring. If you need the length of a border of a polygon, use $perimeter instead.",
"examples": [ { "expression":"$length", "returns":"42"}]
"examples": [
{ "expression":"$length", "returns":"42.4711"}
]
}
9 changes: 9 additions & 0 deletions resources/function_help/json/$map
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "$map",
"type": "function",
"description": "Returns the id of the current map item if the map is being drawn in a composition, or \"canvas\" if the map is being drawn within the main QGIS window.",
"examples": [
{ "expression": "$map", "returns": "\"overview_map\"", "description": "within a composer item"},
{ "expression": "$map", "returns": "\"canvas\"", "description": "within the main QGIS main canvas"}
]
}
8 changes: 8 additions & 0 deletions resources/function_help/json/$numfeatures
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "$numfeatures",
"type": "function",
"description": "In atlas generation, returns the total number of features within the coverage layer.",
"examples": [
{ "expression":"$numfeatures", "returns":"42"}
]
}
7 changes: 7 additions & 0 deletions resources/function_help/json/$numpages
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "$numpages",
"type": "function",
"description": "Returns the total number of pages in the composition.",
"examples": [ { "expression":"$numpages", "returns":"42"}
]
}
7 changes: 7 additions & 0 deletions resources/function_help/json/$page
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "$page",
"type": "function",
"description": "Returns the current page number within a composition.",
"examples": [ { "expression":"$page", "returns":"2"}
]
}
7 changes: 7 additions & 0 deletions resources/function_help/json/$perimeter
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "$perimeter",
"type": "function",
"description": "Returns the perimeter length of the current feature.",
"examples": [ { "expression":"$perimeter", "returns":"42"}
]
}
7 changes: 7 additions & 0 deletions resources/function_help/json/$rownum
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "$rownum",
"type": "function",
"description": "Returns the number of the current row.",
"examples": [ { "expression":"$rownum", "returns":"4711"}
]
}
8 changes: 8 additions & 0 deletions resources/function_help/json/$scale
Original file line number Diff line number Diff line change