80 Commits

Author SHA1 Message Date
Denis Rouzaud
efcf169a09 fix since 3.24 -> 3.26 2022-02-21 17:05:13 +01:00
Denis Rouzaud
be0fe08c2e better dox for deprecated interface actions methods 2022-01-28 06:30:26 +01:00
Denis Rouzaud
e37e985b58 sipify 2022-01-28 06:30:24 +01:00
Harrissou Sant-anna
b8de4d389e
Add version mention 2022-01-20 21:37:13 +01:00
Harrissou Sant-anna
0ef51feccf
Dedicated method allowing to add plugins to the Mesh menu 2022-01-20 15:07:15 +01:00
Nyall Dawson
8cf4903204 Don't expose QgsMapToolModifyAnnotation to python
We want to leave this private for now, to give flexibility to change
api if/when needed
2021-09-10 15:01:26 +10:00
Nyall Dawson
48715202f7 When the modify annotation tool is used to select an annotation item,
show a panel in the layer styling dock allowing users to modify
the appearance of the annotation
2021-09-07 10:35:02 +10:00
Keigo Imai
c34cfeb43b update sip file 2021-07-23 11:30:34 +10:00
Keigo Imai
811a0353a5 Add activeDecorations to iface object
Allow plugins and scripts to export animations with decorations
2021-07-23 11:30:34 +10:00
Ivan Ivanov
27883030c6
Update python/gui/auto_generated/qgisinterface.sip.in
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
2021-04-07 11:15:34 +03:00
Ivan Ivanov
294b01a6f1 Added docstring describing the page argument of showLayerProperties
One can get a list of page names by executing the following command:
grep \"mOptsPage ./build/src/ui/ui_qgs*layerpropertiesbase.h
2021-04-07 10:51:31 +03:00
Ivan Ivanov
3057966086 Open a specific page in the layer properties dialog using the iface instance 2021-04-06 19:37:10 +03:00
Denis Rouzaud
ba8a445850 run sipify 2021-03-22 21:13:52 +01:00
Nyall Dawson
cc5cbabaa3 Avoid API break 2021-02-09 20:12:37 +10:00
Harrissou Sant-anna
3a952a6981 Remove Add ArcGIS map service button
after it's merged with feature service

(cherry picked from commit 82797ac8d28e50a03c2190d7a8df1d740f688c5f)
2021-02-09 20:12:37 +10:00
Nyall Dawson
50b9beaad6 [sipify] Catch more class references and insert :py:class: annotations 2021-01-31 05:41:22 +10:00
Nyall Dawson
0d33fe4c99 Documentation improvements, add SIP_DEPRECATED annotations 2021-01-02 15:48:54 +10:00
TurboGraphxBeige
e25d857a50 Re-add actionZoomToLayer 2021-01-02 07:04:48 +10:00
Peter Petrik
b796dbb07b add some basic skelet for point cloud data providers 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
Nyall Dawson
e0321be23f Add iface method and new class for delegating all responsibility
and logic for activating a custom map tool and ensuring it can
only be enabled in the right circumstances to QGIS app

If a plugin has to do this, it's a nightmare of code and hacks (partly
because of the number of changing circumstances it needs to respond
to, and partly because a lot of the useful functions available
for handling this behavior is locked away in private methods
in qgisapp.cpp)

So instead make an abstract base class for map tool handlers and
an iface method for register/unregistering them.

From the dox:

An abstract base class for map tool handlers which automatically handle all the necessary
logic for toggling the map tool and enabling/disabling the associated action
when the QGIS application is in a state permissible for the tool.

Creating these handlers avoids a lot of complex setup code and manual connections
which are otherwise necessary to ensure that a map tool is correctly activated and
deactivated when the state of the QGIS application changes (e.g. when the active
layer is changed, when edit modes are toggled, when other map tools are switched
to, etc).

- ### Example

\code{.py}
  class MyMapTool(QgsMapTool):
     ...

  class MyMapToolHandler(QgsAbstractMapToolHandler):

     def __init__(self, tool, action):
         super().__init__(tool, action)

     def isCompatibleWithLayer(self, layer, context):
         # this tool can only be activated when an editable vector layer is selected
         return isinstance(layer, QgsVectorLayer) and layer.isEditable()

  my_tool = MyMapTool()
  my_action = QAction('My Map Tool')

  my_handler = MyMapToolHandler(my_tool, my_action)
  iface.registerMapToolHandler(my_handler)
\endcode
2020-10-23 19:03:51 +10:00
Nyall Dawson
abacccb7e9 Add mapToolActionGroup to iface object
Any actions added by plugins for toggling a map tool should also
be added to this action group so that they behave identically
to the native, in-built map tool actions.
2020-10-23 03:57:34 +10:00
Nyall Dawson
5565a6858d Some doxygen grammar fixes 2020-10-21 09:32:15 +10:00
Nyall Dawson
746ee315bd Fix boolean literal presentation in dox/PyQGIS docs 2020-10-16 16:03:26 +10:00
Nyall Dawson
df6c8d74cd Allow plugins and scripts to register custom logic to prevent
the QGIS application from exiting

This interface allows plugins to implement custom logic to determine whether it is safe
for the application to exit, e.g. by checking whether the plugin or script has any
unsaved changes which should be saved or discarded before allowing QGIS to exit.
2020-10-06 17:04:49 +10:00
nirvn
445d78f7cc Add a plugin interface to add pages to the project properties dialog 2020-09-17 13:48:57 +07:00
Nyall Dawson
97915e3203 Add a iface method to directly set a specific GPS connection to connect
to in the GPS Information panel

Allows for plugins to create subclasses of QgsGpsConnection and then
hook these into the existing GPS panel widget
2020-08-05 18:52:29 +10:00
Ivan Ivanov
c0f8dea17a Sipify 2020-06-18 05:53:23 +10:00
Nyall Dawson
81a9db9f57 [sipify] Fix creation of cross references 2020-06-15 13:43:58 +10:00
Alexander Bruy
c93049afd1 add "Selection" toolbar to the QGIS main window and move all
selection-related actions to it (fix #21045, refs #20350)
2020-05-13 10:18:47 +10:00
Germán Carrillo
76a8f8270a Expose addTabifiedDockWidget through QgisInterface 2020-05-03 15:34:46 +10:00
Alexander Bruy
05370ca842 [feature] Add Vector Tile Layer action in "Layers" menu 2020-04-16 16:06:38 +03:00
Alexander Bruy
39e397ebd0 [feature] api for adding vector tile layers
This is code-only, not visible to users change and prerequisite for
exposing vector tile layer in the Data Source manager
2020-04-16 13:26:40 +03:00
Alexander Bruy
261553dd28 fix docs 2020-04-15 08:33:55 +03:00
Alexander Bruy
baf7729ca0 fix Travis 2020-04-14 18:34:03 +03:00
Alexander Bruy
079dae3529 [feature] add "Add XYZ Layer" button to Layers menu 2020-04-14 13:54:39 +03:00
Nyall Dawson
27164156e1 [FEATURE][API] Allow plugins to register custom "Project Open" handlers
These allow plugins to extend the "Open Project" dialog by adding in support
for new file filters, which appear in the formats drop down list alongside
the existing "QGS Projects" entry.

Custom project open handlers then get first chance at loading project files.

This allows plugins to extend QGIS support by adding integrated support for
opening projects from non QGS/QGZ formats, e.g. allowing users to open
ArcGIS MXD documents or MapInfo WOR Workspaces direct from the project open
dialog.

These non-native projects are also added to the recent projects list and
welcome screen, giving them a truly first-class experience within QGIS.

Sponsored by SLYR
2020-04-07 09:18:49 +10:00
Matthias Kuhn
c6621a9faf
Merge pull request #35413 from suricactus/layer_toggle
FIX #33874 Turn on/off ALL selected layers with "Space" button
2020-04-03 11:41:53 +02:00
Ivan Ivanov
ef2cacfe89 Fixes on spelling and feedback received 2020-03-30 14:21:37 +03:00
Ivan Ivanov
7c9cd0b893 Distinguish between toggle all and toggle independently 2020-03-30 07:37:43 +03:00
Ivan Ivanov
1dc0800a56 FIX #33874 Turn on/off ALL selected layers with "Space" button 2020-03-27 23:27:46 +02:00
Nyall Dawson
b1d50c2116 [FEATURE][API] Add interface hooks to allow plugins to register
"development/debugging" tools

These tools appear in a new Development/Debugging Tools dock,
and provide a unified handling and place for these tools in the
UI.

The intention here is that specialised development/debugging tools
will be moved to this common interface, e.g.
- network logger
- first aid style Python local variables inspector
- startup time debugging tools
- layer load and rendering time debugging tools
... ?
2020-03-25 20:03:18 +10:00
lbartoletti
18e9766d51 dox 2020-01-08 08:35:27 +13:00
lbartoletti
2b031cf418 Expose shape digitizing methods to QgisInterface 2020-01-08 08:35:27 +13:00
Nyall Dawson
b4bc7cbffd iface.newProject() should return False if a new project could not
be created (e.g. if the user opts to cancel when prompted to save the
current project)
2019-12-04 19:02:46 +10:00
Denis Rouzaud
758d7cff4a run sipify to update deprecation annotations 2019-10-15 13:17:38 +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
Denis Rouzaud
abb08c2988
[locator] allow to trigger locator search from the API (#32017) 2019-09-27 09:58:47 +02:00
Denis Rouzaud
13119193ba fix API doc and init values 2019-09-19 09:05:40 +02:00
Denis Rouzaud
838dbef3c0 [layer tree] dedicated method in QgisApp to determine insertion point
and create bindings to get the current insertion point in QgisInterface
2019-09-17 20:55:40 +02:00