3415 Commits

Author SHA1 Message Date
Alessandro Pasotti
cf45b6b23f Integrate the setLayers docs 2021-05-26 10:49:49 +02:00
Nyall Dawson
86b3459eea Add a flag which can be set on QgsSymbols to indicate that a renderer
should use symbol levels whenever that symbol is used by the renderer

Not exposed to users -- only settable via API, but IS saved in the
symbol's XML definition and restored when loading a symbol from XML.
2021-05-26 18:26:44 +10:00
Matthias Kuhn
92639aef64
Merge pull request #41208 from rldhont/flag-read-extent-from-xml
QgsMapLayer::ReadFlag::FlagReadExtentFromXml to extend vector layer read capabilities to other layer types
2021-05-26 10:14:04 +02:00
Nyall Dawson
c3e01e5725 Add destructors to permit forward declaration 2021-05-26 08:14:13 +10:00
Nyall Dawson
60f48bc6a2
Add typehint for QgsPoint constructor (#43385) 2021-05-25 15:20:59 +02:00
Nyall Dawson
615bbd8163 Fix SIP_HOLDGIL annotations 2021-05-25 21:07:50 +10:00
Nyall Dawson
2b6c3c1db2 Fix PyQGIS QgsLineString constructor only accepts lists of QgsPoint,
not QgsPointXY as indicated by the documentation

Also add support for constructing QgsLineString using arrays of
arrays of floats, given that we're having to hand-roll sip conversion
code anyway!

Now the following is supported:

  line = QgsLineString([[1,2], [3,4], [5,6]])

which is much nicer and more "pythonic" then the explicit
QgsPoint/QgsPointXY sequences!

Fixes #43200
2021-05-25 21:07:50 +10:00
Harrissou Sant-anna
b8fe026de3
Merge pull request #43368 from DelazJ/temporalTypos
Fix typos in temporal docs
2021-05-25 10:50:07 +02:00
Nyall Dawson
b190c8f06b [labeling] Default to cartographic placement mode for point layers
Results in much nicer label placement, so should be the default mode
2021-05-25 16:39:15 +10:00
Nyall Dawson
e7c4c84ae3 [labeling][api] Add api to supress unplaced label visibility for
a single layer

Not exposed anywhere, for PyQGIS use only
2021-05-25 16:11:53 +10:00
Nyall Dawson
afd912061a Fix build 2021-05-24 14:19:01 +10:00
Nyall Dawson
e4a12e5fd0 Add equality operator to QgsReadWriteContext::ReadWriteMessage 2021-05-24 14:19:01 +10:00
Nyall Dawson
5f9d7b4809 Raise a user-visible warning message if fonts referenced in a QGIS
project are not available when loading that project on a system
without the required fonts installed

Currently shown for any QgsTextForamt or font marker symbol layer
restored when opening the project
2021-05-24 14:19:01 +10:00
Nyall Dawson
b086e6e656 Mark QgsReadWriteContext::pushMessage as const, mutable
Avoids the need to remove const from all the QgsReadWriteContext
references used throughout QGIS XML loading just to be able to
push warning messages to the context.
2021-05-24 14:19:01 +10:00
Nyall Dawson
2bed84d24a Sipify 2021-05-24 12:16:21 +10:00
Nyall Dawson
5ded8b6643 __repr__ fro QgsSymbolLayerReference, QgsSymbolLayerId 2021-05-24 12:16:21 +10:00
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
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
rldhont
65761a177c QgsMapLayer::ReadFlag::FlagReadExtentFromXml to extend vector layer read capabilities to other layer types
In QgsVectorLayer, it is possible through the flag trust layer metadata to use extent read in XML
instead of extent provided by the provider.

The QgsMapLayer::ReadFlag::FlagReadExtentFromXml can be used inlayer readXML to read Extent from XML for raster, point cloud and other layers.

Funded by Ifremer
2021-05-21 09:12:07 +02: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