1761 Commits

Author SHA1 Message Date
Hugo Mercier
020dac0702 Allow to declare layer dependencies on a vector layer 2016-01-07 12:02:30 +01:00
Nyall Dawson
9d63022e4e Merge pull request #2638 from SebDieBln/FixStyleManagerUI
Fix some UI issues in style manager
2016-01-07 11:17:58 +11:00
Hugo Mercier
b46a593e32 Merge pull request #2617 from SebDieBln/FixLayerDefVectorJoins
Make vector joins work within layer-definition-files
2016-01-06 09:50:38 +01:00
Sebastian Dietrich
95e571c3f8 added functions to QgsStyleV2 for getting groups by id 2016-01-06 02:56:30 +01:00
Nyall Dawson
5e4c14cd40 [FEATURE] Control over label rendering order
A new control for setting a label's "z-index" has been added to
the labeling properties dialog. This control (which also accepts
data-defined overrides for individual features) determines the order
in which label are rendered. Label layers with a higher z-index
are rendered on top of labels from a layer with lower z-index.

Additionally, the logic has been tweaks so that if 2 labels have
matching z-indexes, then:
- if they are from the same layer, a smaller label will be drawn
above a larger label
- if they are from different layers, the labels will be drawn in
the same order as the layers themselves (ie respecting the order
set in the legend)

Diagrams can also have their z-index set (but not data defined)
so that the order of labels and diagrams can be controlled.

Note that this does *NOT* allow labels to be drawn below the
features from other layers, it just controls the order in which
labels are drawn on top of all the layer's features.

Fix #13888, #13559
2016-01-05 22:27:22 +11:00
Nyall Dawson
881074b194 Boost coverage of SIP bindings
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.

Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
2016-01-05 11:16:15 +11:00
Nyall Dawson
4cc590c929 Cleanup labeling, avoid some duplicate enums, add docs 2016-01-04 07:23:58 +11:00
Sebastian Dietrich
b2b44ccca9 split generating XML and saving to QLR-file into separate functions
This increases flexibility and is consistent with the loading of a QLR-file.
2016-01-01 21:34:22 +01:00
Nyall Dawson
766bfa1a7f Fix some more old style cast and float comparison warnings 2015-12-31 07:27:58 +11:00
Nyall Dawson
566dd4bd43 Always pass QgsFeatureId by value, not reference
Since it's just a int64, it's faster to pass by value
2015-12-30 22:51:32 +11:00
Juergen E. Fischer
71dc339106 more stl to qt ports and size_t => int fixups 2015-12-26 00:59:09 +01:00
Juergen E. Fischer
8f29f28d5c fix windows build and some warnings 2015-12-24 02:17:59 +01:00
rldhont
a32587bcd1 [FEATURE][QGIS Server] Add short name to layers, groups and project
A number of elements have both a <Name> and a <Title>. The Name is a text string used for machine-to-machine
communication while the Title is for the benefit of humans. For example, a dataset might have the descriptive Title
“Maximum Atmospheric Temperature” and be requested using the abbreviated Name “ATMAX”.

User can already set title for layers, groups and project. OWS name is based on the name used in layer tree. This name is more a label for humans than a name for machine-to-machine communication.

To add the capability to users to define Name as a text string for machine-to-machine communication, this pull-request adds:
* short name line edits to layers properties
* WMS data dialog to layer tree group (short name, title, abstract)
* short name line edits to project properties
* add a regexp validator "^[A-Za-z][A-Za-z0-9\._-]*" to short name line edit accessible through a static method
* add a TreeName element in the fullProjectSettings

If a short name has been set for layers, groups and project it is used by QGIS Sever as the layer name.
2015-12-23 10:03:04 +01:00
Matthias Kuhn
e6a265c103 Merge pull request #2600 from m-kuhn/orderby-renderer
Allow definition of feature rendering order
2015-12-22 17:45:01 +01:00
Matthias Kuhn
52a39fc286 QgsSymbolV2 may not be copied 2015-12-22 16:39:22 +01:00
Matthias Kuhn
168c6f70bc Rename OrderBys -> OrderBy and OrderBy -> OrderByClause
And some sip fixes
2015-12-22 09:12:32 +01:00
Matthias Kuhn
a5f88181f6 Fix fallback orderby and attribute subset
Also properly closes the iterator when a fallback orderby is used
2015-12-22 09:12:32 +01:00
Nyall Dawson
6122f0462d Remove unimplemented QgsSurfaceV2::pointOnSurface method
Was always returning a point not on the surface! (0,0). Use the
GEOS method instead.
2015-12-22 16:50:37 +11:00
rldhont
f7566710af [Doc] Update QgsMapLayer documentation
Add documentation string to 10 QgsMapLayer methods.
2015-12-21 17:33:47 +01:00
Hugo Mercier
e60712e7cf Add a provider for virtual layers 2015-12-18 19:45:58 +02:00
Matthias Kuhn
d96a2748b6 Add Order By Clause 2015-12-18 18:36:43 +01:00
Nyall Dawson
4511cc474e Fix doxygen warning 2015-12-18 16:03:05 +11:00
Matthias Kuhn
de1c319bf6 Implicit sharing for QgsExpression 2015-12-15 13:39:07 +01:00
Nyall Dawson
85eebff69b Avoid some unnecessary object conversion during point rendering 2015-12-15 22:36:49 +11:00
Nyall Dawson
4e18d54555 Tests and fixes for QgsPolygonV2
- Setting exterior ring will force all interior rings to match
dimensionality of exterior ring
- add equality operator
- use correct WKB types for rings when creating polygon from WKB
- segmentize curves when setting exterior ring with curved segments
- fix export to GML2/3 (should use LinearRing, not LineString as
ring element tag)
2015-12-15 22:36:41 +11:00
Nyall Dawson
62f90d0c5e Merge pull request #2569 from SebDieBln/Improve_CrsReadXML
Improve QgsCoordinateReferenceSystem::readXML()
2015-12-12 11:47:32 +11:00
Sebastian Dietrich
2d0be1cf69 Changed the parameter of QgsCoordinateReferenceSystem::readXML() to const
and removed const_cast<> where not needed any longer
2015-12-12 00:05:10 +01:00
Juergen E. Fischer
6e3b1da10e dxf export: add doxymentation 2015-12-11 23:16:08 +01:00
Nyall Dawson
c176e3f41e Fix documentation test failure 2015-12-11 19:30:15 +11:00
Nyall Dawson
233f67b419 QgsPolygonV2 tests and fixes
- fixes for handling Polygon25D
- add QgsAbstractGeometryV2::convertTo( QgsWKBTypes::Type type ) for
easy conversion between geometry types
- fix crash when calculating perimeter with no exterior ring
- ensure that added rings respect dimensionality of polygon (avoids
issues such as polygons with z having a ring without z, or a
Polygon25D with LineStringZ rings)
- if a curved ring is added to a polygon then a segmentized version
of the ring is used (can't have a Polygon with a CircularString
ring)
- when calling setInteriorRings, make sure empty rings are skipped
and that all rings are converted to correct type for polygon
- don't crash when requesting or removing interior ring with
index < 0
2015-12-11 18:40:11 +11:00
Nyall Dawson
d2bf8d8923 Add equality operators to QgsLineStringV2 2015-12-11 18:40:11 +11:00
Nathan Woodrow
6dfffc5f12 Add missing docs 2015-12-11 15:12:11 +10:00
Nathan Woodrow
bc67c082ad Add missing SIP and docs 2015-12-11 14:11:02 +10:00
Nathan Woodrow
ffd7c9436f [FEATURE] Add project loading support from browser 2015-12-11 14:08:03 +10:00
Nathan Woodrow
d021100e5e [FEATURE] Allow hiding paths from the browser panel 2015-12-11 10:21:07 +10:00
Matthias Kuhn
ac5ff0c2ca Fix doxymentation also in sip 2015-12-10 15:57:21 +01:00
Matthias Kuhn
c423d64a8e Reduce wkb parsing 2015-12-10 12:33:43 +01:00
Matthias Kuhn
123a60e651 [sip, doxygen] Geometry modifier bindings
and lots of doxymentation
2015-12-10 12:33:43 +01:00
Matthias Kuhn
17f9d554f8 [FEATURE] Add geometry generator symbols 2015-12-10 12:33:43 +01:00
Nathan Woodrow
e9ef51341c Use geometry by default on custom expression functions
Got burnt by my own code. Them feels.
2015-12-09 13:02:58 +10:00
Nyall Dawson
6e140b97fd [FEATURE] Edit legend symbols directly from layer tree
This adds a new "edit symbol" item to the right-click menu for a
renderer child legend item (eg categories for the categorised
renderer). Selecting it opens a symbol editor dialog which allows
for directly editing the classes symbol. It's much faster than
opening the layer properties and going through the style tab.
2015-12-09 07:25:03 +11:00
Nyall Dawson
83e139a550 Add method for retrieving legend nodes by layer ID and legend rule key 2015-12-09 06:01:12 +11:00
Matthias Kuhn
197ee6cb3a Fallback to pure PyQt4 for the moment
Fix #13948

Will probably require some packaging adjustments when reintroducing this.
2015-12-08 16:19:53 +01:00
Matthias Kuhn
86abb26b62 Add sip bindings 2015-12-08 15:49:02 +01:00
Nyall Dawson
8cac36433d [FEATURE] Add support for transparency in SVG color params
...and update all bundled SVGs to suit

Non-bundled SVGs must add:

fill-opacity="param(fill-opacity)"
and
stroke-opacity="param(outline-opacity)"

to enable transparency support
2015-12-08 22:45:51 +11:00
Nyall Dawson
9cc9d424ce Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.

It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.

Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
2015-12-07 21:55:36 +11:00
Nyall Dawson
de1001b9f7 Fix SIP type handling for QgsColorScheme subclasses 2015-12-07 21:55:36 +11:00
Nyall Dawson
91f7918e21 [FEATURE] Add a show/hide all context menu for layer tree symbol items
Allows toggling on/off all the symbol items for categorized/graduated/
rule based layers via the right click menu on an item. Previously
you'd have to manually toggle each item one-by-one.

Fix #13458
2015-12-07 07:39:20 +11:00
elpaso
e5ca63deed Refactored the python init function selector
Do not rely on the presence of a dot to load
a module. Loading a module can now be achieved
through the code editor in the dialog.

* added an option to load from environment
* added a file selector to specify the file
* changed tooltips accordingly
2015-12-05 09:45:09 +01:00
Nyall Dawson
edb16d0014 [FEATURE] Feature limit support for feature requests
Limits the maximum number of features returned by the iterator.
Some providers (postgres, spatialite, MS SQL) pass the limit on
to the provider to result in faster queries.
2015-12-05 10:24:42 +11:00