294 Commits

Author SHA1 Message Date
Nyall Dawson
0b0ccc9e9d Rename QgsVectorLayer::selectedFeaturesIterator to getSelectedFeatures
It's more in line with QgsVectorLayer::getFeatures, hence a more
discoverable API
2017-04-27 11:16:10 +10:00
Nyall Dawson
e9f13d1ea3 Just use standard QgsMessageLog functionality instead of a dedicated
method for processing
2017-04-26 13:57:06 +10:00
Nyall Dawson
1394c28d13 [processing] Move some log handling to c++ class 2017-04-26 13:56:29 +10:00
Nyall Dawson
fea6bff707 Merge pull request #4389 from nyalldawson/scalebar
Refactor scalebar renderer, split from composer
2017-04-26 12:40:06 +10:00
Nyall Dawson
b40bc0c1f7 Refactor scale bar rendering
Move all scalebar rendering code out of composer and ensure that
all scalebar rendering is done independant of QgsComposerScaleBar

This allows scalebar rendering code to be reused by plugins
and by non-composer code.

Also rename QgsScaleBarStyle -> QgsScaleBarRenderer, (and all
subclasses too). This name better reflects what these classes do.
2017-04-26 11:46:51 +10:00
Nyall Dawson
c4578c3c1d QgsVectorLayer is a QgsFeatureSink
Also cleanup API for addFeature(s) in QgsVectorLayer, by removing
the unused extra argument from addFeature() and be removing the
makeSelected argument from addFeatures() (code should be adapted
to manually select added features after adding if desired - this
was only used in a single place in the QGIS code and I suspect
this was unintentional in any case)
2017-04-26 11:32:34 +10:00
Alessandro Pasotti
cbcd193875 [server] Add to API break and pass enum by value 2017-04-22 13:56:00 +02:00
Martin Dobias
25ed76b86e Move labeling engine config to a new class + QgsPalLabeling cleanup
Another bit to make core library independent from QgsProject::instance().
Until now labeling engine configuration was taken from project singleton.

Removed legacy methods from QgsPalLabeling - the class now does not have
any more member variables/methods, it is just a bunch of helper functions.

(PR #4384)
2017-04-21 18:04:09 +08:00
Martin Dobias
24c5b0326f Rewrite addTopologicalPoints() and remove legacy snapping code + unit test 2017-04-19 11:24:20 +08:00
Nyall Dawson
cc5b9bfe17 More QgsDistanceArea API cleanups and simplification
- setEllipsoidalMode() was removed. Ellipsoidal calculations are
now enabled whenever a valid ellipsoid() has been set. Set the
ellipsoid to 'NONE' to disable ellipsoidal calculations.

- ellipsoidalEnabled() was removed. Ellipsoidal calculations
are now enabled whenever a valid ellipsoid() is set. Check
willUseEllipsoid() to determine whether ellipsoidal
calculations will be performed.

- sourceCrs() and setSourceCrs() now always take and return
QgsCoordinateReferenceSystem objects. All string/ID based CRS
methods were removed.

- geographic() was removed. This was only used internally
in one place, so was replaced with sourceCrs().isGeographic() instead.

- some largely overlapping measurement functions were consolidated
2017-04-18 08:14:16 +10:00
Martin Dobias
7b202edf04 Remove QgsVectorLayer::snapPoint() and unused code in QgsSelectedFeature 2017-04-17 17:37:16 +08:00
Martin Dobias
316d9c3359 R.I.P. QgsSnapper and QgsMapCanvasSnapper
These classes have been replaced by more efficient and flexible classes
(see QgsPointLocator, QgsSnappingUtils, QgsMapCanvasSnappingUtils)
2017-04-17 17:08:48 +08:00
Nyall Dawson
96d5b9dae6 Implement a QGIS 3.0 TODO for QgsMessageLogViewer, cleanup docs 2017-04-17 10:55:53 +10:00
Nyall Dawson
5fb63c066f Make QgsRectangle protected members private
This class is not designed to be subclassed
2017-04-11 14:55:57 +10:00
Nyall Dawson
f2a7dcbdd7 Rename QgsMapLayer::metadata -> htmlMetadata()
Frees up metadata() for use as a structured metadata getter
2017-04-10 18:45:00 +10:00
Nyall Dawson
1128373830 Remove QgsMapLayer::invalidTransformInput slot
Calling slot does nothing and is not used anywhere
2017-04-10 17:09:43 +10:00
Nyall Dawson
fdcf04f9f3 Remove AlgorithmProvider
Totally ported to QgsProcessingProvider
2017-04-07 13:21:28 +10:00
Nyall Dawson
fb1cf1e185 Remove processing algList
All functionality has been moved to QgsProcessingRegistry
2017-04-07 13:21:28 +10:00
Nyall Dawson
4970bb4cd5 Move more algList functionality to QgsProcessingRegistry 2017-04-07 13:21:28 +10:00
Nyall Dawson
5ccc6cccef Update api break docs, sipify QgsRasterFileWriter 2017-04-07 09:21:26 +10:00
Nyall Dawson
ae59e35dac Complete daily allocation of Qt5 connect transitions 2017-04-04 09:40:25 +10:00
Juergen E. Fischer
9ac70a009c fix api break dox for QgsLayerTreeMapCanvasBridge custom layer order 2017-04-03 18:35:12 +02:00
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