272 Commits

Author SHA1 Message Date
Nyall Dawson
5813eb132b Modernise CharacterWidget API, move to sipify 2017-04-03 13:18:36 +10:00
Nyall Dawson
e8ef91ce98 Cleanup QgsRasterDataProvider/QgsRasterLayer progress reporting
Instead of progress changed signals on the provider/layer level,
instead use QgsFeedback arguments for methods which previously
emitted progress changed signals
2017-04-03 12:08:08 +10:00
Nyall Dawson
e400ab6249 Allow cancelation of raster stats/histogram operations 2017-04-03 12:08:08 +10:00
Nyall Dawson
a157db7627 Refactor QgsPalettedRasterRenderer to allow "gaps" in pixel values
Previously the renderer required that pixel values followed
sequential numerical order. This refactor allows values to
be skipped, so that only certain color index will be rendered.
2017-04-03 12:07:50 +10:00
Nyall Dawson
77e7693c48 Fix spelling errors in processing algorithm help 2017-03-25 16:23:29 +10:00
Matthias Kuhn
8cecf236df Document API breaks 2017-03-23 15:29:13 +01:00
Nyall Dawson
8593e38705 Add missing api break note 2017-03-22 11:15:40 +10:00
Nyall Dawson
b7d2b9fd72 Merge pull request #4283 from nyalldawson/filterrect
Remove QgsFeatureRequest::FilterRect
2017-03-22 07:38:53 +10:00
Nyall Dawson
041129d507 Fix loading composition triggers render of all composer maps
Also cleanup some more unused API methods
2017-03-21 10:32:53 +10:00
Nyall Dawson
885269ee78 Only create composer item config widgets on demand
Instead of creating them for all items when composer window
is opened, instead just create and destroy them when
required. None are too heavy to have a noticable delay
when selecting items, but in contrast keeping them around
forever is wasteful on memory.

Also clean up a lot of duplicate composer/composition
code and remove unnecessary signals from api (use a single
itemAdded signal instead of multiple signals for every
item type)
2017-03-21 10:32:53 +10:00
Nyall Dawson
3aef32a191 [composer] Rework interface composer methods
Since composer windows are now only created on demand, and
destroyed when the window is closed, the old interface methods
no longer apply. The new interface methods openComposers(),
openComposer(), closeComposer(), composerOpened(),
composerWillBeClosed() and composerClosed() are similar, but
only apply to composer windows when they are exist (i.e.
are currently open).

To access all compositions from a project, the project's
layoutManager() should be used instead.

Additionally, the new interface methods work with
QgsComposerInterface objects instead of QgsComposerView
objects. This should allow future hooks for plugins to interact
with open composer windows in a more useful way.
2017-03-21 10:32:53 +10:00
Nyall Dawson
f3e1772bb9 Remove QgsFeatureRequest::FilterRect
This enum value has not been in use since filter rects were
separated from other filter types. Leaving it in API is confusing
and leads to incorrect use.
2017-03-20 15:03:10 +10:00
Juergen E. Fischer
f9a5a76c8f fix duplicate labels in api_break.dox 2017-03-14 23:42:23 +01:00
Juergen E. Fischer
afdbf1bbbb fix FieldFormatter in pi_break.dox 2017-03-14 21:12:01 +01:00
Nyall Dawson
5eccaf6020 Project layer order returns all layers in order, not just visible ones
Otherwise map themes with different visible layers cannot be
correctly ordered
2017-03-13 12:52:55 +10:00
Nyall Dawson
8094cf996b Remove support for setting map units in QgsMapSettings, QgsMapCanvas and QgsDxfExport
In a post-OTF-disabled world these are no longer required. The
map units are dictated by the map units for the destination
CRS.

It's dangerous to separate these two properties as setting
the incorrect map units for a given CRS will result in
incorrect scale calculations.
2017-03-01 07:29:35 +10:00
Nyall Dawson
20c07a58e6 Remove support for disabling OTF reprojection
Because
- OTF reprojection is mature and stable
- Should be no cost when not required - transforms are shortcut
when not required
- Reduces code complexity
- Canvas OTF support was being incorrectly used as a flag for
whether measurements should be made in ellipsoidal mode. Instead
the project's ellipsoid setting should be checked for this.
- Should simplify behavior for new users
2017-03-01 07:29:35 +10:00
Nyall Dawson
b681b7bf3f Flip QgsMapCanvas connects to new style
Also remove unneeded duplicate signal
2017-02-28 11:06:38 +10:00
Nyall Dawson
5312965e61 Rename projection selection widgets and cleanup API
The current names for QgsProjectionSelector and
QgsGenericProjectionSelector are confusing
2017-02-28 09:45:31 +10:00
Nyall Dawson
47683fca4f [needs-docs] Rename Outline and Border -> Stroke
This change is being driven by:

- need for consistent terminology in the api. Currently there's
a confusing mix of border/outline used
- need for consistent terminology in the gui - we have a mix
of "border"/"outline"/"pen"
- bringing QGIS into line with the standard terminology used
in other graphic editing programs
2017-02-22 19:22:45 +10:00
Nyall Dawson
abc6129b60 Optimise expression context storage/retrieval of features
Shaves ~10% rendering time off a 1 million point layer
2017-02-22 13:45:35 +10:00
Matthias Kuhn
7e6695b0a0 Expose QgsRelation to QML
API changes for consistency:
  - setRelationName has been renamed to QgsRelation::setName
  - setRelationId has been renamed to QgsRelation::setId
2017-02-20 08:45:54 +01:00
Matthias Kuhn
35d9b83aa5 Merge pull request #4138 from nyalldawson/touch
Rework map touch tool
2017-02-16 12:00:16 +01:00
Martin Dobias
5f5c1ddb15 Use a path resolver class instead of QgsProject::instance() in map layers
A new class QgsPathResolver is introduced for conversion between absolute
and relative paths when reading/writing XML.

Cleaned up code in layer definition file support (.qlr) to better handle
relative/absolute path conversion.
2017-02-16 09:56:11 +08:00
Juergen E. Fischer
ca33329edc update some documentation references to QgsDataDefinedButton/QgsDataDefinedSymbolDialog 2017-02-15 09:22:58 +01:00
Juergen E. Fischer
23c09fc121 api_break.dox: QgsMapLayerRegistry was removed 2017-02-14 18:41:54 +01:00
Nyall Dawson
3ca0b90a97 Update sip bindings 2017-02-14 13:48:11 +10:00
Nyall Dawson
d457a894b3 Remove QgsDataDefined
Now completely replaced by QgsProperty and the properties framework
2017-02-14 13:48:11 +10:00
Nyall Dawson
be46f78d7c Remove QgsDataDefinedButton
Now completely replaced by QgsPropertyOverrideButton
2017-02-14 13:48:11 +10:00
Nyall Dawson
1b5bf1d289 Deprecate QgsScaleExpression
Has now been completely replaced by QgsSizeScalePropertyTransformer
2017-02-14 13:48:11 +10:00
Juergen E. Fischer
bb2a6c8033 oracle provider: followup 9ceb6c67 2017-02-12 10:00:42 +01:00
Nyall Dawson
a124fbfe62 Add API break notes for QgsMapToolTouch 2017-02-12 18:56:14 +10:00
Nyall Dawson
d47d31d13c Rename "Db"/"DB" in API to "Database"
Motivations:
- consistency - we generally use expanded names, and this also
matches Qt API which uses Database instead of Db
- avoids unpredictable capitalization throughout API (mix of "Db"
and "DB")
2017-02-07 09:32:05 +10:00
Alexander Bruy
95091d9342 Merge pull request #4062 from alexbruy/raster-provider
Use native QGIS raster API instead of GDAL API in zonal statistics
2017-02-02 10:54:03 +02:00
Denis Rouzaud
b340f04e7e Remove web view widget in favor of attachment (external resource) (#4074)
* remove photo widget config
* remove webview widget
* Remove mention of duplicate widgets
* Update api break
* migrate web view widgets to attachments
2017-02-01 07:18:13 +01:00
Nyall Dawson
d0e6e17816 QgsMapRendererCache can have multiple dependent layers for a cache image
In some cases the render result for a layer may depend on more than
one layer.

This changes QgsMapRendererCache to use "cache keys" instead of layer ids
to identify images within the cache. When setting an image inside the
cache, a new list parameter is used to specify all layers on which
that image depends.
2017-02-01 14:42:31 +10:00
Nyall Dawson
d74fbff0aa Make QgsMapRendererCache protected members private
This class isn't designed to be subclassed
2017-02-01 14:42:31 +10:00
Nyall Dawson
75506867aa Make protected members in QgsMapRendererJob not part of public API
QgsMapRendererJob and subclasses are not designed to be subclassed
outside of core QGIS code. Marking them private API allows us to
change them after API is frozen again.
2017-02-01 14:19:36 +10:00
Nyall Dawson
1fce65707c Add missing annotation api break docs, fix sip binding 2017-01-31 12:58:51 +10:00
Martin Dobias
7683cfacd3 Rework vector joins so they do not use QgsProject::instance()
The basic idea is to split reading of XML definition and resolution of layer IDs into layers.

Also includes some cleanups in QgsProject and improvements in QgsVectorLayerJoinInfo.
2017-01-31 09:33:02 +08:00
Nyall Dawson
afcb75af51 Remove QgsGeometry::isGeosEmpty
Use the faster native QgsGeometry::isEmpty instead
2017-01-31 07:19:56 +10:00
Nyall Dawson
49aae6e908 Rename QgsGeometry::isEmpty to isNull
Differentiates missing geometries from empty geometries (eg
empty geometry collections)
2017-01-30 21:58:23 +10:00
Martin Dobias
8ba609e516 Tidy up layer definitions code + removal of QgsProject::instance()
Moved code related to layer definitions away from QgsMapLayer
2017-01-29 23:22:37 +08:00
Alexander Bruy
d681e9cb06 update docs 2017-01-28 11:12:12 +02:00
Nyall Dawson
f4a9797b3d Merge pull request #4067 from nyalldawson/raster_ctor
Remove duplicate QgsRasterLayer constructor
2017-01-27 19:05:14 +10:00
Martin Dobias
0341478864 Remove code for reading of legacy (QGIS < 1.0) renderers
Also removes a bunch of unused old QMLs and upgrades one still in use
2017-01-27 16:02:48 +08:00
Martin Dobias
137eb3a0f9 Make layer tree implementation independent from QgsProject::instance()
Another bit in the project refactoring work to get rid of dependencies
on QgsProject singleton.

Reading of layer trees from XML is now split into two phases:
1. read XML and keep layer IDs
2. resolve layer IDs to QgsMapLayer instances (using QgsProject)

There are convenience methods to do both phases in one go.
2017-01-27 09:29:04 +08:00
Nyall Dawson
45fc6dc2fe Remove duplicate QgsRasterLayer constructor
Avoids confusing overload behavior when constructing QgsRasterLayers
from c++ code. This extra constructor was causing character literals
to be converted to a boolean loadDefaultStyle flag instead
of being used as the provider key. Removing the extra constructor
avoids this, and removes some duplicate code.
2017-01-27 11:13:52 +10:00
Martin Dobias
3a92b17418 Reading/saving labeling engine uses a particular QgsProject
... rather than using QgsProject::instance() internally

These are small cleanups to dig out some instance() uses and move them one level up...

At some point we should maybe make labeling engine configuration a part of QgsMapSettings
and have default project labeling engine config accessible from QgsProject
in a way similar to e.g. snapping configuration.
2017-01-26 10:56:50 +08:00
Nyall Dawson
a188d14f48 Remove map settings parameter from QgsComposition
Breaks the hard link between canvas and compositions!

Fix #11077
2017-01-24 14:32:08 +10:00