The geometry cache was only used for few geometry editing operations anyway. In earlier versions
of QGIS the geometry cache was also used by old snapping classes which have been replaced
by QgsPointLocator that also keeps a spatial index of geometries and it is not rebuilt on every re-render.
Reasons for removal:
- geometry cache was repopulated on every redraw of layers in editing mode, slowing down rendering
- data structure for the cache was a simple map with features accessed by their ID (no spatial index)
- the cache was only getting refreshed for the current view of the main map canvas (not a generic cache)
- not used for snapping anymore where caching was important to avoid roundtrips to data provider
- provider() was renamed to createProvider()
- selectWidget() was renamed to createSelectionWidget()
- providerLibrary() was renamed to createProviderLibrary()
This commit introduces basic support for non-library based
data providers, and moves the memory provider from a library
based provider to a core provider.
The memory provider is used so frequently throughout QGIS that
it has become integral to QGIS functionality and must be
available wherever the QGIS core library is used.
The changes here (while not exposed yet to Python) could potentially
be built on to allow creation of pure Python data providers.
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.
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)
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)
- 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
Instead of progress changed signals on the provider/layer level,
instead use QgsFeedback arguments for methods which previously
emitted progress changed signals
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.
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)
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.