220 Commits

Author SHA1 Message Date
Nyall Dawson
ede452be85 [processing] Port feedback object to c++
Algorithms are now passed a QgsProcessingFeedback object
instead of the loosely defined progress parameter.
2017-01-11 11:11:10 +10:00
Nyall Dawson
dca697b427 [processing] New c++ QgsProcessingRegistry class
Intended as a registry for the various processing components,
including providers, algorithms and various parameters and outputs.

Currently handles only registration of providers, as a step toward
removing processing's algList (this requires first porting
the algorithm class to c++)

A QgsProcessingRegistry instance is attached to QgsApplication,
and is retrieved by QgsApplication::processingRegistry()
2017-01-11 10:55:15 +10:00
Nyall Dawson
bb24dfe245 [processing] c++ base class for providers
Nothing particularly exciting here yet, but this commit
moves the definition of the provider base class to a c++
QgsProcessingProvider abstract base class.

As part of this some existing python methods were renamed
to make their use clearer and to fit with the QGIS c++
api conventions:

- getName was renamed to id
- getDescription was renamed to name
- getIcon was renamed to icon

These API breaks are documented
2017-01-11 10:55:15 +10:00
Matthias Kuhn
0190e506a6 Move QgsConfigurationMap to QgsXmlUtils 2016-12-20 01:20:08 +01:00
Matthias Kuhn
22c492e6e5 Rename QgsFieldKit to QgsFieldFormatter 2016-12-20 01:20:08 +01:00
Matthias Kuhn
9fd0802939 Remove QgsEditorWidgetConfig
This is replaced with a QVariantMap. It was never really more than this in the
past and with the switch to QgsConfigurationProperties, there is really no
longer any reason to assume that this will change.
2016-12-20 01:20:08 +01:00
Matthias Kuhn
826c44092b Python bindings 2016-12-20 01:20:08 +01:00
Matthias Kuhn
80b3bfdf18 Add QgsConfigurationProperty class
This class holds a QVariantMap to manage key-value-pairs where each
value can be a string, bool, int, double or itself a map and can be
stored to and restored from XML.
2016-12-20 01:20:08 +01:00
Even Rouault
532eb58d1f [FEATURE] Implement raster auto-stretching when updating canvas
This commit implements the improvements described at:
https://lists.osgeo.org/pipermail/qgis-developer/2016-September/044393.html

The QgsRasterMinMaxWidget now offers a seetting to specify that the statistics
should be computed each time the canvas extent changes.

Other changes:
- the content of the QgsRasterMinMaxWidget is now persistant.
- there is no longer any Load button. The global Apply / OK button of the raster
  properties dialog has this effect.
- the default "limits" for single band raster is now MinMax and not CumulativeCut
- the default "limits" can be configured for single band, multi band single byte and
  multi band multi byte
- "Strech using current extent" honours the "limits" instead of forcing min/max.
2016-12-16 12:36:06 +01:00
Martin Dobias
c783be1d04 Rename QgsComposerLegendStyle to QgsLegendStyle 2016-12-12 03:23:02 +08:00
Martin Dobias
3efc28d07b Remove legacy class QgsComposerLegendItem and subclasses 2016-12-12 02:42:04 +08:00
Martin Dobias
d56a97d4fe Merge QgsMapLayerRegistry into QgsProject
All methods/signals of QgsMapLayerRegistry moved verbatim to QgsProject.
2016-12-10 15:18:12 +08:00
Nyall Dawson
ebae15f23a Framework for task manager
Adds new classes:
- QgsTask. An interface for long-running background tasks
- QgsTaskManager. Handles groups of tasks - also available as a global
instance for tracking application wide tasks
- QgsTaskManagerWidget. A list view for showing active tasks and their
progress, and for cancelling them

A new dock widget has been added with a task manager widget showing
global tasks
2016-12-05 14:08:10 +10: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
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
cb94b68d88 Move constraint handling to QgsFieldConstraints
Avoids cluttering QgsField API
2016-11-02 11:07:07 +10:00
Nyall Dawson
b7d0fd6f90 New class QgsVectorLayerUtils
Contains static helper methods for working with vector layers.
Initially only contains a method to test whether a value
exists within a layer's attributes.
2016-11-02 11:07:07 +10:00
Nyall Dawson
5f241d6288 Implicitly shared text settings classes 2016-10-24 12:02:00 +10:00
Matthias Kuhn
54b953f433 Cleanup and modernize QgsProject code 2016-10-23 20:54:41 +02:00
Denis Rouzaud
64d3c788f1 Use toolbar or status bar for snapping config 2016-10-20 12:56:35 +02:00
Nyall Dawson
fb860fb618 New class QgsBearingUtils with method to calculate true north 2016-10-18 13:45:52 +10:00
Matthias Kuhn
b6779f63ff Rename QgsFields::fieldNameIndex() to lookupField()
To have two clearly different names for tolerant/intolerant index lookup
2016-10-01 15:39:03 +02:00
Nyall Dawson
36e276f993 [FEATURE] Point cluster renderer
Groups nearby points into a single rendered marker symbol.

QgsPointDisplacementRenderer has been split into a new
pure virtual QgsPointDistanceRenderer base class which handles the
detection of clusters and grouping of points. The new cluster
renderer reuses this base class to avoid code duplication.

Additionally, some improvements have been made to the
displacement renderer, specifically:
- points are now assigned to the group which is "nearest" them,
rather then just assigning them first group within the search
distance. In some cases this was assigning features to a more
distant cluster, resulting in less predictable cluster patterns
- individual points are now correctly shown in their own
selection state

Lots of code cleanup + documentation too.

Sponsored by:
- Andreas Neumann
- Qtibia Engineering (Tudor Barascu)
- Karl-Magnus Jönsson
- Geonesia (Nicolas Ponzo)
- Plus numerous additional anonymous backers whose generous
contributions are also highly valued!
2016-09-30 08:42:16 +10:00
Nyall Dawson
ac4f662899 Move deprecated QgsHttpTransaction to server 2016-09-21 09:12:54 +10:00
Nyall Dawson
3c4f46dc79 Remove more code disabled under Qt5
Add todo note for QgsHttpTransaction and disable under docs and
sip bindings
2016-09-21 09:12:54 +10:00
Nyall Dawson
25125b089e Remove deprecated composer methods 2016-09-14 07:20:17 +10:00
Matthias Kuhn
8cf0ef93c4 Add QgsOptional and QgsOptionalExpression 2016-09-09 14:26:24 +02:00
Patrick Valsecchi
7169079f91 Smarter default edit widgets with plugins to pick them
Now the widgets factories can give a score on how good they could handle
a widget.

Additionaly, plugins can be added to choose a widget factory in function
of an external information. One of them uses a table in PostgresQL to
allow specification of the widget type and configuration.

I took the opportunity to remove a few deprecated method in relation to
this.
2016-09-05 14:22:17 +02:00
Hugo Mercier
0749ba43ba Rework layer dependencies
A new class QgsMapLayerDependency allows to represent different kinds
of dependencies between layers.
2016-08-31 14:40:13 +02:00
Matthias Kuhn
b1448233e9 Move QgsMapLayerProxyModel and QgsMapLayerProxyModel to core
Because it's also useful for non-widget applications
2016-08-29 18:43:20 +02:00
Nyall Dawson
932e469e5f Rename color ramp classes to more sensible names
QgsVectorColorRamp -> QgsColorRamp
QgsVectorGradientColorRamp -> QgsGradientColorRamp
QgsRandomColors -> QgsRandomColorRamp
QgsRandomColorRamp -> QgsLimitedRandomColorRamp
QgsVectorColorBrewerColorRamp -> QgsColorBrewerColorRamp

These color ramps are used throughout all of QGIS (not
just in vector symbology) and the current names are
misleading.
2016-08-24 21:01:03 +10:00
Nyall Dawson
cb313761ca Remove unused QgsProvider(Count|ExtentCalc)Event classes 2016-08-23 10:03:52 +10:00
Matthias Kuhn
5c20f0782a Cleanup QgsEditFormConfig
* It's now implicitly shared, meaning that changes to the config
   can be supervised and a signal is sent from QgsVectorLayer and
   there is no risk of elements suddenly being deleted.
 * Remove a bunch of methods that were in QgsVectorLayer for legacy
   reasons.
2016-08-19 09:03:07 +02:00
Matthias Kuhn
58ea21124e Streamline expression context generation (#3350)
* Save more data to QML

 * Virtual fields
 * Map tips
 * Display expression
 * Read only flag

* Streamline expression context generation

Whenever an object is able to generate an expression context it
implements the method createExpressionContext() declared in
QgsExpressionContextGenerator.

This makes a cleaner API and allows using QgsFieldExpressionWidget and
QgsDataDefinedButton from python because standard OO programming
approaches are used instead of callbacks and void pointers.

* Colorize output of doc and sip tests

* Fix build

* Fix sip complaints

* Fix rebase problems

* Workaround failing bindings test
2016-08-10 19:44:30 +02:00
Juergen E. Fischer
3f22a7a77f another scripts/replacev2.sh with minor manual fixes 2016-08-10 12:12:28 +02:00
Nyall Dawson
c39088bace Remove deprecated QgsAttributeAction from sip bindings 2016-08-10 17:55:06 +10:00
Denis Rouzaud
bbb9b5322d remove QgsLegendModel 2016-08-05 20:53:58 +02:00
Denis Rouzaud
acbf5cddb4 renamed QgsSymbologyV2Conversion to QgsSymbologyConversion 2016-08-05 08:32:13 +02:00
Denis Rouzaud
275736de92 removed V2 from QgsSymbolV2* 2016-08-05 08:22:21 +02:00
Denis Rouzaud
c16d1393a2 removed V2 from QgsSymbolLayerV2* 2016-08-05 08:18:01 +02:00
Martin Dobias
9db9304627 Raster MTR improvements - part one (PR #3334) 2016-08-02 08:22:29 +02:00
Matthias Kuhn
3e33e686c1 Rename visibility presets to map themes
Because it is not only more descriptive for what it does but also
sounds more interesting.

[needs-docs]
2016-08-01 12:23:44 +02:00
Nyall Dawson
6c0d97a06b Merge pull request #3337 from nyalldawson/remove_psuedo_shader
Remove the broken, unused QgsPseudoColorShader class
2016-07-27 07:11:55 +10:00
Nyall Dawson
5ed31d887d Fix annotation position when maps are rotated, remove hacks
Adds a new interface class QgsAnnotation, and allows for removal
of a bunch of hacks in QgsComposerMap without breaking 2.x API
2016-07-26 10:18:19 +10:00
Nyall Dawson
ba26bc887a Remove the broken, unused QgsPseudoColorShader class 2016-07-26 10:11:57 +10:00
Martin Dobias
b6b5afd885 [FEATURE] Ability to cancel rendering of rasters + WMS/WCS support
The improvement allows immediate cancellation of raster rendering
in progress. Until now, even when map rendering got cancelled
(e.g. by zooming of panning canvas), the GUI got blocked while waiting
for raster layers to finish their rendering (only vector layers have
had support for cancellation). This should allow for much smoother
user experience while browsing maps including rasters.

The cancellation is supported currently by WMS/WMTS and WCS providers.
GDAL provider may also get support thanks to improvements in GDAL 2.

Funded by Land Information New Zealand.
2016-07-24 23:16:33 +02:00
Martin Dobias
ab4a83b49b Goodbye to QgsMapRenderer (#3333)
For the time being the class is kept in the server code while it is still being used there.
2016-07-24 22:40:52 +02:00
Martin Dobias
31c75ef22e Remove QgsLabel and QgsLabelAttributes + remove QgsPalLabeling from renderer jobs 2016-07-20 18:35:20 +08:00
Sandro Santilli
a211c982cf Allow to undo/redo composer grouping/ungrouping
Fixes #11371 (crash on ungrouping after moving the group) and more
undo/redo related issues.

Enable pending test for the crash (now passing) and add many more
undo/redo related ones (including signals testing).

Includes a new QgsGroupUngroupItemsCommand class
and its SIP bindings.
2016-06-17 13:41:56 +02:00
Sandro Mani
bded2b518c Remove QgsBillboardRegistry 2016-06-03 12:58:03 +02:00