28251 Commits

Author SHA1 Message Date
Nyall Dawson
5cb874c2aa More composer porting 2015-08-22 19:01:40 +10:00
Nyall Dawson
cf22025860 Set the expression context for map canvas renders 2015-08-22 19:01:40 +10:00
Nyall Dawson
0cab6b3376 Port renderers to expression contexts 2015-08-22 19:01:40 +10:00
Nyall Dawson
d6d6827b6e Port symbols to expression contexts 2015-08-22 19:01:40 +10:00
Nyall Dawson
1a7acb0d98 Port labelling to expression contexts 2015-08-22 19:01:40 +10:00
Nyall Dawson
5e03016b3a Update QgsDataDefined for expression contexts 2015-08-22 19:01:40 +10:00
Nyall Dawson
2bb1c8a31b Start on implementing contexts for render operations 2015-08-22 19:01:39 +10:00
Nyall Dawson
a0e35a3893 Switch some composer expressions to contexts 2015-08-22 19:01:39 +10:00
Nyall Dawson
f9a78207a7 Port QgsExpression tests to contexts 2015-08-22 19:01:39 +10:00
Nyall Dawson
c1adf623af Port field calculator to contexts 2015-08-22 19:01:39 +10:00
Nyall Dawson
cf3cf19124 Port virtual fields to expression contexts 2015-08-22 19:01:39 +10:00
Nyall Dawson
d6542276e7 Add a bunch of layer related variables, including things like
metadata, extent, crs, feature count, geometry types, etc...
2015-08-22 19:01:39 +10:00
Nyall Dawson
1c7a5b2dba Add editor widget for editing QgsExpressionContextScope variables 2015-08-22 19:01:39 +10:00
Nyall Dawson
05b15dc3c5 Test porting evaluation to contexts 2015-08-22 19:01:39 +10:00
Nyall Dawson
f6e0ce788e New framework for context based expressions
This commit adds the ability for expressions to be evaluated against
specific contexts. It replaces the previous behaviour where
expressions were evaluated against a specific feature and could
utilise fragile global "special columns".

Now, expressions are instead evaluated using a context designed for
each individual expression. This is done via QgsExpressionContext
and QgsExpressionContextScope objects.

A QgsExpressionContextScope encapsulates the variables and functions
relating to a specific context. For instance, scopes can be created
for "global" variables (such as QGIS version, platform, and user-set
variables specified within the QGIS options dialog. Think things
like user name, work department, etc), or for "project" variables
(eg project path, title, filename, and user-set variables set
through the project properties dialog. Project version, reference
number, that kind of thing). Many more scopes are planned, including
map layer scopes (variables for layer name, id, user-set variables
through the layer properties dialog), composer scopes, etc...

QgsExpressionContextScopes are 'stacked' into a QgsExpressionContext
object. Scopes added later to a QgsExpressionContext will override
any variables or functions provided by earlier scopes, so for
instance a user could override their global 'author' variable set
within QGIS options with a different 'author' set via the project
properties dialog.

The intended use is that a QgsExpressionContext is created before
a batch set of QgsExpression evaluations. Scopes are then added to
the context based on what makes sense for that particular
expression. Eg, almost all contexts will consist of the global
scope and project scope, and then additional scopes as required.
So a composer label would be evaluated against a context
consisting of the global scope, project scope, composition scope
and finally composer item scope. The batch set of expression
evaluations would then be performed using this context, after which
the context is discarded. In other words, a context is designed
for use for one specific set of expression evaluations only.
2015-08-22 19:01:39 +10:00
Nyall Dawson
f5de32779f Add missing sip changes 2015-08-22 19:01:39 +10:00
Nyall Dawson
57669e71c0 Make QgsRenderContext available to more renderer methods 2015-08-22 19:01:38 +10:00
Nyall Dawson
86ace247c5 Test mask updates 2015-08-22 18:52:22 +10:00
Giuseppe Sucameli
4dc7eba107 DBManager: fix minor issues due to Query dialogs repleaced with Query tabs (ref commit 5fb52fa1edc)
In detail:
* hide close button from Info, Table and Preview tabs (it should work on Mac as well),
* always display dbtype icon into query tab
* show database name in tab text (otherwise we dunno which db the query is executed against)
* restore original tab text when query name becomes empty
2015-08-22 02:34:53 +02:00
Tom Kralidis
03cf0cea9b Merge pull request #2267 from geopython/master
update MetaSearch plugin metadata
2015-08-21 09:54:22 -04:00
Matthias Kuhn
b110c0eafc Switch welcome page neews feed to https
References https://github.com/qgis/QGIS-Website/issues/275
2015-08-21 15:32:44 +02:00
Tom Kralidis
a8bd9995e1 update MetaSearch plugin metadata 2015-08-21 09:11:40 -04:00
Nathan Woodrow
bbf2fe8c7a Set better size for conditional format widget 2015-08-21 17:28:27 +10:00
Nathan Woodrow
db563073d6 Allow fall though of conditional rules 2015-08-21 16:24:16 +10:00
Nathan Woodrow
76f4f7c246 Conditional UI tweaks 2015-08-21 16:24:15 +10:00
Nyall Dawson
8cbfe00343 Bump acceptable doc coverage 2015-08-21 10:39:13 +10:00
Nyall Dawson
ee139b929c Tweak documentation coverage test
Ignore some obvious members which don't require docs:
- constructors with no arguments
- = and == operators

Also show list of undocumented members for each class
2015-08-21 10:05:51 +10:00
Nyall Dawson
9d984b163e Immediately apply conditional formatting changes to table 2015-08-21 10:04:22 +10:00
Nyall Dawson
9ce6b6b2b7 Fix whitespace 2015-08-21 07:29:38 +10:00
Nyall Dawson
6a3357fab8 Fix warnings, add missing sip bindings 2015-08-21 05:45:49 +10:00
Radim Blazek
acbf2834f9 [GRASS] close mapset button in dock widget 2015-08-20 18:58:20 +02:00
Radim Blazek
71bd8b46eb [GRASS] region dialog integrated to plugin dock widget 2015-08-20 17:54:34 +02:00
Radim Blazek
bed703ebfe [GRASS] region pen options moved to GRASS options 2015-08-20 17:54:34 +02:00
Nathan Woodrow
faa32f36cf [FEATURE] Conditional formatting for attribute table cells 2015-08-20 23:06:31 +10:00
volaya
3ff3b02ad7 Merge pull request #2247 from spencerrecneps/master
[Processing] Fixed bad variable references
2015-08-20 14:42:31 +02:00
volaya
bf7cf6ac6b Merge pull request #2262 from neteler/patch-72
[processing] Update Grass7Utils.py
2015-08-20 14:40:03 +02:00
Markus Neteler
424d3d337e Update Grass7Utils.py
In batchjob, use GRASS_MESSAGE_FORMAT=plain
2015-08-20 10:36:22 +02:00
Juergen E. Fischer
b578fc14f8 creatensis.pl: support for excluding packages (including their dependencies) 2015-08-20 09:57:49 +02:00
Nyall Dawson
d7c653c5ac Don't allow creation of visibility presets with existing name 2015-08-20 16:09:53 +10:00
Nyall Dawson
ca04bb6409 Allow more customisation of QgsNewNameDialog 2015-08-20 16:09:52 +10:00
Nyall Dawson
0df7102d29 Add Replace Preset option to presets menu 2015-08-20 16:09:52 +10:00
Nyall Dawson
415aa83bf0 Disable Add Preset menu if current style is already a preset
Prevents duplicate entries which have unexpected behaviour
2015-08-20 16:09:52 +10:00
Juergen E. Fischer
d2282a77c7 processing: when using batch jobs remove GISBASE from environment when calling GRASS (fixes #13072) 2015-08-20 01:10:43 +02:00
Juergen E. Fischer
16d7a0659e reenable passing projects and layers on open and 'open project on launch', but
replace make 'New' (old default) a new option and make 'Welcome Page' the new
default
2015-08-19 23:55:38 +02:00
Matthias Kuhn
f955cf2eba Welcomepage: Add loading indicator and allow keyboard for project selection 2015-08-19 19:58:31 +02:00
Radim Blazek
c783f26234 [GRASS] modules tree and list integrated into one tab, added tree filter 2015-08-19 18:52:18 +02:00
Matthias Kuhn
772cd0c854 Indentation fixes 2015-08-19 16:45:34 +02:00
Matthias Kuhn
10dfb5bc9b Disable unavailable projects 2015-08-19 16:45:34 +02:00
Matthias Kuhn
9bce9eda98 Fix a memory leak 2015-08-19 16:45:34 +02:00
Matthias Kuhn
23edcdb7c4 Add titles to the welcome page 2015-08-19 16:45:34 +02:00