2573 Commits

Author SHA1 Message Date
Nyall Dawson
45a52dfacd Rename minimum area paremeter, fix docs for QgsCurvePolygon::removeInteriorRing 2016-11-29 08:43:23 +10:00
Nyall Dawson
57f482e2d9 Add method to QgsGeometry to remove interior rings from a polygon
With an optional area threshold
2016-11-28 12:08:21 +10:00
Matthias Kuhn
7726205dc3 Followup f3482d2: mapThemeStyleOverrides is plural 2016-11-23 15:51:10 +01:00
Nathan
311f482725 Move profiler instance to QgsApplication 2016-11-23 14:03:25 +10:00
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
nirvn
a958c8a798 [style] add createMemoryDB() to QgsStyle to create temporary db 2016-11-19 16:04:03 +07: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
nirvn
a8a05ba751 [symbology] add padding value for symbol/coloramp preview 2016-11-17 11:43:53 +07: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
1da400a99d Rename enum values for consistency 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
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
nirvn
5e487cfea4 [FEATURE] Style management re-work and upgrade
- A new favorite grouping system was added, which the symbols list
widget defaults to
- The selected tag / smartgroup in the symbols list widget now
persists when switching layers (and across sessions)
- The symbols list widget will update the tag / smartgroup combo
box when users add / rename / remove categories
- Users can now directly tag, as well as add to favorites, symbols
while saving those to the style database
- To streamline style management, groups have been removed and
fully replaced by tags
- Tags have been integrated into the import/export user interface
2016-11-16 14:12:19 +07:00
Nyall Dawson
6727ea78bd Merge pull request #3764 from nyalldawson/cache_fix2
Cache fixes
2016-11-16 10:38:47 +10:00
Denis Rouzaud
a373f95707 [FEATURE] add functionnality to copy/move feature to move feature map tool 2016-11-15 11:28:47 +01:00
Nyall Dawson
b5c1d0f24e QgsCacheIndexFeatureId can also handle non-FilterFid requests
in certain circumstances

On behalf of Faunalia, sponsored by ENEL
2016-11-15 14:03:49 +10:00
Nyall Dawson
afd5d1e934 Recognise that a cache can be filled using a FilterNone request
On behalf of Faunalia, sponsored by ENEL
2016-11-15 14:00:13 +10:00
Nyall Dawson
5d78d60bf3 Remove duplicate QgsDataProvider::dataChanged( int ) signal
Was not needed and not emitted anywhere
2016-11-15 07:00:49 +10:00
Nyall Dawson
4a5faa083f Remove duplicate selectionChanged signal from QgsVectorLayer
If you don't want the extra info, just don't capture it...
2016-11-15 07:00:49 +10:00
Martin Dobias
645514a23b Remove setLayerName(), layerName() from QgsLayerTreeLayer
(replaced by setName(), name() overridden from the parent)
2016-11-15 00:56:22 +08:00
Martin Dobias
9950b085d4 Fix missing docs and sip coverage (followup 968e02d6) 2016-11-14 23:39:58 +08:00
Martin Dobias
968e02d6fe Propagate layer/group name changes in the layer tree (fixes #15844) 2016-11-14 19:57:00 +08:00
Nyall Dawson
b44093914b Fix test failure, report distance from pole 2016-11-14 15:52:41 +10:00
Nyall Dawson
d6f09c012e [FEATURE] Add method to calculate pole of inaccessibility for polygons
Implements a method in QgsGeometry and a processing algorithm to
calculate the pole of inaccessibility for a surface, which is the
most distant internal point from the boundary of the surface. This function
uses the 'polylabel' algorithm (Vladimir Agafonkin, 2016), which is an iterative
approach guaranteed to find the true pole of inaccessibility within a specified
tolerance. More precise tolerances require more iterations and will take longer
to calculate.
2016-11-14 15:52:41 +10:00
Nyall Dawson
d5c307eb05 Add method to find distance from a point to a poylgon's boundary 2016-11-14 15:52:41 +10:00
Martin Dobias
9872b4848d Remove caching of GEOS representation within QgsGeometry (legacy) 2016-11-14 13:36:12 +08:00
Martin Dobias
d729951dcd Remove caching of WKB from QgsGeometry (was kept just for compatibility)
Also improves the API to export/import WKB as QByteArray
2016-11-14 13:36:12 +08:00
Matthias Kuhn
4981bfcf18 Fix memory leak 2016-11-11 16:55:57 +01:00
Nyall Dawson
1ef7ed53c9 Merge pull request #3703 from aaime/svg_params
Export parametric SVG, will fallback symbols for the systems that cannot understand them
2016-11-11 13:25:48 +10:00
Stéphane Brunner
6cf47bef1e Apply some @m-kuhn comments (#3736)
* Use QgsStringMap

* Better description

* Use new translated metadata methods
2016-11-08 23:16:11 +01:00
volaya
72fddb8b5e Merge pull request #3470 from arnaud-morvan/refactor_fields_context_generator
[Processing] Fix processing refactor fields algorithm using expression context generators
2016-11-08 10:45:32 +01:00
Nyall Dawson
fcb6c2bb9a Fix some incorrect return values from QgsFeature python bindings 2016-11-08 12:54:19 +10:00
Nyall Dawson
f9bb230665 Avoid some QgsGeometry pointer use in QgsGeometry API 2016-11-08 11:09:19 +10:00
Nyall Dawson
02ea2d7703 Fix typos 2016-11-08 09:05:47 +10:00
Nyall Dawson
1fea20de50 Split handling of literal default values from provider side
default value SQL clauses

QgsVectorDataProvider now has two methods:

- defaultValueClause: returns SQL fragment which must be evaluated
by the provider to obtain the default value, eg sequence values
- defaultValue: returns the literal constant default value
for a field
2016-11-08 08:18:16 +10:00
Stéphane Brunner
59b10d65b7 Merge pull request #3720 from sbrunner/WFS-provider-metadata
Add metadata for WFS provider in layer metadata informations
2016-11-07 17:15:03 +01:00
Stéphane Brunner
bc1ad2ce82 Add metadata for WFS provider in layer metadata informations 2016-11-07 16:46:39 +01:00