396 Commits

Author SHA1 Message Date
Nyall Dawson
4981f1846f Expose QgsWeakRelation to PyQGIS 2022-08-02 15:44:40 +10:00
Nyall Dawson
31ae975923 Introduce QgsUnsetAttributeValue 2022-08-01 12:37:35 +10:00
Nyall Dawson
44708b9c0c Create QgsColorUtils class
Contains methods to serialize/deserialize colors from xml and strings,
where the colors are losslessly stored/restored.

The previous methods for storing colors (Eg QgsSymbolLayerUtils::encode/decodeColor)
are lossy, and only store QColors as 8 bit RGB representations. In
contrast, the new methods store the full lossless representation of
a QColor, including support for 16 bit color components, extended
RGB color components, and storage of HSL/HSV/CMYK color specifications
using their original color components instead of RGB components.

When these new methods are used in place of the existing lossy methods,
they open the possibility of 16 bit color support for QGIS symbols/projects,
(and potentially future CMYK color support).
2022-07-09 07:12:08 +10:00
Nyall Dawson
721bcaab66 Implement API for selecting features in a vector tile layer 2022-07-08 09:12:46 +10:00
Nyall Dawson
0091696272 Start on QgsFontManager class 2022-06-20 13:01:55 +10:00
Nyall Dawson
8bb64a0683 Split existing "Show all labels (including colliding labels)" into
two separate new options

This setting was ambiguous in meaning -- it could be interpreted
as either:

"I don't care about overlapping labels, use them when
you have no other choice"

OR

"I want to see labels for EVERYTHING in this layer, and I don't
care what you have to do to show me those"

This leads to situations like those discussed in #41043, where some
users interpret the setting as the first meaning and get confused
when eg. a curved label line layer starts showing horizontal placements
for some features which couldn't otherwise be labeled (eg short
lines).

So, split the setting into two new options (checkboxes) with explicit, clear
distinction:

- "Allow overlapping labels if unavoidable": This setting means labels
can be overlapping, if there's no other option. It does NOT gaurantee
that all features in the layer will have labels, because other
constraints (such as lines too short to fit a label's text) will still
be respected and may prevent labels for the feature.

- "Allow inferior fallback placements": This mode permits features
to fallback to worse placement options when there's no other choice,
e.g. when a line is too short to fit a curved label text then the
label may be placed horizontally just over the feature's center
point.

The combination of checking BOTH options WILL gaurantee that
all features in the layer are labelled, albeit with both overlapping
labels and the degraded placements!

Fixes #41043
2022-06-03 18:20:03 +10:00
Martin Dobias
571820327d
Merge pull request #48321 from NEDJIMAbelgacem/point-cloud-stats-calculator
Statistics calculator for point cloud
2022-05-12 23:21:06 +02:00
Nyall Dawson
86f7d4e89e [api] Add QgsCombinedStyleModel class, for combining entities from several
QgsStyle models into a single combined view
2022-05-12 19:58:04 +10:00
Nyall Dawson
a11b4ebf83 Add QgsSingleItemModel, a QAbstractItemModel subclass for a single
item
2022-05-12 19:58:04 +10:00
Julien Cabieces
a57281c836 Vectorization of selective masking 2022-05-12 11:45:39 +10:00
NEDJIMAbelgacem
e9fff46db4 Merge branch 'master' into point-cloud-stats-calculator 2022-05-09 15:56:38 +01:00
Mathieu Pellerin
95b637520b Implement a QgsProjectStyleSettings class 2022-05-09 14:44:28 +10:00
Nyall Dawson
e5c0a14ecd [feature] Add a new classification method for "Fixed interval"
Allows users to create graduated breaks using a specific interval
width for classes (instead of the total number of classes)

Sponsored by SLYR
2022-05-06 13:44:31 +10:00
NEDJIMAbelgacem
46c2afdff2 - Add a class for storing statistics
- Add classification attribute function
- Refactoring
2022-05-05 11:40:30 +01:00
Nyall Dawson
0108041c68 Add query log 2022-04-26 14:02:27 +02:00
Nyall Dawson
ee5cbe93a9 Add a numeric format for geographic coordinates 2022-04-21 19:05:38 +10:00
Nyall Dawson
a5f9b558f4 Move snapping results class to own file 2022-04-15 12:15:54 +10:00
Nyall Dawson
4b008ed7ac Add QgsProfilePoint class 2022-04-15 12:15:54 +10:00
Nyall Dawson
77b9066e92 Add QgsMeshLayerElevationProperties subclass of
QgsMapLayerElevationProperties
2022-04-07 19:22:19 +10:00
Nyall Dawson
6d4c2803f6 Start on profile renderer class 2022-04-07 19:22:19 +10:00
Nyall Dawson
0b8e6abb22 Add QgsCoordinateReferenceSystemUtils class, with function to determine
most appropriate x/y or y/x coordinate order for a crs
2022-04-06 16:05:08 +10:00
uclaros
c16e9a204c Sync pointcloud layer's 3d renderer style with 2d renderer 2022-04-04 02:57:00 -07:00
Nyall Dawson
44ad8f51aa Simple framework for drawing 2d plots using native QGIS objects
Uses QGIS symbols, text formats and text numeric formats to render
chart components. Currently handles the background, grid, and axis
labels.
2022-03-31 09:21:08 +10:00
Nyall Dawson
200be450f2 Add framework for profile generation
- Adds an abstract base class for profile generators,
QgsAbstractProfileGenerator. This is modeled off the approach
used by map layer renderers, where a QgsAbstractProfileGenerator
subclass object is created in the main thread and does all
required (hopefully inexpensive!) preparation steps necessary
to do on the main thread. Then a separate background thread can
later call the virtual generateProfile method, which does
the heavy lifting of calculating the associated profile. Later
the results of the profile generation can be retrieved back
on the main thread.

- Adds an interface "QgsAbstractProfileSource" for objects which
can create a profile generator given a QgsProfileRequest. Map layer
classes will implement this interface, but potentially 3rd party
(plugin based) objects can also implement the interface if they
also want to add custom results to the profile charts (e.g.
borehole trace lines).
2022-03-25 10:08:11 +10:00
Nyall Dawson
0a6dac826f Profile request 2022-03-25 10:08:11 +10:00
Nyall Dawson
231596cd8d Make terrain provider classes generic and move outside of project 2022-03-19 05:58:37 +10:00
Nyall Dawson
22034f354e Project elevation properties framework 2022-03-19 05:58:37 +10:00
Nyall Dawson
1ad8639315 Support reading ESRI vector tile packages (.vtpk) files directly 2022-03-16 14:07:06 +10:00
Nyall Dawson
5dd473d682 Move batch feedback subclass to c++ 2022-03-15 11:44:08 +10:00
Nyall Dawson
59059a9a72 Switch to using QgsMatrixTileSet as common tile set class 2022-03-11 12:09:32 +10:00
Nyall Dawson
b39761f8f0 Ensure that non-EPSG:3857 vector tiles layers can be rendered in the
correct place

This fixes the rendering of vector tiles layers which are constructed
in any non web mercator CRS.

(Unfortunately the required information is not recorded in mbtiles
packages, so it's necessary to set the correct parameters via
API calls when trying to load non-3857 mbtiles.)
2022-03-11 12:09:32 +10:00
Damiano Lombardi
219d450075 Initial implementation of buffered transactions 2022-03-04 08:41:09 +01:00
Nyall Dawson
cc24106d01 Add QgsMapLayerElevationProperties subclass for vector layers
Allows elevation properties to be set for vector layers, including:

- altitude binding
- altitude clamping
- extrusion
- scale
- offset

These properties can be set through the new "Elevation" tab in
the vector layer properties dialog
2022-03-03 06:15:10 +10:00
Nyall Dawson
2379de4a95 Add QgsMapLayerElevationProperties subclass for raster layers
Allows elevation properties to be set for raster layers, including:

- whether raster values represent heights
- scale
- offset

These properties can be set through the new "Elevation" tab in
the raster layer properties dialog
2022-03-03 06:15:10 +10:00
Denis Rouzaud
08ada3aadf sipify + move sipify config file to ./python 2022-03-01 12:09:47 +01:00
Nyall Dawson
f482c85069 Show a "Field Domains" item for geopackages under the browser,
which lists existing field domains in the database
2022-02-20 06:48:03 +10:00
Nyall Dawson
2be52d9df9 Create QgsFieldDomain and subclasses which directly represent
the GDAL field domain coded value/range/glob domains
2022-02-20 06:48:03 +10:00
Nyall Dawson
a20f7789d9 Partial work on centralizing all QVariant::Type to display string
logic in a new QgsVariantUtils class

(I've likely missed a few places here, but it's a start!)
2022-01-31 17:24:53 +10:00
NEDJIMAbelgacem
f54136e616 address Nyall reviews 2022-01-12 13:46:49 +10:00
NEDJIMAbelgacem
fb9084f93f fix docs 2022-01-12 13:46:49 +10:00
nirvn
6e607313bd [feature] Handy null painter device class to use with map renderer custom painter jobs 2021-12-30 11:06:41 +07:00
bdm-oslandia
345dd4dd87 fix: replace referer http header by dedicated class QgsHttpHeader 2021-12-02 11:16:53 +10:00
Nyall Dawson
bab7a911b2 [API] Add new map layer class "QgsGroupLayer"
A group layer is a map layer which consists of a set of
child layers, where all component layers are rendered as a single
flattened object during map renders.

This commit sets up the base framework for QgsGroupLayer only
(i.e. no rendering changes).
2021-11-23 16:08:05 +11:00
Denis Rouzaud
1bb212ee9a
Merge pull request #45962 from 3nids/ux-db-table-filter
improve filtering of layers in DB dialogs
2021-11-10 15:13:03 +01:00
Nyall Dawson
5b8d164008 Split qgscolorramp.h/.cpp out into qgscolorrampimp.h/.cpp
Avoids a bunch of unwanted includes throughout QGIS
2021-11-10 18:42:42 +11:00
Denis Rouzaud
93bb188e2a add python bindings 2021-11-09 14:13:52 +01:00
Nyall Dawson
e733b517b3 Split QgsVertexId out to own file, promote type to enum class 2021-10-12 14:54:26 +10:00
Nyall Dawson
db4b0fed86 Move to core 2021-09-24 15:47:10 +10:00
David Marteau
ee6acb0ca2
Refactorize server properties 2021-09-16 14:10:07 +02:00
Etienne Trimaille
21c3f3fcbf
Add API for having many metadataUrl on a layer 2021-09-16 14:10:06 +02:00