63 Commits

Author SHA1 Message Date
Nyall Dawson
4a6fef278e Cleanup docs, don't mention QString in python docs 2025-04-19 18:17:34 +10:00
Nyall Dawson
3f6b490218 Sipify 2025-04-02 11:11:10 +10:00
Nyall Dawson
f480c2a04e Add all missing class brief descriptions 2025-03-28 14:23:56 +10:00
Nyall Dawson
1f8a585c5c Make signal const 2025-03-28 10:02:25 +10:00
Nyall Dawson
aa65f01140 Make more symbol factory methods memory safe 2025-03-28 10:02:25 +10:00
Nyall Dawson
596ddb2f4e More memory safety for loading symbols 2025-03-28 10:02:25 +10:00
Julien Cabieces
ed64834106 api(deprecated): add message to deprecated SIP annotation 2024-12-17 09:06:42 +01:00
Nyall Dawson
ef0289f3ec Fix formatting of Python ..deprecated annotations in docstrings
Fixes https://github.com/qgis/pyqgis-api-docs-builder/issues/174
2024-09-02 11:42:12 +10:00
Nyall Dawson
a6f5c50b36 Move some style related enums out of global namespace 2024-08-31 06:20:02 +10:00
Nyall Dawson
3a578d6712 Header update 2024-08-13 20:28:55 +10:00
Nyall Dawson
be8dce7d0d Valid improvements from new sipify 2024-08-13 20:28:55 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Even Rouault
02caeb9db7
Header files: remove all mentions of '\since QGIS 2.' 2024-02-18 20:46:01 +01:00
Nyall Dawson
976c86d03d Implement lazy initialization of default style library
Populating the style library from the database can be a time
consuming process, especially if a user has many symbols
present in their library.

But for many standalone scripts, and for qgis_process, the
style database may not be required.

Let's defer initialization of it until it's actually required,
saving the startup cost in qgis_process and 3rd party scripts.

On my system with a style database containing ~700 items this
cuts down qgis_process startup times by around 25%
2024-01-10 12:24:59 +10:00
Nyall Dawson
50c76929e1
Followup 30700f1, ensure links to Qgis members are set in docstrings 2023-03-31 10:46:24 +10:00
Alexey Karandashev
30700f1ef1 Fix GeometryType in documentation:
QgsWkbTypes::GeometryType to Qgis::GeometryType
and QgsWkbTypes::<geometry>Geometry to Qgis::GeometryType::<geometry>
2023-03-31 10:28:36 +10:00
Nyall Dawson
046883fa9c Promote QgsWkbTypes enums to enum class, move to Qgis 2023-02-22 12:39:21 +10:00
Denis Rouzaud
40231e84b4 sipify 2023-01-12 15:00:51 +01:00
Nyall Dawson
c6ba421644 Cleanup some more of the default style/project instance initialisation spaghetti
And avoid some more QgsProject::instance() in core
2022-05-17 16:36:00 +10:00
Nyall Dawson
aa658465f8 Cleanup handling of default label format for project, and avoid a QgsProject::instance() use in core 2022-05-17 16:36:00 +10:00
Nyall Dawson
1251b115f4 Better way to mark styles as read only 2022-05-17 16:36:00 +10:00
Nyall Dawson
42a758ec6a Allow lazy setting of style manager QgsStyle 2022-05-17 16:36:00 +10:00
Nyall Dawson
b420204916 Allow parent object for QgsStyle 2022-05-17 16:36:00 +10:00
Nyall Dawson
7e4a68ab00 Fix filename handling for QgsStyle 2022-05-17 16:36:00 +10:00
Nyall Dawson
bff6676877 Documentation, const 2022-05-17 16:36:00 +10:00
Nyall Dawson
173693116e Deprecate QgsStyle::save, which is a no-op call as all the functionality
is ifdefed out and does nothing
2022-05-17 16:36:00 +10:00
Nyall Dawson
6c73cfcd45 Add name to QgsStyle 2022-05-12 19:58:04 +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
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
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
6245b552a4 Add method to retrieve compatible layer types from 3d symbol in style library 2020-07-29 10:27:17 +10:00
Nyall Dawson
6e40962510 Partial 3d symbol style manager work 2020-07-29 10:27:17 +10:00
Nyall Dawson
9b19e069b3 Allow symbol and color ramp visitors the ability to edit symbols/color ramps they visit 2020-07-26 09:56:46 +10:00
Nyall Dawson
f60b79fcea Move QgsAbstract3DSymbol to core 2020-07-23 07:53:20 +10:00
Nyall Dawson
8d4f00b0af Remove TODO comments included in public API documentation
This is just "airing our dirty laundry". We don't want/need end users
to see this.
2020-06-15 13:43:58 +10:00
Nyall Dawson
ec2894ea32 Show favorited legend patches in legend patch button menu 2020-04-22 12:43:01 +10:00
Nyall Dawson
8a0e007ba5 [FEATURE] Support legend patch shapes in style manager databases
And clean up a lot of duplicate code which makes adding new types
to QgsStyle painful
2020-04-22 12:43:01 +10:00
Nyall Dawson
ae8e5cfeaa Move default legend patch shape handling to QgsStyle 2020-04-21 10:40:50 +10:00
Nyall Dawson
a08af65b42 More boring duplicate code cleanup 2020-04-11 05:24:54 +10:00
Nyall Dawson
0e8be09fd0 Remove a bunch of duplicate code and simplify interface for QgsStyle/QgsStyleModel 2020-04-11 05:24:54 +10:00
Nyall Dawson
4f5f6b5607 Add a generic method for adding style entities to a QgsStyle 2019-07-06 12:36:54 +10:00
Nyall Dawson
590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00
Nyall Dawson
850ea71c4d More wip 2019-06-21 15:52:56 +10:00
Nyall Dawson
0fd4984b3b [FEATURE] Allow storage of label settings in style manager
Just like the earlier change which allows for text formats to
be managed in style manager, this change allows for layer-wide
label settings to be stored and managed in styles.

So while a text format includes just the font settings and other
appearance related settings, Label Settings also includes layer-type
specific settings such as label placement, priority, rendering
settings.
2019-06-21 15:52:56 +10:00
Nyall Dawson
6f172da7e0 Fix dox 2019-06-21 15:52:56 +10:00
Nyall Dawson
554d23b324 Improve handling of favorites in QgsStyleModel and proxy model
Fixes favorite entities sometimes incorrectly filtered out
2019-06-21 15:52:56 +10:00
Nyall Dawson
40e4789ba1 [API] Add support for text renderer formats to QgsStyle 2019-06-21 15:52:56 +10:00
Nyall Dawson
b6d66becab Sipify 2019-02-27 09:41:11 +10:00
Nyall Dawson
519a30f10c Standardise dox for signals 2019-02-26 03:24:31 +10:00