19525 Commits

Author SHA1 Message Date
Nyall Dawson
22c2d7213b Remove unnecessary includes of qgssymbollayerreference.h 2021-05-24 12:16:21 +10:00
Nyall Dawson
adab3fe6a1 Dox 2021-05-24 10:11:37 +10:00
Nyall Dawson
0d768faa43 Add QgsAbstractGeometry::simplifiedTypeRef
Returns a reference to the simplest lossless representation of this geometry,
e.g. if the geometry is a multipart geometry type with a single member geometry,
a reference to that part will be returned.

This method employs the following logic:

- For multipart geometries containing a single part only a direct reference to that part will be returned.
- For compound curve geometries containing a single curve only a direct reference to that curve will be returned.

This method returns a reference only, and does not involve any geometry cloning.
2021-05-24 10:11:37 +10:00
Nyall Dawson
f21ea8c54a Avoid styleChanged() signals being raised before new labeling
configuration is set when changing a vector layer's style preset

This causes the layer styling dock to update before the layer's
new labeling settings are set, so the dock shows the incorrect
label settings for the previously used style

Fixes #42310
2021-05-22 11:50:02 +10:00
Alessandro Pasotti
d06f1e6467 Fix SIP issue with return results from calculateStatistics
Fixes #43245

SIP failed to convert the QMap<QgsZonalStatistics::Statistic, QVariant>
so we give it an QMap<int, QVariant>.
2021-05-22 07:04:16 +10:00
Nyall Dawson
7bf85a0ccc Disambiguate use of QgsMapCanvas::fullExtent and
QgsMapCanvas::zoomToFullExtent

In 3.18 these methods changed their meaning from the "full extent
of all layers visible in the canvas" to "the full extent of the
associated project".

These are actually two different, equally valid use cases, so
disambiguate by adding new explicit methods projectExtent()
and zoomToProjectExtent(), and revert fullExtent() and
zoomToFullExtent() to their pre-3.18 behavior.

Fixes #43303
2021-05-21 18:12:21 +10:00
Nyall Dawson
dc50988147 Move logic to calculate combined extent of a set of map layers
to new QgsMapLayerUtils class
2021-05-21 18:12:21 +10:00
nirvn
59a6217c29 Fix compilation on vcpkg 2021-05-21 11:28:55 +07:00
Nyall Dawson
9dda143cc9 Also move QgsMapLayerModel::iconForLayer to QgsIconUtils 2021-05-21 09:22:05 +10:00
Nyall Dawson
06844626d1 Move QgsLayerItem icon related static methods to new QgsIconUtils class
These utilities are used in a LOT of places in QGIS, but the
qgslayeritem.h include is a very heavy dependency. It makes sense
to have these utilities in a nice lightweight generic class.
2021-05-21 09:22:05 +10:00
Nyall Dawson
b5aace6e82 Split qgsdataitem.h/cpp into multiple files for individual classes
to avoid mega file which triggers an include explosion
2021-05-21 09:22:05 +10:00
Nyall Dawson
68c98b55e7 Move core browser and map renderer files to src/core/browser
and src/core/maprenderer subfolders

Helps keep src/core a little more organized
2021-05-21 09:22:05 +10:00
Paulo van Breugel
643b42277a
Update r.clump.txt
Add missing threshold parameter. It sets a threshold to identify similar cells. Floating number, valid range: 0 = identical to < 1 = maximal difference. Default: 0
2021-05-21 08:46:32 +10:00
Nyall Dawson
95c01cc93c Dox, enum class 2021-05-21 08:26:14 +10:00
Nyall Dawson
72a57b271f Add QgsFileUtils::pathIsSlowDevice to determine whether a file path
likely resides on a slow device (eg. a remote network location)
2021-05-21 08:26:14 +10:00
Nyall Dawson
e3061a8f51 Add method to determine the drive type for a file path
Supported on Windows builds only
2021-05-21 08:26:14 +10:00
Nyall Dawson
de406693c7 Move QgsVectorLayerExporter.ExportError to Qgis and promote to enum
class

This avoids an ugly include of qgsvectorlayerexporter.h in
qgsproviderregistry.h/qgsprovidermetadata.h, which in turn
triggers an inclusion of qgsvectorlayer.h and a bunch of
other heavy dependencies.
2021-05-20 21:09:56 +10:00
Nyall Dawson
c543a57b83 Remove some unused widget imports from core library 2021-05-19 13:52:58 +10:00
Nyall Dawson
13e923838a Fix build 2021-05-19 10:16:43 +10:00
Nyall Dawson
581d355e2a Avoid silly doxygen warning 2021-05-19 10:16:43 +10:00
Nyall Dawson
0c4dd068c4 Move generic provider related files to src/core/providers
Minor clean up
2021-05-19 10:16:43 +10:00
Nyall Dawson
7291bbb457 Dox 2021-05-18 16:59:22 +10:00
Nyall Dawson
b61dc7c48a Sipify 2021-05-18 16:59:22 +10:00
Nyall Dawson
b5dfe8f155 Refactor enum handling
- Add enums to qgis.h instead of qgscoreenums, so that they belong to
a Qgis namespace
- Split up the various symbol headers into multiple files so that we
can fine-tune their inclusion and forward declare more readily, speeding
up recompilation
- Move QgsSymbol enums to qgis
2021-05-18 16:59:22 +10:00
Nyall Dawson
239092e0f1 Move QgsVectorDataProvider::FeatureCountState enum to qgscoreenums.h 2021-05-18 16:59:22 +10:00
Alessandro Pasotti
7ae1b31873
Merge pull request #43104 from elpaso/server-landingpage-custom-prefix
Server landingpage custom prefix
2021-05-17 18:35:00 +02:00
Damiano
40988a8901
Avoid endless sub-RelationEditorWidget creation fix #42952 (#43246)
* Avoid endless sub-RelationEditorWidget creation fix 42952

* Added missing docstring
2021-05-17 12:53:04 +02:00
mhugent
558562231a
Merge pull request #43121 from mhugent/vector_label_legend
Vector label legend
2021-05-17 10:56:48 +02:00
Nyall Dawson
eaf70803b0
Cleanup auto generated sip files and remove orphaned files (#43240) 2021-05-17 08:09:27 +02:00
Nyall Dawson
af6c08bb26 Move QgsMapLayerType to separate generic header for core enums
Avoids the need to include the whole qgsmaplayer.h header and
all its dependancies when only the QgsMapLayerType enum is required.
2021-05-17 16:09:13 +10:00
Nyall Dawson
f1b436add8 QIcon linked files are lazily evaluated, so we can't use a temporary
file which is immediately deleted right after the QIcon creation
to store SVG icon content -- instead we need to place the svg in a
temporary folder which exists for the lifetime of the QGIS session
2021-05-17 10:54:44 +10:00
Nyall Dawson
be803e935d [feature] Users can set a custom icon color for different folders
in the browser

Effectively allows users to "tag" folders, aiding in rapid
browser navigation of complex folder structures.
2021-05-17 10:54:44 +10:00
Nyall Dawson
2aa70400ce Allow fill/stroke color to be specified for QgsDataItem::iconDir/openDirIcon 2021-05-17 10:54:44 +10:00
Nyall Dawson
cd6aa7f665 Add parameterized color support to QgsApplication::getThemeIcon
Adds framework to allow for icons which can have dynamic coloring
2021-05-17 10:54:44 +10:00
Mathieu Pellerin
8ebef88e27
Merge pull request #43229 from nirvn/close_browser
[network access manager] handle abortion of browser login request
2021-05-15 20:23:49 +07:00
nirvn
8513b8051f [authentication manager] Allow configurations to be overwritten when importing 2021-05-15 17:25:02 +07:00
nirvn
8647ec54d6 Address review 2021-05-15 15:40:19 +07:00
Matthias Kuhn
a701fe68ab
Merge pull request #43219 from domi4484/jsonEditIdentifyResults
IdentiyResults dialog show JSON data as a tree view
2021-05-15 09:40:34 +02:00
nirvn
1e47ca1a6c [network access manager] handle abortion of browser login request 2021-05-15 13:59:06 +07:00
Damiano
a570a10bd9 IdentiyResults dialog show JSON data as a tree view 2021-05-14 15:02:17 +02:00
Denis Rouzaud
d2ccd82cd9
add utility methods to convert map of QgsProperty to/from QVariantMap (#43178)
* add utility methods to convert map of QgsProperty to/from QVariantMap

* add test

* fix test

* fix test
2021-05-14 11:58:47 +02:00
Matthias Kuhn
32af8100e5
Merge pull request #43164 from domi4484/jsonEdit
[FEATURE] Json edit widget
2021-05-14 09:04:42 +02:00
Marco Hugentobler
dce94dc656 mLegend string member with getter and setter 2021-05-13 22:40:13 +02:00
Nyall Dawson
75eba31996 Introduce qgsNanCompatibleEquals for readability 2021-05-13 19:33:15 +10:00
Nyall Dawson
bd26ae1d29 Add basic support for coordinate epoch of dynamic (not plate fixed) crs
to QgsCoordinateTransform

QgsCoordinateTransform class can perform time-dependent transformations
between a static and dynamic CRS based on either the source OR destination CRS coordinate epoch,
however dynamic CRS to dynamic CRS transformations are not currently supported.

Using the same approach as the GDAL changeset in https://github.com/OSGeo/gdal/pull/3810
2021-05-13 19:33:15 +10:00
Nyall Dawson
0b5a95ce44 Deprecate constructor which should have been deprecated a long time ago 2021-05-13 19:33:15 +10:00
Nyall Dawson
5e98648913 [feature][layout] Add ""Convert to Static Text" option to dropdown
menu next to "Insert/Edit Expression…" in layout label properties
widget

When selected any dynamic parts of the label's contents will be
evaluated and replaced with their current values.

Provides an easy way to convert a dynamic label to a static one,
so that the user can then manually tweak the resulting tweak
when needed.
2021-05-13 17:11:13 +10:00
Mathieu Pellerin
e3cb3e5a01
Merge pull request #43193 from nirvn/auth_imex
[authentication] Add a pair of APIs to export and import configurations to/from XML
2021-05-13 12:55:06 +07:00
Denis Rouzaud
da08c8a435
[cmake] generalize Python output directory in UseTest macro (#43191)
* [cmake] generalize Python output directory in UseTest macro

this is helpful in case we set up another python output directory (eg PySide2)

* define python output directories to the parent scope

* try with target_include_directories

* define vars on top level

* Update UsePythonTest.cmake

* some cleanup

* more cleanup

* fix uic

* fix path for all platforms

* fix var
2021-05-13 07:32:03 +02:00
Denis Rouzaud
ef14092f2a
Merge pull request #43195 from domi4484/relationEditorWidgetLabelTitle
Relation editor widget label implementation moved to attribute form
2021-05-13 07:31:30 +02:00