This is the implementation of the new DB connections API (grant proposal 2019).
Summary
The new API makes it available to QGIS core a new interface for provider connections and will allow to:
replace the provider specific QgsSettings management in QGIS4 (save/load connections from the settings) NOT IN SCOPE FOR NOW.
provide a unified API for common operations on DB connections:
executeSql and get the results
list tables names and properties and schemas
create a new vector table (no rasters for now)
create/rename/drop schemas and tables
vacuum
....
Adds an interface for classes which provider custom
handlers for features rendered as part of a map render job.
QgsRenderedFeatureHandlerInterface objects are registered
in the QgsMapSettings objects used to construct map render
jobs. During the rendering operation, the handleRenderedFeature()
method will be called once for every rendered feature, allowing
the handler to perform some custom task based on the provided
information.
They can be used for custom tasks which operate on a set of
rendered features, such as creating spatial indexes of the
location and rendered symbology bounding box of all features
rendered on a map.
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.
E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
[feature] [mesh] #20731 add option to format time in mesh layer
There is new settings dialog that can be opened by button next to time slider. User can set reference time and time format (e.g. 2019-03-21 22:01:11).
With recent changes in QgsNetworkAccessManager this should be
safe to resurrect (fingers crossed!). Also simplify code a lot,
because now QgsNetworkAccessManager handles waking the worker
thread after the auth request is handled.
Add a lot more tests
information from a QNetworkReply in a container which is safe
and cheap to pass between threads
(QNetworkReplys are QObject based, so not safe to access or
pass between threads)
Use this new class in a thread safe QgsNetworkAccessManager::finished
signal, which is fired on the main thread QgsNetworkAccessManager instance
when responses are finished from any thread
Adds a new interface QgsAbstractValidityCheck which defines
a single "check" which can be performed on a given QgsValidityCheckContext.
A new application-wide QgsValidityCheckRegistry registers
and manages instances of all known checks, and allows running
of all registered checks of a specific type at once.
Initially the framework is focused toward print layout validity
checks, but the interface has been designed to be generic enough
to allow alternative types of validity checks (e.g. project save
validity checks, processing model validity checks, etc.).
The API is designed to be used both by internal validity checks
and also to be extended by custom, organisation-specific
validity checks. E.g., for print layout validity checks we could have:
This new class, QgsBlockingNetworkRequest, is designed for
performing SAFE blocking requests. It is thread safe and
has full support for QGIS proxy and authentication settings.
This class should be used whenever a blocking network
request is required. Unlike implementations
which rely on QApplication::processEvents() or creation of a
QEventLoop, this class is completely
thread safe and can be used on either the main thread or
background threads without issue.
Redirects are automatically handled by the class.
After completion of a request, the reply content should be
retrieved by calling getReplyContent().
This method returns a QgsNetworkReplyContent container,
which is safe and cheap to copy and pass
between threads without issue.
The guts of this class have been copied from QgsWfsRequest (which
has been using the same approach since 3.2)
Encapsulates a network reply within a container which
is inexpensive to copy and safe to pass around between threads.
The default Qt QNetworkReply class is a QObject, which prevents
it from being copied and passed between threads. This class
grabs all the useful information from a QNetworkReply,
allowing the reply's content to be stored indefinetly without
concern for the lifetime of the QNetworkReply object itself.
This new class QgsImageCache is the equivalent of QgsSvgCache
but for raster images.
QgsImageCache stores pre-rendered resampled versions of raster
image files, allowing efficient reuse without incurring the
cost of resampling on every render.
Additionally, it offers the other benefits QgsSvgCache has,
such as thread safety, ability to transparently download remote
images, and support for base64 encoded strings.
This class is useful for plugins and other areas of QGIS code which
want to expose a limited browser interface (e.g. a vector layer
only type layer picker)
Also add unit tests
* make QgsWkbTypes a Q_GADGET and declare GeometryType as Q_ENUM
* include QObject
* remove extra include
* move QgsWkbTypes to moc headers
* run sip_include
- also adds QgsStyleProxyModel which handles filtering of entities
- lots of unit tests
- new signals in QgsStyle for when symbols/tags/etc change (with tests)
blocking operation via task manager
Allows use of the task manager progress reporting system from
operations which are blocking (and cannot be made background
tasks!), e.g. layout exporting, project loading.