129 Commits

Author SHA1 Message Date
Denis Rouzaud
4045e51240 [settings] add option to save enum/flag as integer instead of text 2022-04-14 08:39:15 +02:00
Nyall Dawson
141f7bf9f2 Plot wip 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
Nyall Dawson
28bb05b0d5 Add method to retrieve axis order for a QgsCoordinateReferenceSystem 2022-04-06 11:45:32 +10:00
Mathieu Pellerin
5bbad02806 [nmea] Convert RMC mode indicator to its equivalent signal variant to provide accurate quality description 2022-03-28 13:57:22 +07:00
Nyall Dawson
67c00fc6e5 [feature] Add opt-in setting for projects for "Remember attribute table
windows and docks between sessions"

If checked for a project, then any opened attribute tables will be
saved into the project and immediately restored when loading that
project.

Designed to improve workflows when a user has constructed a project
with a particular set of attribute table configurations for their
requirements, and re-setting up these attribute tables is a hassle.
2022-03-24 15:03:16 +10:00
Nyall Dawson
618c7f2f73 [feature] Add opt-in setting in project properties for
"Remember editable layer status between sessions"

If checked, then any layers which are editable will be remembered
when saving that project and immediately made editable whenever
the project is restored.

This is an opt-in, per-project setting. The intended use case
is for users who are making complex, data-editing focused projects.
2022-03-22 10:48:57 +10:00
Nyall Dawson
9efe9f512c Change some boolean QgsProject properties to flags instead 2022-03-22 10:48:57 +10:00
NEDJIMAbelgacem
60144d7645 switch to flag based approach for 2D/3D sync 2022-03-21 07:56:39 -07:00
NEDJIMAbelgacem
9141d05d59 - Change extent to trapezoid shape
- Visualize the viewed area using QgsRubberBand
-  Address reviews
2022-03-21 07:56:39 -07:00
Loïc Bartoletti
94a3744521
Merge pull request #46647 from Koyaani/advanced_snapping
[Feature] New soft constraints in the advanced digitizing dock
2022-03-18 10:11:49 +01:00
Nyall Dawson
71e450be03 Apply more flexible approach to match zoom levels expected for ESRI
tiles
2022-03-14 13:39:36 +10:00
Denis Rouzaud
761a20cac6 manual monkeypatching core->gui 2022-03-11 07:47:46 +01:00
Denis Rouzaud
a923b339d2 qHash implementation for scoped enum type 2022-03-11 07:47:46 +01:00
Denis Rouzaud
f32ecd4730 move QgsMapToolCapture::CaptureTechnique enum to Qgis 2022-03-11 07:47:46 +01:00
Antoine
2dc440f804 move enums to qgis.h 2022-03-10 13:37:19 +01:00
Damiano Lombardi
69f02e9f4c Applied suggestions from code review 2022-03-04 08:41:09 +01:00
Damiano Lombardi
ab3f2fca8a Transaction mode setting gui 2022-03-04 08:41:06 +01:00
Nyall Dawson
5395d87d7f Move altitude clamping/binding enums to Qgis namespace, promote to enum
class
2022-03-03 06:15:10 +10:00
Denis Rouzaud
87d0f518ff add qgsEnumList to list enum keys (and test) 2022-03-01 12:09:47 +01:00
Denis Rouzaud
36a933bb2b move QgsSnappingConfig::SnappingTypeFlag + SnappingMode enum/flags to Qgis 2022-03-01 12:09:47 +01:00
Denis Rouzaud
2778276ff7 move QgsSettingsEntry::SettingsType to Qgis + create Qgis::SettingsOptions flags 2022-03-01 12:09:47 +01:00
Nyall Dawson
caee2cabbd Add Qgis::MapLayerProperty flag for layers which should be considered
as "basemap" layers

This flag identifies if the layer is considered a 'basemap' layer, where
certain properties of the layer should be ignored when calculating
project-level properties. For instance, the extent of basemap layers
should be ignored when calculating the overall extent of a project,
as these layers are typically global and extend outside of a project's
area of interest.
2022-02-24 16:20:51 +10:00
Nyall Dawson
f8bbcab8bb Add flag for browser data item to indicate that children of the item
must be refreshed whenever the item is refreshed

This behaviour is not automatic. The new flag allows items to opt-in,
so that their children WILL be automatically refreshed when the
item is refreshed.

Should be used sparingly only to avoid expensive work
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
01f0130ffb Remove unused qgsCalloc function 2022-02-02 07:44:13 +10:00
Vincent Cloarec
9965eccdce
Template parameter {usage} for XYZ raster and vector tiles (#46731) 2022-01-13 15:11:31 +01:00
Nyall Dawson
6e7e8d3d7d Promote CRS format enum to enum class, move to Qgis 2022-01-11 19:50:46 +10:00
nirvn
4131714907 [feature][api] Add a map settings / render context flag to skip symbol rendering 2021-12-28 20:04:49 +07:00
Nyall Dawson
6783347896 Implement framework for history providers
As per https://github.com/qgis/QGIS-Enhancement-Proposals/issues/130
2021-12-21 15:32:57 +10:00
Nyall Dawson
fadfb477d9 [api] Move text wrapping handling logic from layout table code to QgsTextRenderer
Allows other users of QgsTextRenderer to take advantage of the
automatic line wrapping behaviour
2021-11-29 13:03:13 +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
Nyall Dawson
388a72abd8 [feature] Replace marker/hash line "on vertices" placement option
with "on inner vertices"

This new mode places the symbols on all inner vertices (ie all
vertices except the first or last). (We can safely do this now
that its easy for users to also set the symbols to show on
first/last vertex by clicking those checkboxes too!)

The motivation here is that when the "Vertex" mode puts the
symbols on the first/last vertex as well as inner vertices,
it's basically impossible to style a line with a different
marker on the first/last vertex to the rest of the line's
vertices. (The best you can get is just hiding the unwanted
first/last vertex by overlaying a second symbol layer on
the first/last vertices with a larger symbol)

Sponsored by North Road, thanks to SLYR
2021-11-12 14:09:42 +11:00
Nyall Dawson
aaafd786df
Make placement options in marker and hash line symbol layers checkboxes instead of mutually exclusive buttons
Makes it considerably quicker to create a marker line with the
markers on the first AND last vertex, amongst other things...

Fixes #18433

Sponsored by North Road, thanks to SLYR
2021-11-12 04:44:08 +10:00
Nyall Dawson
aaca87ca06 Move curve orientation enum (Clockwise/CounterClockwise) to Qgis and
generalise the name

These values are useful for more than just curve orientations
2021-11-10 18:42:42 +11:00
Nyall Dawson
dae69acc76 [feature] Support Small Caps style in labels/text renderer
Adds two new capitalization styles for labels and text symbols:

- Small Caps: Renders lowercase characters as small caps
- All Small Caps: Renders all characters as small caps (regardless
of their original case)

Requires Qt 6.3+, or Qt 5.15 using KDE's fork and the cmake
HAS_KDE_QT5_SMALL_CAPS_FIX switch defined during build.
2021-11-08 14:36:44 +11:00
Nyall Dawson
294282c970 Add new map settings/render context flag for high quality image transforms
which is opt in, and consistently respect this for better quality
raster image markers, svg/raster fills when set

We don't set this by default (keep things light for server), but
do use it in the map canvas and layout exports whenever antialiasing
is enabled.
2021-11-07 17:16:59 +11:00
Alessandro Pasotti
d4876f3842 Add operator for flgs and update docs 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
2fbb830c16 Address PR comments 2021-11-05 07:29:18 +11:00
Alessandro Pasotti
c5f956dbef Introduce VectorLayerType flags 2021-11-05 07:29:18 +11:00
Nyall Dawson
0795f726cf [api] Add function to apply a dash pattern vector to a geometry
This returns a new multilinestring geometry which represents the
input geometry with the dash pattern applied to the lines or rings
of the input geometry.

Options are available to set rules for the start/end of the pattern,
e.g. ending on a full dash or gap, or half dash or gap.

Sponsored by North Road, thanks to SLYR
2021-10-30 18:18:03 +11:00
Nyall Dawson
b06e136a57 [feature][symbolgy] Expose choice of clipping behaviour for line
pattern fill

This allows users to control how lines in the fill should be
clipped to the polygon shape. Options are:

- Clip During Render Only: existing behaviour, lines are created
covering the whole bounding box of the feature and then clipped
while drawing. Line extremities (beginning and end) will not be
visible
- Clip Lines Before Render: lines are clipped to the exact
shape of the polygon prior to rendering. Line extremities (including
cap styles, start/end marker line objects, etc) will be visible,
and may sometimes extend outside of the polygon (depending
on the line symbol settings)
- No Clipping: no clipping at all is done - line will cover the
whole bounding box of the feature

Sponsored by North Road, thanks to SLYR
2021-10-26 14:30:13 +11:00
Nyall Dawson
40279cb996 Set new Qgis::RenderContextFlag::RenderingSubSymbol flag on render contexts
whenever a subsymbol component of a parent symbol is being rendered

This flag allows symbol layers to refine their behaviour based on whether
they are a subsymbol or not.
2021-10-23 20:06:32 +10:00
Nyall Dawson
b56e86181c [feature][symbology] Add option to control marker clipping for
point pattern fill

A new option exposes the ability to clip markers in the fill by:

- "Clip to shape": default behaviour, same as previous versions. Markers
are clipped so that only the portions inside the polygon are visible
- "Marker centroid within shape": only markers where the center of
the marker falls inside the polygon are drawn, but these markers
won't be clipped to the outside of the polygon
- "Marker Completely Within Shape": only markers which fall
completely within the polygon are shown
- "No clipping": any marker which intersects at all with the polygon
will be completely rendered

The clipping mode can be overridden via a data driven expression if
desired.

Sponsored by North Road, thanks to SLYR

Fixes #37825
2021-10-23 12:58:13 +10:00
Nyall Dawson
fc0d1869bc Promote some symbol layer enums to enum classes, move to Qgis 2021-10-23 05:16:41 +10: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
f2856db943 Implement a more robust way of limiting sizes for symbol preview icons 2021-09-27 11:42:33 +10:00
Nyall Dawson
2fc60fcd7f Fix compatibility of moved QFLAGS 2021-09-26 11:24:51 +10:00
Nyall Dawson
0ab6113e88 Promote QgsMapSettings and QgsRenderContext enums to enum class, move to Qgis 2021-09-26 11:24:51 +10:00
Nyall Dawson
e6b39077a2
Promote QgsCoordinateTransform::TransformDirection to enum class, move to Qgis
This enum was forcing an include of qgscoordinatetransform.h within the
widely used qgsabstractgeometry.h header, causing an absolute explosion
of includes of a bunch of very heavy header classes all across QGIS. By
removing the forced include we can avoid a ton of unwanted includes
and make wider use of forward declarations...
2021-09-22 16:40:49 +10:00