7780 Commits

Author SHA1 Message Date
nirvn
bc130be6cb [style] improve creation of default style db
Instead of copyign a pre-existing .db shipped with QGIS, create
a new .db and import an .xml file containing our default  symbols.

On the UX front, the main benefit is being able to ship with
pre-defined tags and favorite flags for the default symbols.

On the developer side, it means we get rid of the requirement
to maintain both an .xml and a binary .db in the source tree.
We also say aurevoir to the symbol_xml2db.py script and the
need to update the (obsolete) script every time we add a new
feature to QgsStyle.
2016-11-22 14:46:35 +07:00
Martin Dobias
d716640403 Remove usage of legendInterface() from plugins (followup e5f62e49) 2016-11-22 12:23:37 +08:00
Nyall Dawson
33caf66e1d Merge pull request #3766 from nyalldawson/processing_context2
[processing] Fix hangs when running algorithms
2016-11-22 12:56:51 +10:00
Nyall Dawson
86ab3022b5 Remove layer extent and statistic variables from processing contexts
These variables take a lot of time to calculate and cause lots of
lengthy hangs in processing. (Eg add some moderately large rasters
to a project, then try to run any processing algorithm and QGIS
will freeze).

The layer extent can already be used in expressions via the
layer_property function, which only evalutes the extent if required
and only for layers it is used for.

The band stats for raster layers should be moved to a
band_statistic function in core which behaves the same way.
2016-11-22 11:17:38 +10:00
Nyall Dawson
377cba0b74 [processing] Use real map settings scope instead of custom canvasextent variables 2016-11-22 11:17:38 +10:00
Martin Dobias
e5f62e49ce Remove legacy QgsLegendInterface, move still valid methods to QgisInterface 2016-11-22 08:25:01 +08:00
Nyall Dawson
271e67e37b [processing] Fix import to postgis alg when table name not set (fix #15869, 15097) 2016-11-22 09:59:43 +10:00
Nyall Dawson
3dcf03cf54 Merge pull request #3773 from alexbruy/network-analysis
Network analysis
2016-11-22 09:03:57 +10:00
Nyall Dawson
8c8be007b9 Remove redundant setLayer slots from QgsField(ComboBox|ExpressionWidget)
and switch uses of remaining slot to new style connects
2016-11-22 08:25:57 +10:00
Alexander Bruy
fb5cdd83ee remove word "road" from doxygen comments 2016-11-21 16:47:24 +02:00
Alexander Bruy
b421a53675 rename QgsLineVectorLayerDirector to QgsVectorLayerDirector 2016-11-21 16:47:24 +02:00
Alexander Bruy
d657c77a8c rename enum and its values 2016-11-21 16:47:24 +02:00
Alexander Bruy
9dffe64dab replace hardcoded magic numbers with enum 2016-11-21 16:47:24 +02:00
Alexander Bruy
a61e8bbdec rename QgsStrategy to QgsNetworkStrategy to avoid possible future
confusion when we will have other stuff with strategies. Also
rename corresponding subclasses
2016-11-21 16:47:24 +02:00
Alexander Bruy
f9be17997f make cost() method pure virtual 2016-11-21 16:47:24 +02:00
Alexander Bruy
00eb2619c6 fix warnings 2016-11-21 16:47:24 +02:00
Alexander Bruy
5992f74e04 [API] rename QgsArcProperter to QgsStrategy
Also update subclasses names and do some more refactoring.
2016-11-21 16:47:24 +02:00
Alexander Bruy
5cbf9d5129 remove references to networkanalysis from scrips and packaging files 2016-11-21 16:47:24 +02:00
Alexander Bruy
14c930a5a8 [API][network analysis] move network analysis into analysis library to
be consistent with other analysis stuff
2016-11-21 16:47:24 +02:00
Alexander Bruy
3c3e17ac90 [network analysis] expose speed properter in C++ and Python API
This allows users to calculate shortest path using travel time
as optimization criteria in addition to travel distance.
2016-11-21 16:47:24 +02:00
nirvn
a958c8a798 [style] add createMemoryDB() to QgsStyle to create temporary db 2016-11-19 16:04:03 +07:00
Alexander Bruy
f70a3b9e1d [processing] move custom parameter definition inside corresponding
algorithm
2016-11-18 10:22:26 +02:00
Nyall Dawson
fc18fd98cc Merge pull request #3778 from nirvn/style_manager_ui_imp
[style manager] improve UI
2016-11-18 17:46:22 +10:00
nirvn
5f3ba72547 [style manager] sort displayed symbols, insure tags are added only once 2016-11-18 14:14:16 +07:00
nirvn
13a0e48a26 [style manager] improve UI
- create a dedicated set of buttons for addition of tags and smartgroups
to make those actions more visible as well as getting rid of th need to
select a tag/smartgroup to create those (turns out to be quite confusing
for newcomers)
- move UI elements around, regroup {add,remove,edit} symbol buttons to
harmonize with other parts of QGIS; the elements' placement feels much
more natural now
2016-11-18 10:15:40 +07:00
Nyall Dawson
5e1a69fc88 [FEATURE][processing] Create attribute index algorithm
Allows creation of an index on an attribute in a layer for faster
attribute based filtering

Support depends on the underlying data provider for the layer
2016-11-18 10:56:02 +10:00
Nyall Dawson
6b6896bf5b Merge pull request #3777 from nirvn/symbols_preview_padding
[symbology] add padding value for symbol/coloramp preview
2016-11-17 15:28:45 +10:00
nirvn
a8a05ba751 [symbology] add padding value for symbol/coloramp preview 2016-11-17 11:43:53 +07:00
Nyall Dawson
24ffa15ecf [FEATURE][processing] Extract by attribute can extract for null/notnull values
Adds support for filtering where an attribute value is null or not null
2016-11-17 13:09:23 +10:00
Nyall Dawson
fb8b931a8e [processing] Fix error with field widget wrapper 2016-11-17 13:09:23 +10:00
Nyall Dawson
e624518e00 Merge pull request #3755 from nirvn/style_manager_upgrade
[FEATURE] Style management re-work and upgrade
2016-11-17 12:40:52 +10:00
Nyall Dawson
964ecfd743 Fix build 2016-11-17 09:04:19 +10:00
Nyall Dawson
1da400a99d Rename enum values for consistency 2016-11-17 09:04:19 +10:00
Nyall Dawson
fc65334a60 [processing] Add file picker to vector/raster/table parameters
in modeller

Makes it obvious that users can set an algorithm vector/raster/
table input to a fixed table
2016-11-17 09:04:19 +10:00
Nyall Dawson
f78f2a05c6 [processing] Use native QGIS map layer combobox
Switches the custom map layer combo box used in the run algorithm
dialog across to the standard QGIS map layer combo box
2016-11-17 09:04:19 +10:00
Nyall Dawson
5c3aea33b8 Allow filtering QgsMapLayerComboBox by data provider 2016-11-17 09:04:19 +10:00
Nyall Dawson
9ee7873572 Allow showing additional items in QgsMapLayerComboBox
These may represent additional layers such as layers which
are not included in the map layer registry, or paths to
layers which have not yet been loaded into QGIS.
2016-11-17 09:04:19 +10:00
Nyall Dawson
ec49341f85 Allow showing CRS in QgsMapLayerComboBox 2016-11-17 09:04:19 +10:00
Nyall Dawson
959f97f682 Allow not set choice in QgsMapLayerComboBox 2016-11-17 09:04:19 +10:00
Nyall Dawson
60bbd09339 Avoid double-evaluating postgres default values 2016-11-16 14:19:24 +01:00
Nyall Dawson
b5864cd432 [FEATURE] Improve handling of defaults (inc provider default clauses,
literal defaults, and qgis expression defaults) and automatically
handle unique value constraints on layers

Add a new method QgsVectorLayerUtils::createFeature which returns
a new feature which includes all relevant defaults. Any fields
with unique value constraints will be guaranteed to have a value
which is unique for the field.

Currently only in use by the split feature tool.

Sponsored by Canton of Zug and the QGEP project
2016-11-16 14:19:24 +01:00
Nyall Dawson
747097d43d New method QgsVectorLayerUtils::createUniqueValue
Returns a new unique attribute value for a layer. For numeric
fields this is the max attribute value + 1, for strings we
attempt to create a unique value by append _1, _2, etc to either
a specified 'seed' value, or failing that to the end of the
value of that field from the first feature in the layer.
2016-11-16 14:19:24 +01:00
Nyall Dawson
4682eaf6eb Add QgsVectorLayer::uniqueStringsMatching() to retrieve
a list of unique strings matching a substring for a field
2016-11-16 14:19:24 +01:00
Nyall Dawson
3242321aa9 [FEATURE] Add method to get list of unique strings matching
a substring from a vector data provider

Base implementation iterates through all features, but
providers can override with optimised versions. Native
implementations for postgres, spatialite and OGR included.
2016-11-16 14:19:24 +01:00
volaya
ff691a6bc4 Merge pull request #3747 from nyalldawson/num_input
[processing] Restore spin box widget for number inputs outside modeller
2016-11-16 13:59:25 +01:00
nirvn
b32a719798 [symbology] draw effect(s) when rendering preview icon 2016-11-16 11:22:06 +01:00
Matthias Kuhn
f18d1c3083 Rename listActions to actions and fix test 2016-11-16 09:33:19 +01:00
Matthias Kuhn
a6eb7b6281 Convert action ids to uuid 2016-11-16 09:33:19 +01:00
Matthias Kuhn
08d350c0cb Fix bindings and docs 2016-11-16 09:33:19 +01:00
Matthias Kuhn
5b4a88f8e0 [feature] Add layer scoped actions
Within the attribute table, there is a new button to trigger actions
which are not based on individual features but instead on the whole layer.
Normally they will perform actions based on all features or the selection.

In addition to this, a lot of cleanup has been done.
2016-11-16 09:33:19 +01:00