167 Commits

Author SHA1 Message Date
Denis Rouzaud
d2e899547c sipify all 2021-05-31 09:36:21 +02:00
Nyall Dawson
af1900f539 [browser] Add api to QgsDirectoryItem to control whether directory
items should be automatically monitored for changes

This monitoring can be expensive for some locations (eg network
folders or cloud based directories), so in these cases it is
desirable to allow it to be disabled to avoid hangs in the QGIS
application.
2021-05-31 12:23:56 +10:00
Nyall Dawson
02266ef8e6 Rename Qgis::MessageLevel::None to NoLevel. None is a reserved
keyword in Python, so this value was previously inaccessible to PyQGIS
scripts

Also change all references to Qgis::MessageLevel values to their
fully qualified names, to ease a future transition to an enum
class (when sip bugs are fixed)

Fixes #42996
2021-05-30 10:36:01 +10:00
Nyall Dawson
3d3f3f7f59 Promote more Qgis enums to enum classes, add Q_ENUM 2021-05-28 11:07:25 +10:00
Nyall Dawson
b4fea529f1 Promote Qgis::DataType to enum class 2021-05-27 13:44:15 +10:00
Nyall Dawson
aa93d03ca9 Promote QgsDataItem enums to enum classes, move to Qgis 2021-05-27 13:38:54 +10: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
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
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
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
0c4dd068c4 Move generic provider related files to src/core/providers
Minor clean up
2021-05-19 10:16:43 +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
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
Denis Rouzaud
4e9932c37f
Merge pull request #42954 from domi4484/settingsRegistryQep124PartThree
Settings registry (QEP 124) part three
2021-04-30 14:10:53 +02:00
Nyall Dawson
3c06b6d425 If a text format with the name "Default" is found in the style database,
use this as the text format for newly created layer labels

Instead of defaulting to a random font, this gives us a mechanism
to supply a better default label font to users via the default
style database. And users can always modify this "default" text
format if they'd like to change the default font!

For now this is the underlying code logic changes only -- we
don't yet include a 'Default' text format in the default style database
to take advantage of this functionality.
2021-04-29 14:45:09 +10:00
Damiano
4fb0ab2df1 Enum flag sip 2021-04-26 15:09:22 +02:00
Denis Rouzaud
fbb7eaaf32
Merge pull request #42597 from domi4484/settingsRegistryStaticInline
Settings registry (QEP 124)
2021-04-15 13:28:44 +02:00
Damiano
97f1a645f0 Changed SettingsType to scoped enum 2021-04-15 09:58:39 +02:00
Nyall Dawson
7126faf27c [feature][labelling] Add an option to control how line features are
clipped before their anchor points are calculated

The previous behavior was to always use only the visible part
of the line when calculating the anchor point for labels. Now,
users have the option to choose "Use Entire Line" when setting
the label anchor point for lines, so that the entire line
feature is considered when calculating the point to place
the label instead of just the visible part of the line.

Sponsored by Stadt Zürich
2021-04-09 13:29:08 +10:00
Nyall Dawson
13fbcd1cff Expose additional GDAL supported resampling methods as options
for "early" raster resampling

Notably, this adds the "Average" resampling as an option for
early resampling methods. (A nice side effect is that we also
get mode, cubic spline, Lanczos, ... for free!)

Fixes #40746
2021-02-01 07:58:20 +10:00
Ivan Ivanov
449e2757d9 Added QgsRelation::Type 2021-01-18 12:39:38 +02:00
Denis Rouzaud
a6404da815 separate QgsAttributeEditorElement into several files 2021-01-12 12:52:20 +01:00
Alessandro Pasotti
112810c2fb Fix clazy warnings 2021-01-06 12:12:10 +01:00
Nyall Dawson
a9c80e5740 Code shuffle
Move vector, project and network related core .cpp/.h files into
dedicated subdirectories.

An attempt to organise src/core better to make things easier to find.
2020-12-29 11:38:11 +10:00
Alessandro Pasotti
0ca4cf90d3 Add test for FlagDontStoreOriginalStyles 2020-12-01 09:04:07 +01:00
Alessandro Pasotti
9aa281abb4 Server: skip initial style storage
Background: at project load time for all layers a copy of the style
is loaded and stored as a DOM document. This was implemented for
broken layers to make it possible to store the style back to the
project if a broken layer was kept in the project.

Of course this is not needed nor useful in a server context.

By introducing a new project load flag and using it in the server
config (projects) cache we allow to skip the initial storage of
styles for the server and cut the startup times of our test "monster"
project (~1000 PG layers) from 26 seconds to 15.

Before you ask: I chose to always store the original style
with the idea that we might have been able to use the original
style copy also to "restore" styles to their initial state.
This was never implemented, so I guess we might be good to
make the initial style copy selectively available for broken
layers only in order to speed up project loading in the general
case (desktop).
2020-11-30 18:44:44 +01:00
Alessandro Pasotti
3f11294dfd
Merge pull request #39778 from elpaso/bugfix-gh39757-shared-locale-sort
Bugfix gh39757 shared locale sort
2020-11-13 10:38:49 +01:00
Nyall Dawson
9b8da23896 Add missing file 2020-11-13 02:59:05 +10:00
Alessandro Pasotti
414d938117 Fix raster paletted and pseudocolor various issues 2020-11-05 12:11:24 +01:00
Nyall Dawson
8b7fe3174b Add since 2020-11-04 18:49:11 +10:00
Nyall Dawson
f7b0a2d090 Add Point Clouds to QgsProviderMetadata::FilterType 2020-11-04 18:49:11 +10:00
Nyall Dawson
4f6f163ead Move geocoder classes to core 2020-10-30 14:31:04 +10:00
Peter Petrik
29113a89c1 fix some checks and building 2020-10-27 05:29:14 +10:00
Peter Petrik
8ea34de8a2 restore accidentally deleted files 2020-10-27 05:29:14 +10:00
Peter Petrik
8536c564fb add ept provider 2020-10-27 05:29:14 +10:00
Peter Petrik
de6f4d6ad8 hook point cloud layer type to the rest of the code 2020-10-27 05:29:14 +10:00
Denis Rouzaud
e87ba45edc make QgsRelation::RelationStrength a Q_ENUM and simplify code 2020-09-10 14:27:42 +02:00
Nyall Dawson
f62c6d5d56 [feature][labeling] Expose option to allow users to control whether
anchor point for line labels is a hint or a strict requirement

Strict: Labels are placed exactly on the label anchor only, and no
other fallback placements are permitted.

Hint: The label anchor is treated as a hint for the preferred label
placement, but other placements close to the anchor point are permitted.
2020-08-21 09:48:47 +10:00
Nyall Dawson
b31d315a52 Move another line label related setting and enum to QgsLabelLineSettings 2020-08-17 11:12:33 +10:00
rldhont
3c7d6616d1 New Project Reading flag to trust layer metadata 2020-08-11 18:14:15 +02:00
Nyall Dawson
21a2599d0d Move annotation layer renderer to own file 2020-08-05 16:27:09 +10:00
Nyall Dawson
35d9a657c8 Add AnnotationLayer to layer item type enum, silence warnings 2020-08-05 16:27:09 +10:00
Alessandro Pasotti
1ac91c1f2e Add geom col capabilities and create spatial index 2020-07-16 09:40:18 +02:00
Denis Rouzaud
1c9211a2d9 remove scoped enum 2020-07-13 15:52:12 +02:00
Denis Rouzaud
56bfeac158 fix build with Qt < 5.12 2020-07-13 15:16:18 +02:00
Denis Rouzaud
4502f1fade change flag declaration 2020-07-13 08:48:31 +02:00
Denis Rouzaud
256044cf2c rephrase shown to visible 2020-07-13 08:48:31 +02:00