52 Commits

Author SHA1 Message Date
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
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
Yoann Quenach de Quivillic
8f3676dd80 Add search tolerance to QgsLayoutViewToolSelect 2023-07-08 04:53:44 +10:00
Nyall Dawson
8d5cdc85fc Workaround sip inability to convert enum class variants to python objects 2023-02-19 13:29:06 +10:00
Nyall Dawson
f9c3da1e06 Move unit enums to Qgis, promote to enum class 2023-02-19 13:29:06 +10:00
Nyall Dawson
44ba8aca2a Use QgsScreenHandler instead of duplicate screen dpi handling code 2022-08-16 12:25:52 +10:00
Juergen E. Fischer
c6008b7ee1 fix MSVC build: reverts fee62e4, dff05dd and e3a77b9484c effectivly
reverting 3fb0f66 (followup #45348)

Using --no-public-is-protected (default on Windows) also works on Linux
and fixes #45331 too
2021-10-21 23:03:48 +02:00
nirvn
ef84e48a09 Run sipify_all.sh 2021-10-12 16:34:05 +10:00
Denis Rouzaud
ec16736306 run sipify 2021-10-12 16:34:05 +10:00
Nyall Dawson
9328953aa7 [layouts] Ensures that 1:1 zoom level on layout designer accounts
for actual screen dpi, and responds correctly when window is dragged
between screens
2021-07-20 11:21:29 +10:00
Nyall Dawson
ccb4146206 [api] Add signal to QgsLayoutDesignerInterface which is emitted
whenever a map item's preview image has been refreshed inside
the designer
2021-06-09 20:45:20 +10:00
Nyall Dawson
6bd24e5d17 [api] Add QgsLayoutDesignerInterface.layoutExported signal
Emitted whenever the layout is exported from the designer
2021-06-09 20:45:20 +10:00
Nyall Dawson
e62714484f [api] Add method for plugins to retrieve results of last layout export
operation from a layout designer window
2021-06-09 20:45:20 +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
ad944156c8 [feature][layouts] Add menu entry to add dynamic text labels
easily to a layout

The new "Add Item" -> "Dynamic Text" menu contains a bunch of preset
handy dynamic text expressions which users can use to insert a label
automatically containing the corresponding expression. E.g.

Add Item -> Dynamic Text -> Layout Name

will insert a label containing the expression [% @layout_name %].

This raises discoverability and user-friendliness of inserting
dynamic labels
2021-01-12 04:32:19 +10:00
Nyall Dawson
da59316fb5 Use /TransferBack/ instead of /Factory/ in layout registry factory methods
For same reason as we do in Processing registry:

(from the comments included in this commit)
"
While it seems like /Factory/ would be the correct annotations here, that's not
the case.
As per Phil Thomson's advice on https://www.riverbankcomputing.com/pipermail/pyqt/2017-July/039450.html:

"
/Factory/ is used when the instance returned is guaranteed to be new to Python.
In this case it isn't because it has already been seen when being returned by QgsProcessingAlgorithm::createInstance()
(However for a different sub-class implemented in C++ then it would be the first time it was seen
by Python so the /Factory/ on create() would be correct.)

You might try using /TransferBack/ on create() instead - that might be the best compromise.
"
2020-12-22 06:27:17 +10:00
Nyall Dawson
ab6bbfda1d Fix all remaining Qt QFlags deprecated constructor warnings 2020-10-02 13:04:49 +10:00
Nyall Dawson
6d647aa678 Add method to filter QgsLayoutItemComboBox by item flags 2020-07-31 03:06:31 +10:00
Denis Rouzaud
0cb8408425
more flags warnings fixes for Qt 5.15 (#37309)
* more flags warnings fixes for Qt 5.15

* fix sip compilation
2020-06-19 12:02:00 +02:00
Denis Rouzaud
044a05d828 run sipify 2020-06-19 08:47:23 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Denis Rouzaud
8866021fe1
[layout] add missing interface to set atlas feature (#36432) 2020-05-15 11:09:25 +02:00
Nyall Dawson
226bc42dd8 [FEATURE][layouts] Support pasting pictures directly into layouts
Embeds the pasted picture into the layout.

Note that Qt image clipboard handling seems a bit... crap. So success
may vary.
2020-04-17 13:48:05 +10:00
Nyall Dawson
2800798fef [FEATURE][layouts] Allow drag and drop of pictures onto layouts
E.g. drag an svg from a file explorer onto the layout to create a
new picture item containing that svg image.

Convenience++!
2019-11-28 18:38:31 +10:00
Nyall Dawson
86c83537f9 [layouts] Update map settings variables in UI when map extent/rotation changes
Fixes #24136
2019-09-28 08:40:41 +10:00
Nyall Dawson
2b31e03ad0 [layouts] Ensure variable panels are updated when layout or atlas
properties change

Fixes #26402
2019-09-28 08:40:41 +10:00
Nyall Dawson
bdbb622bac Fix crash when using QgsLayoutItemComboBox when null values
are displayed

Turns out there is NO reliable way to create a proxy model
which adds new rows to a model, so just bite the bullet and
do it in the underlying model (yuck)
2019-03-18 17:32:31 +10:00
Nyall Dawson
f9fb4085b2 Tweaks to layout item combo box 2019-03-12 08:16:52 +10:00
Nyall Dawson
8d77a6bdcc New gui class QgsLayoutComboBox
Shows a list of layouts
2019-03-12 08:16:52 +10:00
Nyall Dawson
107b48a430 Add NULLPTR macro for use in doxygen comments
For the c++ api dox this expands to "\c nullptr" (the
\c directive indicates a code literal value), and for sipify/Python
it expands to ``None`` (`` is sphinx annotation for literal values)

Makes for nicer dox for both c++ and Python!
2019-02-27 09:41:11 +10:00
Nyall Dawson
a7ca08784c Nullptr consistency in dox 2019-02-27 09:41:11 +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
Nyall Dawson
cdd23e663e [needs-docs][layouts] Move pushbutton actions for map items up to
a toolbar in the map item properties panel

This moves the
- refresh preview
- set to map canvas extent
- view extent in map canvas

buttons from being oversized push buttons within the item properties
panel up to a new toolbar at the top of this panel. Apart from looking
better, it means these important actions are always visible regardless
of the scroll position of the item properties panel itself.
Additionally, it makes it possible to add MORE actions here without
overloading the UI (e.g. "set canvas extent to item extent")

TODO: better icons
2018-12-18 10:31:24 +10:00
Nyall Dawson
bbdbfa17a9 [layouts] Final fixes for data defined widgets showing outdated
data defined definitions when clicking between layout items
of the same type

Fixes #18694
2018-10-26 16:58:08 +10:00
Denis Rouzaud
fa92f41eb5 add missing doxymentation to gui/layout 2018-10-24 07:54:06 -08:00
Nyall Dawson
a093dd7293 [layouts] Add api to retrieve window from designer dialog interface 2018-10-23 10:54:55 +10:00
Nyall Dawson
8d7c54e8d7 More layout object sip casting 2018-10-23 08:59:10 +10:00
Nyall Dawson
926e03ac3c Spell 2018-10-23 08:59:10 +10:00
Nyall Dawson
8a525b0b86 [layouts] Add notes to layout designer dialog interface documentation
regarding customisation of designer instances
2018-10-23 08:59:10 +10:00
Nyall Dawson
f23b09b845 [needs-docs][layouts] Expose menus and toolbars (and some other goodies) to stable
layout designer interface API

This commit adds more methods to the public, stable API for the layout
designer dialog, allowing plugins and scripts greater flexibility
in extending and hooking into the layout designer.

New API includes:
- access to the main menus shown in the dialog, allowing custom actions
to be added to the dialog
- access to the dialog's toolbars
- methods for adding (and removing) additional dock widgets to the designer
- the method used to show/hide rulers in the designer
2018-10-19 11:53:04 +10:00
Nyall Dawson
448b4505bb [layouts] Expose designer enable atlas preview and show item options to
stable API
2018-10-12 10:28:56 +10:00
Denis Rouzaud
f27a5043bb remove useless includes 2018-10-09 11:48:33 -08:00
Nyall Dawson
757949bac0 Add missing references 2018-06-22 09:43:19 +10:00
Nyall Dawson
2ed144ac59 Apply clang-tidy readability-avoid-const-params-in-decls fixit
Checks whether a function declaration has parameters that are
top level const.

const values in declarations do not affect the signature of a
function, so they should not be put there.
2018-06-05 10:19:13 +10:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00