7993 Commits

Author SHA1 Message Date
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
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
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
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
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
nirvn
1e47ca1a6c [network access manager] handle abortion of browser login request 2021-05-15 13:59:06 +07: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
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
nirvn
ad1c94c227 Address review, export config string map as DOM element (eases editability) 2021-05-13 08:58:22 +07:00
Nyall Dawson
03e84c775c Hold the GIL when checking QgsFeedback.isCanceled() 2021-05-13 04:34:54 +10:00
nirvn
3d70259fe4 Fix dox 2021-05-12 17:52:24 +07:00
nirvn
f916c06a8e [authentication] Add a pair of APIs to export and import configurations to/from XML 2021-05-12 16:05:38 +07:00
Even Rouault
a11baa0e5a Workaround a gcc warning for switch() { case X: return ...; } constructs
Fixes warnings like the following one with gcc 9.3
```
/home/even/qgis/qgis/src/gui/qgsfilecontentsourcelineedit.cpp: In member function ‘virtual QString QgsPictureSourceLineEditBase::fileFilter() const’:
/home/even/qgis/qgis/src/gui/qgsfilecontentsourcelineedit.cpp:307:1: warning: control reaches end of non-void function [-Wreturn-type]
  307 | }
      | ^
```
2021-05-12 08:12:57 +10:00
Marco Hugentobler
62d73373c1 Make legend/preview text configurable 2021-05-11 18:32:46 +02:00
Marco Hugentobler
3ecb5e5cc8 Add const, nullptr and improve docstrings 2021-05-11 15:25:48 +02:00
Denis Rouzaud
6817d9416a [FEATURE] supports dynamic SVGs in layouts
also fix a UX bug where you couldn't switch between raster and SVG radios if the data defined property was active (unreported in tracker)
2021-05-11 11:15:55 +02:00
Nyall Dawson
21edff4ed7 Show more details about layer CRSes in the layer properties information
screen
2021-05-11 14:25:53 +10:00
Nyall Dawson
b6f60f6120 Add QgsCoordinateReferenceSystem::operation() for retrieving details
of the associated proj operation for a CRS

Allows callers to determine the projection used for CRS objects and
their details.

Also add QgsCoordinateReferenceSystemRegistry::projOperations() for
retrieving a complete list of all available PROJ operations
2021-05-11 14:25:53 +10:00
Nyall Dawson
7604b6e47e Add QgsCoordinateReferenceSystemRegistry::celestialBodies() for
retrieving a list of all known celestial bodies from PROJ

Requires PROJ 8.1+
2021-05-10 21:58:03 +10:00
Nyall Dawson
7e1f9d771d Add celestial body name to EllipsoidDefinition
Requires proj 8.1+
2021-05-10 21:58:03 +10:00