50 Commits

Author SHA1 Message Date
Mathieu Pellerin
6994d1c680
[advanced digitizing] Add circles intersection digitizing tool (#57648) 2024-07-31 17:05:58 +07:00
Nyall Dawson
6f652d251b Drop no-value copy constructor dox 2024-07-25 04:02:55 +10:00
Nyall Dawson
f2591c1b78 Move callout widget initialization to common place 2024-07-22 07:14:23 +10:00
Alexander Bruy
f0db0f247b address review 2024-07-04 07:30:51 +10:00
Alexander Bruy
d5605a3321 update QGIS version in the doxygen comments 2024-07-04 07:30:51 +10:00
Alexander Bruy
5566473a1d add log for tracking Processing favorite algorithms 2024-07-04 07:30:51 +10:00
Even Rouault
15ea5c46bc
Header files: remove all mentions of '\since QGIS 3.0' 2024-02-18 20:57:23 +01:00
Nyall Dawson
078fd4f2ea Make IntFlag enum type opt-in, rather than opt-out
And make sipify handle this nicely. This means that all our non-flag
style enums correctly map across to IntFlag python enums on Qt 6,
fixing issues with negative enum values for these and providing
a better match for the original c++ enum.
2024-01-31 17:16:18 +10:00
Nyall Dawson
eca6b7a409 Add framework for handling non-keyboard/mouse map controllers
This is the base API interface classes for creation of custom
2d or 3d map controllers, and registering them in a common
QgsInputControllerManager singleton class.
2023-06-27 14:49:20 +10:00
Denis Rouzaud
77cc02f27e add registry of settings editors wrappers 2023-04-23 07:15:07 +02:00
Mathieu Pellerin
95c57b134c [ui][sensors] Sensors GUI registry implementation 2023-03-30 10:39:43 +07:00
Denis Rouzaud
efcf169a09 fix since 3.24 -> 3.26 2022-02-21 17:05:13 +01:00
Denis Rouzaud
7b86867cfa Apply suggestions from code review
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2022-02-21 08:46:26 +01:00
Denis Rouzaud
0aed1cc660 adapt QgsMapToolCapture to correctly support shape map tools 2022-01-28 06:30:24 +01:00
Nyall Dawson
6783347896 Implement framework for history providers
As per https://github.com/qgis/QGIS-Enhancement-Proposals/issues/130
2021-12-21 15:32:57 +10:00
Nyall Dawson
db4b0fed86 Move to core 2021-09-24 15:47:10 +10:00
Nyall Dawson
d1e43b63fb Add new class QgsRecentStyleHandler
Accessible via QgsGui::recentStyleHandler(), this is intended as
a place to store recently used style items (e.g. symbols).

Initially it's used just for annotation items so that newly
created annotation items are automatically set to the same style
as the most recently modified item of the same type (e.g. so
that users drawing many point annotations don't need to keep
setting it back to the same appearance)! But the api is kept
flexible for additional uses in future... (eg layout items)
2021-09-24 15:47:10 +10:00
Nyall Dawson
c7c7b6dd1e [api] Create annotation item gui registry
This registry is attached to QgsGui and handles registration of
functions which create widgets for modifying QgsAnnotationItems

Modeled heavily off the print layout API
2021-09-07 10:35:02 +10:00
Damiano Lombardi
18bd5833bb Moved settingsRespectScreenDPI to new settings registry gui 2021-07-12 15:51:30 +02:00
Alessandro Pasotti
7b2fc4c1f8 More doxy nonsense, pt 2 2021-02-19 08:15:29 +10:00
Ivan Ivanov
51cd712c76 Add relation widget registry 2020-12-30 04:46:51 +02:00
Nyall Dawson
d5c3b4b8a5 Add API to allow creation of widgets for customising a layer's source
This adds api in the provider gui to allow a provider to create a custom
widget which exposes options to customise and change the layer's source.

E.g. a file based layer provider could expose a widget for selecting
a new file path, and an online one could expose widgets for changing
the host, authentication, etc.
2020-12-26 09:51:34 +10:00
Even Rouault
24eb319af2 [FEATURE] Add a subset string editor provider concept and registry
The aim of this work is to be able to provide custom subset string editor
GUI according to the layer. Typically, so that a WFS layer uses the same
editor than in its select source, or that a plugin can provide a custom
editor.

* Add QgsSubsetStringEditorInterface: abstract interface to define a dialog
  that can edit a subset string
* Make QgsQueryBuilder implement QgsSubsetStringEditorInterface
* Add QgsSubsetStringEditorProvider: interface for thos who want to provide
  a dialog to edit a subset string.
* Add QgsSubsetStringEditorProviderRegistry: keeps a list of subset string
  editor providers. Transposed from QgsDataItemGuiProviderRegistry
* Add QgsGui::subsetStringEditorProviderRegistry()
2020-11-16 11:09:06 +10:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Nyall Dawson
3098fa5906 Move code editor color scheme tracking to dedicated registry,
QgsCodeEditorColorSchemeRegistry

This cleans up the code, and makes it possible for creation of plugins
which add new code editor color schemes!
2020-10-06 17:11:34 +10:00
Nyall Dawson
527e8850ef Add universal last-resort signal QgsGui::optionsChanged()
This signal is emitted whenever the application options have been changed.

This signal is a "blanket" signal, and will be emitted whenever the options dialog
has been accepted regardless of whether or not individual settings are changed.
It is designed as a "last resort" fallback only, allowing widgets to respond
to possible settings changes.
2020-10-05 13:24:46 +10:00
Nyall Dawson
ccf6898eb9 Start on registry for numeric format configuration widgets 2020-01-08 16:20:43 +13:00
Denis Rouzaud
8c198a9f46 run lambda if macros are allowed
not only when asking

also show a warning when message bar exists
2019-10-03 10:20:10 +02:00
Denis Rouzaud
6bb82d1dc6 fix API docs 2019-10-02 16:10:13 +02:00
Denis Rouzaud
86550e9837 create a method in QgsGui to determine if running Python macros is allowed 2019-10-02 15:53:15 +02:00
Nyall Dawson
2ff91d24a9 Move methods to sample screen pixels to QgsGui 2019-09-24 03:41:51 +10:00
Martin Dobias
8ed0bb38d1 Start using QgsProjectStorageGuiRegistry + its providers (gpkg projects work again)
Also deprecate gui methods in QgsProjectStorage but keep compatibility
2019-06-21 16:28:21 +02:00
Peter Petrik
62d615c2cd [QEP 149] Introduce static data providers [API BREAK]
- adds QgsProviderGuiRegistry and QgsProviderGuiMetadata
- adds QgsProjectStorageGuiRegistry
- requires providerMetadataFactory for dynamic data providers
- requires providerMetadataGuiFactory for dynamic data providers (GUI only)
- removes QgsProviderRegistry::WidgetMode
2019-06-18 15:15:36 +02:00
Nyall Dawson
dac7259b46 [needs-docs] Rework new project CRS handling
The previous approach was severely broken, because the default
CRS for new projects setting was ignored as soon as a layer
was added to the project.

Instead, refine the setting to add options
- "Use CRS from first layer added": same as previous behavior,
the project CRS is set to match the first layer added to a new
project
- "Use a default CRS": CRS for a new project is set to a preset
default CRS, and is left unchanged when adding layers to the
project

Also update qgis_global_settings.ini to reflect these changes.

Fixes #27516
2019-05-30 06:28:32 +10:00
Matthias Kuhn
89ea819938
Make sure Python wrappers of quasi-singletons are kept alive
If they are deleted, any other python wrappers which have been parented to these singletons are deleted too.

One of the most common issues with this is, that subclasses of registry items are deleted and lost.
2019-02-06 12:18:41 +01:00
Nyall Dawson
6ec7f02e83 Add a QgsDataItemGuiProvider interface and registry for providers
These providers will be used to control how the browser data items
behave within GUI, and to allow separation of GUI related
properties of browser items from the core code.

A new registry QgsDataItemGuiProviderRegistry has been created
(modeled off QgsDataItemProviderRegistry), with an application
wide instance available from QgsGui::instance()->dataItemGuiProviderRegistry()
2018-11-04 21:07:27 +10:00
Nyall Dawson
1118f4ac91 Remove some dox details which are likely to go out of date quickly 2018-10-26 07:20:47 +10:00
Borys Jurgiel
d0813a8822 Introduce QgsGui::HigFlags and don't capitalize menu entries and dialog titles in languages other than English. Fixes #19724 2018-10-25 18:11:36 +10:00
Nyall Dawson
cb178a7bb8 New class QgsWindowManagerInterface
With implementation in app. This allows GUI library classes to
re-use standard dialogs which are created in app. The initial
use-case is to allow the GUI library symbol list widget to
focus/open an existing Style Manager dialog (created in app),
instead of opening a new modal style manager dialog.

Side benefit - moves some code out of the monolithic qgisapp.cpp
file.
2018-09-14 21:13:10 +10:00
Nyall Dawson
d232cde514 [processing] Move recent algorithm log to c++ class 2018-07-05 02:37:03 +10:00
Matthias Kuhn
3d9b8bbd69 Add missing docstring 2018-04-09 13:10:48 +02:00
Matthias Kuhn
eb39d2379c Move processing algorithm configuration code to gui lib 2018-04-09 13:10:47 +02:00
Nathan Woodrow
57dc9deb06
Add API to ease saving and restoring widget geometry. (#5615)
Usage:
 - QgsGui::instance()->enableAutoGeometryRestore( this ); just
after setupUi in your widgets to enable.
 - Remove any calls to saveGeometry() and restoreGeometry() in your
widgets.
2017-12-04 13:41:42 +10:00
Alessandro Pasotti
90f873086c Attach QgsSourceSelectProviderRegistry to QgsGui
And make it a singleton
2017-09-04 08:00:14 +02:00
Nyall Dawson
cf488d34a4 Split layout item registry into two separate registries
Instead of relying on forward declared c++ classes from
gui in QgsLayoutItemRegistry, instead create a
QgsLayoutItemGuiRegistry which handles registration
of all the GUI specific behavior relating to layout items.

Remove all GUI related code from QgsLayoutItemRegistry.

This creates a cleaner split between core/gui code, and
given that there'll be a lot of gui specific behavior
which needs to be handled by a registry it makes sense
to keep this isolated in gui.

It also plays nicer with the sip bindings, which can't
handle forward declared gui classes in core.
2017-07-11 11:06:36 +10:00
Nyall Dawson
6efe160a65 Move QgsNative instance from app->QgsGui singleton
This allows gui widgets to utilise native platform interfaces.
Additionally attaching the instance to QgsGui allows QgsNative
to become a QObject in future if required and for use
of signals/slots in the native interfaces.
2017-05-15 09:56:52 +10:00
Nyall Dawson
436844b205 QgsMapLayerActionRegistry is no longer a singleton
Moved the global instance to QgsGui::QgsMapLayerActionRegistry()
2017-05-15 07:32:38 +10:00
Nyall Dawson
a86b93e957 QgsLayerTreeEmbeddedWidgetRegistry is no longer a singleton
Moved the global instance to QgsGui::layerTreeEmbeddedWidgetRegistry()
2017-05-15 07:32:01 +10:00
Nyall Dawson
711f6dcc50 QgsShortcutsManager is no longer a singleton
Move the global instance to QgsGui::shortcutsManager()
2017-05-15 07:32:01 +10:00
Nyall Dawson
4a5c9a7ba3 Make a new global QgsGui singleton
Move QgsEditorWidgetRegistry from being a singleton itself to
instead being a member of the QgsGui singleton
2017-05-15 07:32:01 +10:00