152 Commits

Author SHA1 Message Date
Blottiere Paul
7a8a5411e0 [FEATURE][composer] Add tools for drawing polygon and polylines 2016-04-01 11:05:03 +11:00
Juergen E. Fischer
2ea3d7744d port more WKB parsing to Qgs(Const)WkbPtr including bounds checking 2016-02-09 14:20:07 +01:00
Nyall Dawson
ddabad247f Move unit handling helpers out of QGis and QgsSymbolLayerUtils
into a new QgsUnitTypes helper class. Add unit tests.

TODO QGIS 3.0: Move QGis::UnitType and QgsSymbolV2::OutputUnit
to QgsUnitTypes
2016-02-04 08:01:32 +11:00
Denis Rouzaud
a1705ad652 order include in sip files 2016-01-15 15:28:03 +01:00
Matthias Kuhn
0c02f1812e [FEATURE] Add 2.5D Renderer
This adds a configuration interface and renderer that makes it easy to
put all the pieces together which are required to get a 2.5D effect.

It allow for configuring some of the styling and is meant to create an
easy-to-use setup.

Since every part of the system is built around QGIS' internal rendering
and symbology engine, there is much to fine tune. To get all the
possibilities, just change the renderer to a graduated, categorized or
single symbol renderer upon creation and you will find full access to
improve the style to your needs.

Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2016-01-15 12:37:50 +01:00
Matthias Kuhn
9b51007071 Add transaction groups 2016-01-15 12:18:44 +01:00
Martin Dobias
b83f6e359a Merge pull request #2665 from wonder-sk/auto-trace
[FEATURE] Tracing of features (digitizing)

Tracing can be now used in various capturing map tools (add feature, add part, ...) including reshape and split tools.

Tracing is simply a new mode for these tools - when tracing is not enabled, the tools work as usual. When tracing is enabled (by clicking the new magnet icon or pressing T key), tools switch to tracing behavior:
- first click on a vertex/edge (must be snapped!) will start tracing - moving mouse on top of the map continuously updates the trace
- next click will confirm the trace and mark start of a new trace Tracing can be enabled/disabled anytime even while digitizing one feature, so it is possible to digitize some parts of the feature with tracing enabled and other parts with tracing disabled.

Tracing respects snapping configuration for the list of traceable layers.

If there are too many features in map display, tracing is disabled to avoid potentially long tracing structure preparation and large memory overhead. After zooming in or disabling some layers the tracing is enabled again.

Internally, things work like this:
- when tracing is requested, linestrings are extracted from vector layers, then noded (using GEOSNode to resolve all intersections) and finally a simple planar graph is built (vertices + edges)
- when tracing, endpoints are temporarily added to the graph (if not equal to one of existing vertices already) and Dijkstra's algorithm is run to get shortest path

Original specs for the curious ones (the interaction with QGIS is slightly improved from what has been specified): http://www.lutraconsulting.co.uk/crowdfunding/autotrace-phase-2/specification.pdf
2016-01-13 12:18:00 +01:00
Martin Dobias
3883a2e5fc [tracer] added docs and sip files 2016-01-11 20:57:28 +01:00
Hugo Mercier
bbf2137940 Allow to filter joined fields with a virtual layer 2016-01-07 16:34:34 +01: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
Hugo Mercier
e60712e7cf Add a provider for virtual layers 2015-12-18 19:45:58 +02: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
Matthias Kuhn
a50f2d051f Refactor edit form configuration out of QgsVectorLayer 2015-11-19 15:32:28 +01:00
Stéphane Brunner
c9f0d83aaf The plugin define the following methods:
* layerFilterExpression
  Return an additional filter, used in
  WMS/GetMap, WMS/GetFeatureInfo, WFS/GetFeature to filter the features
* layerFilterSubsetString
  Return an additional the subset string (typically SQL) filter.
  Faster than the layerFilterExpression but not supported on all the
  type of layer
* layerPermissions
  Change the rights on the layer per user (known by the plugin)
  Concern rights: publish, insert, update, delete.
  Mostly used in WFS/Transaction, and the publish in all requests.
* authorizedLayerAttributes
  Be able to show some attributes only for a subset of user
  Used in: WMS/GetFeatureInfo, WFS/GetFeature
* allowToEdit
  Be able to don't allow to edit a particular feature, in our case base
  on the Geometry
  Used in: WFS/Transaction
* cacheKey
  Cache key to used to create the capabilities cache, "" for no cache,
  shouldn't contains any "-", default to ""
2015-11-18 14:49:43 +01:00
Matthias Kuhn
313c34ce22 [py3] Updates to sip files 2015-11-16 07:42:48 +01:00
Juergen E. Fischer
2126011d31 revive QSqlDatabase (followup c894357a) 2015-09-30 17:32:53 +02:00
Larry Shaffer
c894357a94 [auth system] Python bindings for core and gui classes 2015-09-21 08:51:19 -06:00
Nathan Woodrow
2f60a5f85c [Conditional Styles] Better defaults
Add QgsConditionalLayerStyles to hold row and field styles
2015-08-25 21:08:55 +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
Nathan Woodrow
faa32f36cf [FEATURE] Conditional formatting for attribute table cells 2015-08-20 23:06:31 +10:00
Nyall Dawson
73522dce7e Refactor visibility presets, so that all non-app specific
methods are now in core

A new QgsVisibilityPresetCollection object has been created
which stores a set of visibility presets. QgsProject now
contains a preset collection object.

This allows plugins and other core objects to retrieve and
modify visibility presets.
2015-08-19 19:07:23 +10:00
Nyall Dawson
feb3bee858 Add a bunch of optimised fuzzy string matching algorithms.
A new QgsStringUtils class has been added containing some
common fuzzy matching algorithms, including Levenshtein edit
distance and Soundex. These can be used for finding "similar"
strings in a table.

Expression functions for these algorithms have also been
added to a new "Fuzzy Matching" group.
2015-06-27 11:51:56 +10:00
Marco Hugentobler
7b31f8a02f Remove python bindings for QgsGeos, move createGeometryEngine() from edit utils to QgsGeometry class 2015-06-25 10:45:53 +02:00
Juergen E. Fischer
ec0e971c30 add missing sip bindings 2015-06-11 19:19:00 +02:00
Marco Hugentobler
68fe5f5791 [FEATURE:] New geometry classes 2015-05-25 08:53:49 +02:00
Nyall Dawson
17962ef47b Add QgsHistogram class for calculating numeric histograms from a
list of values or a vector layer's attribute.
2015-05-19 02:21:15 +10:00
Nyall Dawson
154468bd84 Add QgsStatisticalSummary class for calculating stats from a list
of values.
2015-05-02 23:19:39 +10:00
Nyall Dawson
721d9f5908 Formatting and code cleanups for QgsScaleExpression 2015-04-30 06:28:05 +10:00
Nyall Dawson
742f3233ee [FEATURE] Paint effects for layers and symbol layers
This commit adds a new framework for implementing paint effects, which
modify the results of QPainter operations to apply visual effects
such as drop shadows and blurs.

The initial implementation allows for effects to be applied to entire
layers and individual symbol layers.

Included are a drop shadow, inner shadow, blur, inner glow, outer glow,
colorise and transform effect. A "stack" effect is also implemented
which allows other paint effects to be combined in various ways.

Sponsored by hundreds of generous kickstarter contributors!
2015-03-28 20:04:50 +11:00
Juergen E. Fischer
80bbed1595 include qgslayerdefinition.sip in bindings 2015-03-24 13:19:03 +01:00
Martin Dobias
cdb44a3cc6 Browser: Abstract creation of custom data items into QgsDataItemProvider 2015-03-05 00:13:05 +07:00
Nyall Dawson
be2d6d1a70 New QgsImageOperation class for operations that modify QImages
Contains framework for multithreaded operations on QImages, and
numerous operations such as grayscale, hue/saturation, brightness/
contrast modification, flip, blur, distance transform, alpha
modification and color overlays.
2015-01-21 18:58:10 +11:00
mhugent
a2a82d2fe5 Merge pull request #1830 from manisandro/transaction
[FEATURE] Transactional editing for postgres layers
2015-01-20 17:22:55 +01:00
Martin Dobias
83770dfd9e Hook snapping utils into QGIS interface
Now the new snapping engine is ues for add feature map tool
2015-01-20 10:18:39 +07:00
Sandro Mani
40ad3b0993 [FEATURE]: Transactional editing for postgres layers (other datasources possible in the future). Funded by City of Uster 2015-01-19 15:22:20 +01:00
Martin Dobias
2144be0ac1 Add Python bindings for map layer style manager 2015-01-07 20:15:11 +07:00
Nyall Dawson
727747658b [FEATURE] Live heatmap renderer
Allows for live, dynamic heatmaps for point layers. Options include
specifying heatmap radius in pixels, mm or map units, choice of
color ramp, and a slider for selecting a tradeoff between render
speed and quality.
2014-11-22 13:03:54 +11:00
Matthias Kuhn
b28dcb9cbc [unit tests] Add multirenderchecker
The multirenderchecker allows to have several images, each with its own set of
anomalies distributed in several subdirectories.
With the help of multiple reference images, it is possible to apply a color
tolerance to each of these
2014-11-14 18:30:27 +01:00
Nyall Dawson
ccad38bf33 [composer] Clean up QgsComposerMap api, add docs and missing sip bindings for composer overviews 2014-09-21 00:47:57 +10:00
Nyall Dawson
9fd73901a6 [composer] API docs and python bindings for QgsComposerTableV2 (sponsored
by City of Uster, Switzerland)
2014-09-17 22:58:49 +10:00
Nyall Dawson
1b773165f2 [composer] Update sip bindings, add missing sip bindings for
QgsComposerMapGrid (sponsored by NIWA, New Zealand)
2014-09-03 21:22:29 +10:00
Martin Dobias
68ed52e963 API fixes, added missing python wrappers 2014-09-01 10:10:37 +07:00
Martin Dobias
ee3d67bcf3 Update Python bindings 2014-09-01 10:10:37 +07:00
Martin Dobias
89941f6b0a Moved QgsLayerTreeModelLegendNode (+derived classes) to a new file 2014-09-01 10:10:36 +07:00
Martin Dobias
6891aae19a Use QgsLayerTreeModel as a source of data for legend rendering instead of QgsLegendModel
This is work in progress, customization of legend is not working yet
2014-09-01 10:10:36 +07:00
Nyall Dawson
f93e536a00 Add a simplified class for fetching HTTP network content 2014-08-19 20:49:10 +10:00
Nyall Dawson
bfff4bd6b2 [FEATURE] New version of color button (QgsColorButtonV2) based off
QToolButton. Features:
- context menu items have been moved to the attached menu button
- new gui widget QgsColorSwatchGrid, which displays a grid of colors
- new class for QgsColorScheme, which generates colors to show in a
  color swatch grid
- new class QgsColorSchemeRegistry, with a global instance containing
  default color schemes. QgsColorButtonV2 accepts a color scheme
  registry, to control which schemes to show in the popup menu as
  color swatch grids.
- color button can have a default color
- color button can also be quickly set to a totally transparent color
- c++ and python unit tests for all core components
2014-08-11 20:37:52 +10:00
Nyall Dawson
4506b81537 [FEATURE][composer] Implement an item tree panel for composer windows
(fix #4358). Allows for selection of items, hiding/showing items,
toggling lock status of items and double-clicking to edit item id.
2014-07-30 20:01:05 +10:00
Martin Dobias
57dcfca487 Legend refactoring: first steps towards legend customization
- map layers have associated QgsMapLayerLegend instance
- QgsMapLayerLegend is interface for generation of legend with some default implementations
- QgsLayerTreeModelLegendNode is interface for representation of legend item in layer tree model with some default implementations
2014-07-17 20:49:30 +02:00