mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Introduce abstract QgsGpsToolsInterface and its subclass QgsAppGpsTools, which can be accessed via iface.gpsTools() Deprecate existent GPS method in iface and move it to GPS tools.
1975 lines
62 KiB
Plaintext
1975 lines
62 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgisinterface.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
class Qgs3DMapCanvas /External/;
|
|
|
|
%ModuleHeaderCode
|
|
class Qgs3DMapCanvas;
|
|
%End
|
|
|
|
|
|
class QgisInterface : QObject
|
|
{
|
|
%Docstring(signature="appended")
|
|
Abstract base class defining interfaces exposed by QgisApp and made
|
|
available to plugins.
|
|
|
|
Only functionality exposed by QgisInterface can be used in plugins. This
|
|
interface has to be implemented with application specific details.
|
|
|
|
QGIS implements it in QgisAppInterface class, 3rd party applications
|
|
could provide their own implementation to be able to use plugins.
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgisinterface.h"
|
|
%End
|
|
public:
|
|
QgisInterface();
|
|
|
|
virtual QgsPluginManagerInterface *pluginManagerInterface() = 0;
|
|
|
|
virtual QgsLayerTreeView *layerTreeView() = 0;
|
|
|
|
virtual QgsGpsToolsInterface *gpsTools() = 0;
|
|
%Docstring
|
|
Returns an interface to allow plugins to use QGIS GPS tools.
|
|
%End
|
|
|
|
virtual void addCustomActionForLayerType( QAction *action, QString menu, Qgis::LayerType type, bool allLayers ) = 0;
|
|
%Docstring
|
|
Add action to context menu for layers in the layer tree. If allLayers is
|
|
``True``, then the action will be available for all layers of given
|
|
type, otherwise the action will be available only for specific layers
|
|
added with :py:func:`~QgisInterface.addCustomActionForLayer` after this
|
|
call.
|
|
|
|
If menu argument is not empty, the action will be also added to a menu
|
|
within the main window, creating menu with the given name if it does not
|
|
exist yet.
|
|
|
|
.. seealso:: :py:func:`removeCustomActionForLayerType`
|
|
|
|
.. seealso:: :py:func:`addCustomActionForLayer`
|
|
%End
|
|
|
|
virtual void addCustomActionForLayer( QAction *action, QgsMapLayer *layer ) = 0;
|
|
%Docstring
|
|
Add action to context menu for a specific layer in the layer tree. It is
|
|
necessary to first call
|
|
:py:func:`~QgisInterface.addCustomActionForLayerType` with
|
|
allLayers=false in order for this method to have any effect.
|
|
|
|
.. seealso:: :py:func:`addCustomActionForLayerType`
|
|
%End
|
|
|
|
virtual bool removeCustomActionForLayerType( QAction *action ) = 0;
|
|
%Docstring
|
|
Remove action for layers in the layer tree previously added with
|
|
:py:func:`~QgisInterface.addCustomActionForLayerType`
|
|
|
|
.. seealso:: :py:func:`addCustomActionForLayerType`
|
|
%End
|
|
|
|
virtual QList<QgsMapCanvas *> mapCanvases() = 0;
|
|
%Docstring
|
|
Returns a list of all map canvases open in the app.
|
|
%End
|
|
|
|
virtual QgsMapCanvas *createNewMapCanvas( const QString &name ) = 0;
|
|
%Docstring
|
|
Create a new map canvas with the specified unique ``name``.
|
|
|
|
.. seealso:: :py:func:`closeMapCanvas`
|
|
%End
|
|
|
|
virtual void closeMapCanvas( const QString &name ) = 0;
|
|
%Docstring
|
|
Closes the additional map canvas with matching ``name``.
|
|
|
|
.. seealso:: :py:func:`createNewMapCanvas`
|
|
%End
|
|
|
|
virtual QList<Qgs3DMapCanvas *> mapCanvases3D() = 0;
|
|
%Docstring
|
|
Returns a list of all 3D map canvases open in the app.
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
virtual Qgs3DMapCanvas *createNewMapCanvas3D( const QString &name, Qgis::SceneMode sceneMode = Qgis::SceneMode::Local ) = 0;
|
|
%Docstring
|
|
Create a new 3D map canvas with the specified unique ``name``.
|
|
|
|
.. note::
|
|
|
|
Scene mode (local or globe) can be selected since QGIS 3.44.
|
|
|
|
.. seealso:: :py:func:`closeMapCanvas3D`
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
virtual void closeMapCanvas3D( const QString &name ) = 0;
|
|
%Docstring
|
|
Closes the additional map canvas with matching ``name``.
|
|
|
|
.. seealso:: :py:func:`createNewMapCanvas3D`
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
virtual QSize iconSize( bool dockedToolbar = false ) const = 0;
|
|
%Docstring
|
|
Returns the toolbar icon size. If ``dockedToolbar`` is ``True``, the
|
|
icon size for toolbars contained within docks is returned.
|
|
%End
|
|
|
|
virtual QList<QgsMapLayer *> editableLayers( bool modified = false ) const = 0;
|
|
%Docstring
|
|
Returns vector layers in edit mode
|
|
|
|
:param modified: whether to return only layers that have been modified
|
|
|
|
:return: list of layers in legend order, or empty list
|
|
%End
|
|
|
|
virtual QgsMapLayer *activeLayer() = 0;
|
|
%Docstring
|
|
Returns a pointer to the active layer (layer selected in the legend)
|
|
%End
|
|
|
|
virtual QgsMapCanvas *mapCanvas() = 0;
|
|
%Docstring
|
|
Returns a pointer to the map canvas
|
|
%End
|
|
|
|
virtual QList<QgsMapDecoration *> activeDecorations() = 0;
|
|
%Docstring
|
|
Returns a list of the active decorations.
|
|
|
|
.. versionadded:: 3.22
|
|
%End
|
|
|
|
virtual QgsLayerTreeMapCanvasBridge *layerTreeCanvasBridge() = 0;
|
|
%Docstring
|
|
Returns a pointer to the layer tree canvas bridge
|
|
%End
|
|
|
|
virtual QWidget *mainWindow() = 0;
|
|
%Docstring
|
|
Returns a pointer to the main window (instance of QgisApp in case of
|
|
QGIS)
|
|
%End
|
|
|
|
virtual QgsMessageBar *messageBar() = 0;
|
|
%Docstring
|
|
Returns the message bar of the main app
|
|
%End
|
|
|
|
virtual QList<QgsLayoutDesignerInterface *> openLayoutDesigners() = 0;
|
|
%Docstring
|
|
Returns all currently open layout designers.
|
|
%End
|
|
|
|
|
|
virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
|
|
%Docstring
|
|
Returns changeable options built from settings and/or defaults
|
|
%End
|
|
|
|
virtual QFont defaultStyleSheetFont() = 0;
|
|
%Docstring
|
|
Returns a reference font for initial qApp (may not be same as QgisApp)
|
|
%End
|
|
|
|
virtual QgsAdvancedDigitizingDockWidget *cadDockWidget() = 0;
|
|
%Docstring
|
|
Advanced digitizing dock widget
|
|
%End
|
|
|
|
|
|
virtual QMenu *projectMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Project" menu.
|
|
%End
|
|
|
|
virtual QMenu *projectImportExportMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Import/Export" project menu.
|
|
|
|
.. seealso:: :py:func:`addProjectImportAction`
|
|
|
|
.. seealso:: :py:func:`addProjectExportAction`
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
virtual void addProjectImportAction( QAction *action ) = 0;
|
|
%Docstring
|
|
Adds an ``action`` to the QGIS "Import project" menu.
|
|
|
|
.. seealso:: :py:func:`removeProjectImportAction`
|
|
|
|
.. seealso:: :py:func:`addProjectExportAction`
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
virtual void removeProjectImportAction( QAction *action ) = 0;
|
|
%Docstring
|
|
Adds an ``action`` to the QGIS "Import project" menu.
|
|
|
|
.. seealso:: :py:func:`addProjectImportAction`
|
|
|
|
.. seealso:: :py:func:`removeProjectExportAction`
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
virtual void addProjectExportAction( QAction *action ) = 0;
|
|
%Docstring
|
|
Adds an ``action`` to the QGIS "Export project" menu.
|
|
|
|
.. seealso:: :py:func:`removeProjectExportAction`
|
|
|
|
.. seealso:: :py:func:`addProjectImportAction`
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
virtual void removeProjectExportAction( QAction *action ) = 0;
|
|
%Docstring
|
|
Adds an ``action`` to the QGIS "Export project" menu.
|
|
|
|
.. seealso:: :py:func:`addProjectExportAction`
|
|
|
|
.. seealso:: :py:func:`removeProjectImportAction`
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
virtual QMenu *projectModelsMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Projects" - "Models" submenu.
|
|
|
|
.. versionadded:: 3.42
|
|
%End
|
|
|
|
virtual QMenu *createProjectModelSubMenu( const QString &title ) = 0;
|
|
%Docstring
|
|
Creates a new project model submenu in the "Projects" - "Models"
|
|
submenu.
|
|
|
|
.. versionadded:: 3.42
|
|
%End
|
|
|
|
virtual QMenu *editMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Edit" menu.
|
|
%End
|
|
|
|
virtual QMenu *viewMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "View" menu.
|
|
%End
|
|
|
|
virtual QMenu *layerMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Layer" menu.
|
|
%End
|
|
|
|
virtual QMenu *newLayerMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Create New Layer" menu.
|
|
%End
|
|
|
|
virtual QMenu *addLayerMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Add Layer" menu.
|
|
%End
|
|
|
|
virtual QMenu *settingsMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Settings" menu.
|
|
%End
|
|
|
|
virtual QMenu *pluginMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Plugin" menu.
|
|
%End
|
|
|
|
virtual QMenu *pluginHelpMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Plugin Help" sub-menu.
|
|
|
|
Plugins are encouraged to insert help and about actions in this submenu
|
|
instead of creating a submenu under the
|
|
:py:func:`~QgisInterface.pluginMenu` which solely contains Plugin Help
|
|
or About actions.
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
virtual QMenu *rasterMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Raster" menu.
|
|
%End
|
|
|
|
virtual QMenu *databaseMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Database" menu.
|
|
%End
|
|
|
|
virtual QMenu *vectorMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Vector" menu.
|
|
%End
|
|
|
|
virtual QMenu *webMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Web" menu.
|
|
%End
|
|
|
|
virtual QMenu *meshMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Mesh" menu.
|
|
|
|
.. versionadded:: 3.34
|
|
%End
|
|
|
|
virtual QMenu *firstRightStandardMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the right most standard menu, which is usually
|
|
the last menu item before the "Help" menu.
|
|
|
|
This can be used to insert additional top-level menus into their correct
|
|
position BEFORE the help menu.
|
|
%End
|
|
|
|
virtual QMenu *windowMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Window" menu.
|
|
%End
|
|
|
|
virtual QMenu *helpMenu() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Help" menu.
|
|
%End
|
|
|
|
|
|
virtual QToolBar *fileToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "File" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *layerToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Layer" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *dataSourceManagerToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Data Source Manager" toolbar.
|
|
|
|
.. versionadded:: 3.4
|
|
%End
|
|
|
|
virtual void openDataSourceManagerPage( const QString &pageName ) = 0;
|
|
%Docstring
|
|
Opens a page in the main window "Data Source Manager" dialog.
|
|
|
|
This method creates and opens the dialog if it is not already visible.
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
virtual QToolBar *mapNavToolToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Map Navigation" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *digitizeToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Digitize" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *advancedDigitizeToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Advanced Digitizing" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *shapeDigitizeToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Shape Digitizing" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *attributesToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Attributes" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *selectionToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Selection" toolbar.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual QToolBar *pluginToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Plugin" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *helpToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Help" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *rasterToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Raster" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *vectorToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Vector" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *databaseToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Database" toolbar.
|
|
%End
|
|
|
|
virtual QToolBar *webToolBar() = 0;
|
|
%Docstring
|
|
Returns a reference to the main window "Web" toolbar.
|
|
%End
|
|
|
|
virtual QAction *actionNewProject() = 0;
|
|
%Docstring
|
|
Returns the native New Project action.
|
|
%End
|
|
virtual QAction *actionOpenProject() = 0;
|
|
%Docstring
|
|
Returns the Open Project action.
|
|
%End
|
|
virtual QAction *actionSaveProject() = 0;
|
|
%Docstring
|
|
Returns the native Save Project action.
|
|
%End
|
|
virtual QAction *actionSaveProjectAs() = 0;
|
|
%Docstring
|
|
Returns the native Save Project As action.
|
|
%End
|
|
virtual QAction *actionSaveMapAsImage() = 0;
|
|
%Docstring
|
|
Returns the native Save Map as Image action.
|
|
%End
|
|
virtual QAction *actionProjectProperties() = 0;
|
|
%Docstring
|
|
Returns the native Project Properties action.
|
|
%End
|
|
|
|
virtual QAction *actionCreatePrintLayout() = 0;
|
|
%Docstring
|
|
Create new print layout action
|
|
%End
|
|
|
|
virtual QAction *actionShowLayoutManager() = 0;
|
|
%Docstring
|
|
Show layout manager action
|
|
%End
|
|
virtual QAction *actionExit() = 0;
|
|
%Docstring
|
|
Returns the Exit QGIS action.
|
|
%End
|
|
|
|
|
|
virtual QAction *actionCutFeatures() = 0;
|
|
%Docstring
|
|
Returns the native Cut Features action.
|
|
%End
|
|
virtual QAction *actionCopyFeatures() = 0;
|
|
%Docstring
|
|
Returns the native Copy Features action.
|
|
%End
|
|
virtual QAction *actionPasteFeatures() = 0;
|
|
%Docstring
|
|
Returns the native Paste Features action.
|
|
%End
|
|
virtual QAction *actionAddFeature() = 0;
|
|
%Docstring
|
|
Returns the native Add Feature action.
|
|
%End
|
|
virtual QAction *actionDeleteSelected() = 0;
|
|
%Docstring
|
|
Returns the native Delete Selected Features action.
|
|
%End
|
|
virtual QAction *actionMoveFeature() = 0;
|
|
%Docstring
|
|
Returns the native Move Features action.
|
|
%End
|
|
virtual QAction *actionSplitFeatures() = 0;
|
|
%Docstring
|
|
Returns the native Split Features action.
|
|
%End
|
|
virtual QAction *actionSplitParts() = 0;
|
|
%Docstring
|
|
Returns the native Split Parts action.
|
|
%End
|
|
virtual QAction *actionAddRing() = 0;
|
|
%Docstring
|
|
Returns the native Add Ring action.
|
|
%End
|
|
virtual QAction *actionAddPart() = 0;
|
|
%Docstring
|
|
Returns the native Add Part action.
|
|
%End
|
|
virtual QAction *actionSimplifyFeature() = 0;
|
|
%Docstring
|
|
Returns the native Simplify/Smooth Features action.
|
|
%End
|
|
virtual QAction *actionDeleteRing() = 0;
|
|
%Docstring
|
|
Returns the native Delete Ring action.
|
|
%End
|
|
virtual QAction *actionDeletePart() = 0;
|
|
%Docstring
|
|
Returns the native Delete Part action.
|
|
%End
|
|
|
|
virtual QAction *actionVertexTool() = 0;
|
|
%Docstring
|
|
Returns the native "Vertex Tool for All Layers" action.
|
|
|
|
.. seealso:: :py:func:`actionVertexToolActiveLayer`
|
|
%End
|
|
|
|
virtual QAction *actionVertexToolActiveLayer() = 0;
|
|
%Docstring
|
|
Returns the native "Vertex Tool for Active Layer" action.
|
|
|
|
.. seealso:: :py:func:`actionVertexTool`
|
|
|
|
.. versionadded:: 3.6
|
|
%End
|
|
|
|
virtual QActionGroup *mapToolActionGroup() = 0;
|
|
%Docstring
|
|
Returns the action group for map tools.
|
|
|
|
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.
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual QAction *actionPan() = 0;
|
|
%Docstring
|
|
Returns the native pan action. Call :py:func:`~QgisInterface.trigger` on
|
|
it to set the default pan map tool.
|
|
%End
|
|
virtual QAction *actionPanToSelected() = 0;
|
|
%Docstring
|
|
Returns the native pan to selected action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to pan the map canvas to the
|
|
selection.
|
|
%End
|
|
virtual QAction *actionZoomIn() = 0;
|
|
%Docstring
|
|
Returns the native zoom in action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default zoom in map
|
|
tool.
|
|
%End
|
|
virtual QAction *actionZoomOut() = 0;
|
|
%Docstring
|
|
Returns the native zoom out action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default zoom out map
|
|
tool.
|
|
%End
|
|
virtual QAction *actionSelect() = 0;
|
|
%Docstring
|
|
Returns the native select action. Call :py:func:`~QgisInterface.trigger`
|
|
on it to set the default select map tool.
|
|
%End
|
|
virtual QAction *actionSelectRectangle() = 0;
|
|
%Docstring
|
|
Returns the native select rectangle action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default select
|
|
rectangle map tool.
|
|
%End
|
|
virtual QAction *actionSelectPolygon() = 0;
|
|
%Docstring
|
|
Returns the native select polygon action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default select
|
|
polygon map tool.
|
|
%End
|
|
virtual QAction *actionSelectFreehand() = 0;
|
|
%Docstring
|
|
Returns the native select freehand action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default select
|
|
freehand map tool.
|
|
%End
|
|
virtual QAction *actionSelectRadius() = 0;
|
|
%Docstring
|
|
Returns the native select radius action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default select radius
|
|
map tool.
|
|
%End
|
|
virtual QAction *actionIdentify() = 0;
|
|
%Docstring
|
|
Returns the native identify action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default identify map
|
|
tool.
|
|
%End
|
|
virtual QAction *actionFeatureAction() = 0;
|
|
%Docstring
|
|
Returns the native run action feature action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default run feature
|
|
action map tool.
|
|
%End
|
|
virtual QAction *actionMeasure() = 0;
|
|
%Docstring
|
|
Returns the native measure action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default measure map
|
|
tool.
|
|
%End
|
|
virtual QAction *actionMeasureArea() = 0;
|
|
%Docstring
|
|
Returns the native measure area action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the default measure area
|
|
map tool.
|
|
%End
|
|
virtual QAction *actionZoomFullExtent() = 0;
|
|
%Docstring
|
|
Returns the native zoom full extent action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to zoom to the full extent.
|
|
%End
|
|
|
|
virtual QAction *actionZoomToLayer() = 0 /Deprecated="Since 3.40. Use actionZoomToLayers() instead."/;
|
|
%Docstring
|
|
Returns the native zoom to layer action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to zoom to the active layer.
|
|
|
|
.. deprecated:: 3.40
|
|
|
|
Use :py:func:`~QgisInterface.actionZoomToLayers` instead.
|
|
%End
|
|
|
|
virtual QAction *actionZoomToLayers() = 0;
|
|
%Docstring
|
|
Returns the native zoom to layers action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to zoom to the selected layers.
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
virtual QAction *actionZoomToSelected() = 0;
|
|
%Docstring
|
|
Returns the native zoom to selected action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to zoom to the current
|
|
selection.
|
|
%End
|
|
virtual QAction *actionZoomLast() = 0;
|
|
%Docstring
|
|
Returns the native zoom last action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to zoom to last.
|
|
%End
|
|
virtual QAction *actionZoomNext() = 0;
|
|
%Docstring
|
|
Returns the native zoom next action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to zoom to next.
|
|
%End
|
|
virtual QAction *actionZoomActualSize() = 0;
|
|
%Docstring
|
|
Returns the native zoom resolution (100%) action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to zoom to actual size.
|
|
%End
|
|
virtual QAction *actionMapTips() = 0;
|
|
%Docstring
|
|
Returns the native map tips action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to toggle map tips.
|
|
%End
|
|
virtual QAction *actionNewBookmark() = 0;
|
|
%Docstring
|
|
Returns the native new bookmark action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to open the new bookmark dialog.
|
|
%End
|
|
virtual QAction *actionShowBookmarks() = 0;
|
|
%Docstring
|
|
Returns the native show bookmarks action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to open the bookmarks dialog.
|
|
%End
|
|
virtual QAction *actionDraw() = 0;
|
|
%Docstring
|
|
Returns the native draw action.
|
|
%End
|
|
|
|
virtual QAction *actionNewVectorLayer() = 0;
|
|
virtual QAction *actionAddOgrLayer() = 0;
|
|
virtual QAction *actionAddRasterLayer() = 0;
|
|
virtual QAction *actionAddPgLayer() = 0;
|
|
virtual QAction *actionAddWmsLayer() = 0;
|
|
|
|
virtual QAction *actionAddXyzLayer() = 0;
|
|
%Docstring
|
|
Returns the native Add XYZ Layer action.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual QAction *actionAddVectorTileLayer() = 0;
|
|
%Docstring
|
|
Returns the native Add Vector Tile Layer action.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual QAction *actionAddPointCloudLayer() = 0;
|
|
%Docstring
|
|
Returns the native Add Point Cloud Layer action.
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
virtual QAction *actionAddAfsLayer() = 0;
|
|
%Docstring
|
|
Returns the native Add ArcGIS REST Server action.
|
|
%End
|
|
|
|
virtual QAction *actionAddAmsLayer() = 0;
|
|
%Docstring
|
|
Returns the native Add ArcGIS REST Server action.
|
|
%End
|
|
|
|
virtual QAction *actionCopyLayerStyle() = 0;
|
|
virtual QAction *actionPasteLayerStyle() = 0;
|
|
virtual QAction *actionOpenTable() = 0;
|
|
virtual QAction *actionOpenFieldCalculator() = 0;
|
|
|
|
virtual QAction *actionOpenStatisticalSummary() = 0;
|
|
%Docstring
|
|
Statistical summary action.
|
|
%End
|
|
|
|
virtual QAction *actionToggleEditing() = 0;
|
|
virtual QAction *actionSaveActiveLayerEdits() = 0;
|
|
virtual QAction *actionAllEdits() = 0;
|
|
virtual QAction *actionSaveEdits() = 0;
|
|
virtual QAction *actionSaveAllEdits() = 0;
|
|
virtual QAction *actionRollbackEdits() = 0;
|
|
virtual QAction *actionRollbackAllEdits() = 0;
|
|
virtual QAction *actionCancelEdits() = 0;
|
|
virtual QAction *actionCancelAllEdits() = 0;
|
|
virtual QAction *actionLayerSaveAs() = 0;
|
|
virtual QAction *actionDuplicateLayer() = 0;
|
|
virtual QAction *actionLayerProperties() = 0;
|
|
virtual QAction *actionAddToOverview() = 0;
|
|
virtual QAction *actionAddAllToOverview() = 0;
|
|
virtual QAction *actionRemoveAllFromOverview() = 0;
|
|
virtual QAction *actionHideAllLayers() = 0;
|
|
virtual QAction *actionShowAllLayers() = 0;
|
|
virtual QAction *actionHideSelectedLayers() = 0;
|
|
|
|
virtual QAction *actionToggleSelectedLayers() = 0;
|
|
%Docstring
|
|
Returns the Toggle Selected Layers action.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual QAction *actionToggleSelectedLayersIndependently() = 0;
|
|
%Docstring
|
|
Returns the Toggle Selected Layers Independently action.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual QAction *actionHideDeselectedLayers() = 0;
|
|
%Docstring
|
|
Returns the Hide Deselected Layers action.
|
|
%End
|
|
virtual QAction *actionShowSelectedLayers() = 0;
|
|
|
|
virtual QAction *actionManagePlugins() = 0;
|
|
virtual QAction *actionPluginListSeparator() = 0;
|
|
virtual QAction *actionShowPythonDialog() = 0;
|
|
|
|
virtual QAction *actionToggleFullScreen() = 0;
|
|
virtual QAction *actionOptions() = 0;
|
|
virtual QAction *actionCustomProjection() = 0;
|
|
|
|
virtual QAction *actionHelpContents() = 0;
|
|
virtual QAction *actionQgisHomePage() = 0;
|
|
virtual QAction *actionCheckQgisVersion() = 0;
|
|
virtual QAction *actionAbout() = 0;
|
|
|
|
|
|
virtual QAction *actionCircle2Points() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add circle from 2 points action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionCircle3Points() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add circle from 3 points action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionCircle3Tangents() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add circle from 3 tangents action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionCircle2TangentsPoint() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add circle from 2 tangents and a point action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionCircleCenterPoint() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add circle from center action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionEllipseCenter2Points() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add ellipse from center and 2 points action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionEllipseCenterPoint() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add ellipse from center and a point action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionEllipseExtent() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add ellipse from an extent action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionEllipseFoci() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add ellipse from foci action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionRectangleCenterPoint() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add rectangle from center and a point action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionRectangleExtent() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add rectangle from extent action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionRectangle3PointsDistance() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add rectangle from 3 points (distance from 2nd and
|
|
3rd points) action. Call :py:func:`~QgisInterface.trigger` on it to set
|
|
the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionRectangle3PointsProjected() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add rectangle from 3 points (distance from projected
|
|
3rd point on segment p1 and p2) action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionRegularPolygon2Points() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add regular polygon from 2 points action. Call
|
|
:py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionRegularPolygonCenterPoint() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add regular polygon from center and a point action.
|
|
Call :py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QAction *actionRegularPolygonCenterCorner() /Deprecated="Since 3.26. Shape digitizing is now part of the add feature tool. To enable the shape tool, use QgsMapToolCapture.setCurrentCaptureTechnique() and then QgsMapToolCapture.setCurrentShapeMapTool()."/;
|
|
%Docstring
|
|
Returns the native add regular polygon from center and a corner action.
|
|
Call :py:func:`~QgisInterface.trigger` on it to set the map tool.
|
|
|
|
.. deprecated:: 3.26
|
|
|
|
Shape digitizing is now part of the add feature tool. To enable the shape tool, use :py:func:`QgsMapToolCapture.setCurrentCaptureTechnique()` and then :py:func:`QgsMapToolCapture.setCurrentShapeMapTool()`.
|
|
%End
|
|
|
|
virtual QgsVectorLayerTools *vectorLayerTools() = 0;
|
|
%Docstring
|
|
Access the vector layer tools instance. With the help of this you can
|
|
access methods like addFeature, startEditing or stopEditing while giving
|
|
the user the appropriate dialogs.
|
|
|
|
:return: An instance of the vector layer tools
|
|
%End
|
|
|
|
virtual int messageTimeout() = 0;
|
|
%Docstring
|
|
Returns the timeout for timed messages: default of 5 seconds
|
|
%End
|
|
|
|
virtual QgsStatusBar *statusBarIface() = 0;
|
|
%Docstring
|
|
Returns a pointer to the app's status bar interface. This should be used
|
|
for interacting and adding widgets and messages to the app's status bar
|
|
(do not use the native Qt :py:func:`~QgisInterface.statusBar` method).
|
|
%End
|
|
|
|
virtual void takeAppScreenShots( const QString &saveDirectory, const int categories = 0 );
|
|
%Docstring
|
|
Take screenshots for user documentation
|
|
|
|
:param saveDirectory: path where the screenshots will be saved
|
|
:param categories: an int as a flag value of
|
|
:py:class:`QgsAppScreenShots`.Categories
|
|
|
|
.. versionadded:: 3.4
|
|
%End
|
|
|
|
virtual QgsLayerTreeRegistryBridge::InsertionPoint layerTreeInsertionPoint() = 0;
|
|
%Docstring
|
|
Returns the insertion point. This represents the current layer tree
|
|
group and index where newly added map layers should be inserted into.
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
virtual QgsUserProfileManager *userProfileManager() = 0;
|
|
%Docstring
|
|
Returns a reference to the user profile manager
|
|
|
|
.. versionadded:: 3.30
|
|
%End
|
|
|
|
public slots: // TODO: do these functions really need to be slots?
|
|
|
|
|
|
virtual void zoomFull() = 0;
|
|
%Docstring
|
|
Zooms to the full extent of all map layers.
|
|
%End
|
|
|
|
virtual void zoomToPrevious() = 0;
|
|
%Docstring
|
|
Zooms to the previous view extent.
|
|
%End
|
|
|
|
virtual void zoomToNext() = 0;
|
|
%Docstring
|
|
Zooms to the next view extent.
|
|
%End
|
|
|
|
virtual void zoomToActiveLayer() = 0;
|
|
%Docstring
|
|
Zooms to extent of the active layer.
|
|
%End
|
|
|
|
virtual QgsVectorLayer *addVectorLayer( const QString &vectorLayerPath, const QString &baseName, const QString &providerKey ) = 0;
|
|
%Docstring
|
|
Adds a vector layer to the current project, using the specified data
|
|
provider and source url.
|
|
|
|
The ``baseName`` parameter will be used as the layer name (and shown in
|
|
the map legend).
|
|
%End
|
|
|
|
virtual QgsRasterLayer *addRasterLayer( const QString &rasterLayerPath, const QString &baseName = QString() ) = 0;
|
|
%Docstring
|
|
Adds a raster layer to the current project, given a raster layer file
|
|
name.
|
|
|
|
The ``baseName`` parameter will be used as the layer name (and shown in
|
|
the map legend).
|
|
%End
|
|
|
|
virtual QgsRasterLayer *addRasterLayer( const QString &url, const QString &layerName, const QString &providerKey ) = 0;
|
|
%Docstring
|
|
Adds a raster layer to the current project, from the specified raster
|
|
data provider and source ``url``.
|
|
|
|
The ``layerName`` parameter will be used as the layer name (and shown in
|
|
the map legend).
|
|
%End
|
|
|
|
virtual QgsMeshLayer *addMeshLayer( const QString &url, const QString &baseName, const QString &providerKey ) = 0;
|
|
%Docstring
|
|
Adds a mesh layer to the current project, using the specified data
|
|
provider and source ``url``.
|
|
|
|
The ``baseName`` parameter will be used as the layer name (and shown in
|
|
the map legend).
|
|
%End
|
|
|
|
virtual QgsVectorTileLayer *addVectorTileLayer( const QString &url, const QString &baseName ) = 0;
|
|
%Docstring
|
|
Adds a vector tile layer to the current project, using the specified
|
|
source ``url``.
|
|
|
|
The ``baseName`` parameter will be used as the layer name (and shown in
|
|
the map legend).
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual QgsPointCloudLayer *addPointCloudLayer( const QString &url, const QString &baseName, const QString &providerKey ) = 0;
|
|
%Docstring
|
|
Adds a point cloud layer to the current project, using the specified
|
|
data provider and source ``url``.
|
|
|
|
The ``baseName`` parameter will be used as the layer name (and shown in
|
|
the map legend).
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
virtual QgsTiledSceneLayer *addTiledSceneLayer( const QString &url, const QString &baseName, const QString &providerKey ) = 0;
|
|
%Docstring
|
|
Adds a tiled scene layer to the current project, using the specified
|
|
data provider and source ``url``.
|
|
|
|
The ``baseName`` parameter will be used as the layer name (and shown in
|
|
the map legend).
|
|
|
|
.. versionadded:: 3.34
|
|
%End
|
|
|
|
virtual bool addProject( const QString &project ) = 0;
|
|
%Docstring
|
|
Adds (opens) a project
|
|
%End
|
|
|
|
virtual bool newProject( bool promptToSaveFlag = false ) = 0;
|
|
%Docstring
|
|
Starts a new blank project.
|
|
|
|
If ``promptToSaveFlag`` is ``True`` then users will be prompted to save
|
|
any currently open project (if that project has changes). If the flag is
|
|
``False``, then the current project will be closed without prompting to
|
|
save (possibly resulting in data loss).
|
|
|
|
Since QGIS 3.10.1, returns ``True`` if a new project was created, or
|
|
``False`` if the operation was not successful (e.g. the user opted to
|
|
cancel when prompted to save the current project).
|
|
%End
|
|
|
|
virtual void reloadConnections() = 0;
|
|
%Docstring
|
|
Triggered when connections have changed. This calls reloadConnections in
|
|
the main application and triggers a signal that is forwarded to the GUI
|
|
elements that needs to be updated (i.e. the source select dialogs and
|
|
the browser widgets)
|
|
%End
|
|
|
|
virtual bool setActiveLayer( QgsMapLayer * ) = 0;
|
|
%Docstring
|
|
Set the active layer (layer gets selected in the legend) returns
|
|
``True`` if the layer exists, ``False`` otherwise
|
|
%End
|
|
|
|
virtual void copySelectionToClipboard( QgsMapLayer * ) = 0;
|
|
%Docstring
|
|
Copy selected features from the layer to clipboard
|
|
%End
|
|
|
|
virtual void pasteFromClipboard( QgsMapLayer * ) = 0;
|
|
%Docstring
|
|
Paste features from clipboard to the layer
|
|
%End
|
|
|
|
virtual int addToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Add an icon to the plugins toolbar
|
|
%End
|
|
|
|
virtual QAction *addToolBarWidget( QWidget *widget /Transfer/ ) = 0;
|
|
%Docstring
|
|
Add a widget to the plugins toolbar. To remove this widget again, call
|
|
:py:func:`~QgisInterface.removeToolBarIcon` with the returned QAction.
|
|
|
|
:param widget: widget to add. The toolbar will take ownership of this
|
|
widget
|
|
|
|
:return: the QAction you can use to remove this widget from the toolbar
|
|
%End
|
|
|
|
virtual void removeToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Remove an action (icon) from the plugin toolbar
|
|
%End
|
|
|
|
virtual QAction *addRasterToolBarWidget( QWidget *widget /Transfer/ ) = 0;
|
|
%Docstring
|
|
Add a widget to the raster toolbar. To remove this widget again, call
|
|
:py:func:`~QgisInterface.removeRasterToolBarIcon` with the returned
|
|
QAction.
|
|
|
|
:param widget: widget to add. The toolbar will take ownership of this
|
|
widget
|
|
|
|
:return: the QAction you can use to remove this widget from the toolbar
|
|
%End
|
|
|
|
virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Add an icon to the Raster toolbar
|
|
%End
|
|
|
|
virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Remove an action (icon) from the Raster toolbar
|
|
%End
|
|
|
|
virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Add an icon to the Vector toolbar
|
|
%End
|
|
|
|
virtual QAction *addVectorToolBarWidget( QWidget *widget /Transfer/ ) = 0;
|
|
%Docstring
|
|
Add a widget to the vector toolbar. To remove this widget again, call
|
|
:py:func:`~QgisInterface.removeVectorToolBarIcon` with the returned
|
|
QAction.
|
|
|
|
:param widget: widget to add. The toolbar will take ownership of this
|
|
widget
|
|
|
|
:return: the QAction you can use to remove this widget from the toolbar
|
|
%End
|
|
|
|
virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Remove an action (icon) from the Vector toolbar
|
|
%End
|
|
|
|
virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Add an icon to the Database toolbar
|
|
%End
|
|
|
|
virtual QAction *addDatabaseToolBarWidget( QWidget *widget /Transfer/ ) = 0;
|
|
%Docstring
|
|
Add a widget to the database toolbar. To remove this widget again, call
|
|
:py:func:`~QgisInterface.removeDatabaseToolBarIcon` with the returned
|
|
QAction.
|
|
|
|
:param widget: widget to add. The toolbar will take ownership of this
|
|
widget
|
|
|
|
:return: the QAction you can use to remove this widget from the toolbar
|
|
%End
|
|
|
|
virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Remove an action (icon) from the Database toolbar
|
|
%End
|
|
|
|
virtual int addWebToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Add an icon to the Web toolbar
|
|
%End
|
|
|
|
virtual QAction *addWebToolBarWidget( QWidget *widget /Transfer/ ) = 0;
|
|
%Docstring
|
|
Add a widget to the web toolbar. To remove this widget again, call
|
|
:py:func:`~QgisInterface.removeWebToolBarIcon` with the returned
|
|
QAction.
|
|
|
|
:param widget: widget to add. The toolbar will take ownership of this
|
|
widget
|
|
|
|
:return: the QAction you can use to remove this widget from the toolbar
|
|
%End
|
|
|
|
virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
|
|
%Docstring
|
|
Remove an action (icon) from the Web toolbar
|
|
%End
|
|
|
|
virtual QToolBar *addToolBar( const QString &name ) = 0 /Factory/;
|
|
%Docstring
|
|
Add toolbar with specified name
|
|
%End
|
|
|
|
virtual void addToolBar( QToolBar *toolbar /Transfer/, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0;
|
|
%Docstring
|
|
Add a toolbar
|
|
%End
|
|
|
|
virtual void openMessageLog() = 0;
|
|
%Docstring
|
|
Opens the message log dock widget.
|
|
%End
|
|
|
|
virtual void addUserInputWidget( QWidget *widget ) = 0;
|
|
%Docstring
|
|
Adds a widget to the user input tool bar.
|
|
%End
|
|
|
|
virtual void showLayoutManager() = 0;
|
|
%Docstring
|
|
Opens the layout manager dialog.
|
|
%End
|
|
|
|
virtual QgsLayoutDesignerInterface *openLayoutDesigner( QgsMasterLayoutInterface *layout ) = 0;
|
|
%Docstring
|
|
Opens a new layout designer dialog for the specified ``layout``, or
|
|
brings an already open designer window to the foreground if one is
|
|
already created for the layout.
|
|
%End
|
|
|
|
virtual void showOptionsDialog( QWidget *parent = 0, const QString ¤tPage = QString() ) = 0;
|
|
%Docstring
|
|
Opens the options dialog. The ``currentPage`` argument can be used to
|
|
force the dialog to open at a specific page.
|
|
%End
|
|
|
|
virtual void showProjectPropertiesDialog( const QString ¤tPage = QString() ) = 0;
|
|
%Docstring
|
|
Opens the project properties dialog. The ``currentPage`` argument can be
|
|
used to force the dialog to open at a specific page.
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void buildStyleSheet( const QMap<QString, QVariant> &opts ) = 0;
|
|
%Docstring
|
|
Generate stylesheet
|
|
|
|
:param opts: generated default option values, or a changed copy of them
|
|
%End
|
|
|
|
virtual void saveStyleSheetOptions( const QMap<QString, QVariant> &opts ) = 0;
|
|
%Docstring
|
|
Save changed default option keys/values to user settings
|
|
%End
|
|
|
|
virtual void addPluginToMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Add action to the plugins menu
|
|
%End
|
|
|
|
virtual void removePluginMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Remove action from the plugins menu
|
|
%End
|
|
|
|
virtual void insertAddLayerAction( QAction *action ) = 0;
|
|
%Docstring
|
|
Add "add layer" action to layer menu
|
|
%End
|
|
|
|
virtual void removeAddLayerAction( QAction *action ) = 0;
|
|
%Docstring
|
|
Remove "add layer" action from layer menu
|
|
%End
|
|
|
|
virtual void addPluginToDatabaseMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Add action to the Database menu
|
|
%End
|
|
|
|
virtual void removePluginDatabaseMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Remove action from the Database menu
|
|
%End
|
|
|
|
virtual void addPluginToRasterMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Add action to the Raster menu
|
|
%End
|
|
|
|
virtual void removePluginRasterMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Remove action from the Raster menu
|
|
%End
|
|
|
|
virtual void addPluginToVectorMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Add action to the Vector menu
|
|
%End
|
|
|
|
virtual void removePluginVectorMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Remove action from the Vector menu
|
|
%End
|
|
|
|
virtual void addPluginToWebMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Add action to the Web menu
|
|
%End
|
|
|
|
virtual void removePluginWebMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Remove action from the Web menu
|
|
%End
|
|
|
|
virtual void addPluginToMeshMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Add action to the Mesh menu
|
|
|
|
.. versionadded:: 3.24
|
|
%End
|
|
|
|
virtual void removePluginMeshMenu( const QString &name, QAction *action ) = 0;
|
|
%Docstring
|
|
Remove action from the Mesh menu
|
|
|
|
.. versionadded:: 3.24
|
|
%End
|
|
|
|
virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget ) = 0;
|
|
%Docstring
|
|
Adds a ``dock`` widget to the main window, in the specified dock
|
|
``area``.
|
|
|
|
.. seealso:: :py:func:`addTabifiedDockWidget`
|
|
|
|
.. seealso:: :py:func:`removeDockWidget`
|
|
%End
|
|
|
|
virtual void addTabifiedDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget, const QStringList &tabifyWith = QStringList(), bool raiseTab = false ) = 0;
|
|
%Docstring
|
|
Add a dock widget to the given area and tabify it (if other dock widgets
|
|
exist in the same ``area``). The new tab will be below other tabs unless
|
|
``raiseTab`` is passed as ``True``.
|
|
|
|
``tabifyWith`` is a list of dock widget object names, ordered by
|
|
priority, with which the new dock widget should be tabified. Only the
|
|
first matching object name will be picked. If none of the given object
|
|
names is found in that ``area`` (or if ``tabifyWith`` is not given at
|
|
all), the new dock widget will be created anyways, but its location
|
|
within that ``area`` will be unpredictable.
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual void removeDockWidget( QDockWidget *dockwidget ) = 0;
|
|
%Docstring
|
|
Removes the specified ``dock`` widget from main window (without deleting
|
|
it).
|
|
|
|
.. seealso:: :py:func:`addDockWidget`
|
|
%End
|
|
|
|
virtual void showLayerProperties( QgsMapLayer *l, const QString &page = QString() ) = 0;
|
|
%Docstring
|
|
Opens layer properties dialog for the layer ``l``. Optionally, a
|
|
``page`` to open can be specified (since QGIS 3.20). The list below
|
|
contains valid page names:
|
|
|
|
Vector Layer: mOptsPage_Information, mOptsPage_Source, mOptsPage_Style,
|
|
mOptsPage_Labels, mOptsPage_Masks, mOptsPage_Diagrams,
|
|
mOptsPage_SourceFields, mOptsPage_AttributesForm, mOptsPage_Joins,
|
|
mOptsPage_AuxiliaryStorage, mOptsPage_Actions, mOptsPage_Display,
|
|
mOptsPage_Rendering, mOptsPage_Temporal, mOptsPage_Variables,
|
|
mOptsPage_Elevation, mOptsPage_Metadata, mOptsPage_DataDependencies,
|
|
mOptsPage_Legend, mOptsPage_Server
|
|
|
|
Raster Layer: mOptsPage_Information, mOptsPage_Source, mOptsPage_Style,
|
|
mOptsPage_Transparency, mOptsPage_Histogram, mOptsPage_Rendering,
|
|
mOptsPage_Temporal, mOptsPage_Pyramids, mOptsPage_Elevation,
|
|
mOptsPage_Metadata, mOptsPage_Legend, mOptsPage_Server
|
|
|
|
Mesh Layer: mOptsPage_Information, mOptsPage_Source, mOptsPage_Style,
|
|
mOptsPage_StyleContent, mOptsPage_Rendering, mOptsPage_Temporal,
|
|
mOptsPage_Elevation, mOptsPage_Metadata
|
|
|
|
Point Cloud Layer: mOptsPage_Information, mOptsPage_Source,
|
|
mOptsPage_Elevation, mOptsPage_Metadata, mOptsPage_Statistics,
|
|
mOptsPage_Rendering
|
|
|
|
Vector Tile Layer: mOptsPage_Information, mOptsPage_Style,
|
|
mOptsPage_Labeling, mOptsPage_Metadata
|
|
|
|
.. note::
|
|
|
|
Page names are subject to change without notice between QGIS versions,
|
|
they are not considered part of the stable API.
|
|
|
|
.. note::
|
|
|
|
More strings may be available depending on the context, e.g. via plugins.
|
|
%End
|
|
|
|
virtual QDialog *showAttributeTable( QgsVectorLayer *l, const QString &filterExpression = QString() ) = 0;
|
|
%Docstring
|
|
Open attribute table dialog
|
|
%End
|
|
|
|
virtual void addWindow( QAction *action ) = 0;
|
|
%Docstring
|
|
Add window to Window menu. The action title is the window title and the
|
|
action should raise, unminimize and activate the window.
|
|
%End
|
|
|
|
virtual void removeWindow( QAction *action ) = 0;
|
|
%Docstring
|
|
Remove window from Window menu. Calling this is necessary only for
|
|
windows which are hidden rather than deleted when closed.
|
|
%End
|
|
|
|
virtual bool registerMainWindowAction( QAction *action, const QString &defaultShortcut ) = 0;
|
|
%Docstring
|
|
Register action to the shortcuts manager so its shortcut can be changed
|
|
in GUI
|
|
%End
|
|
|
|
virtual bool unregisterMainWindowAction( QAction *action ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered action. (e.g. when plugin is going to
|
|
be unloaded)
|
|
%End
|
|
|
|
virtual void registerMapLayerConfigWidgetFactory( QgsMapLayerConfigWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Register a new tab in the map layer properties dialog.
|
|
|
|
.. note::
|
|
|
|
Ownership of the factory is not transferred, and the factory must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:class:`QgsMapLayerConfigWidgetFactory`
|
|
|
|
.. seealso:: :py:func:`unregisterMapLayerConfigWidgetFactory`
|
|
%End
|
|
|
|
virtual void unregisterMapLayerConfigWidgetFactory( QgsMapLayerConfigWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered tab in the map layer properties
|
|
dialog.
|
|
|
|
.. seealso:: :py:class:`QgsMapLayerConfigWidgetFactory`
|
|
|
|
.. seealso:: :py:func:`registerMapLayerConfigWidgetFactory`
|
|
%End
|
|
|
|
virtual void registerOptionsWidgetFactory( QgsOptionsWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Register a new tab in the options dialog.
|
|
|
|
.. note::
|
|
|
|
Ownership of the factory is not transferred, and the factory must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:class:`QgsOptionsWidgetFactory`
|
|
|
|
.. seealso:: :py:func:`unregisterOptionsWidgetFactory`
|
|
%End
|
|
|
|
virtual void unregisterOptionsWidgetFactory( QgsOptionsWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered tab in the options dialog.
|
|
|
|
.. seealso:: :py:class:`QgsOptionsWidgetFactory`
|
|
|
|
.. seealso:: :py:func:`registerOptionsWidgetFactory`
|
|
%End
|
|
|
|
virtual void registerProjectPropertiesWidgetFactory( QgsOptionsWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Register a new tab in the project properties dialog.
|
|
|
|
.. note::
|
|
|
|
Ownership of the factory is not transferred, and the factory must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:class:`QgsOptionsWidgetFactory`
|
|
|
|
.. seealso:: :py:func:`unregisterProjectPropertiesWidgetFactory`
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void unregisterProjectPropertiesWidgetFactory( QgsOptionsWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered tab in the options dialog.
|
|
|
|
.. seealso:: :py:class:`QgsOptionsWidgetFactory`
|
|
|
|
.. seealso:: :py:func:`registerProjectPropertiesWidgetFactory`
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void registerDevToolWidgetFactory( QgsDevToolWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Register a new tool in the development/debugging tools dock.
|
|
|
|
.. note::
|
|
|
|
Ownership of the factory is not transferred, and the factory must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:func:`unregisterDevToolWidgetFactory`
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual void unregisterDevToolWidgetFactory( QgsDevToolWidgetFactory *factory ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered tool factory from the
|
|
development/debugging tools dock.
|
|
|
|
.. seealso:: :py:func:`registerDevToolWidgetFactory`
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual void showApiDocumentation( Qgis::DocumentationApi api = Qgis::DocumentationApi::PyQgis, Qgis::DocumentationBrowser browser = Qgis::DocumentationBrowser::DeveloperToolsPanel, const QString &object = QString(), const QString &module = QString() ) = 0;
|
|
%Docstring
|
|
Show a page of the API documentation
|
|
|
|
:param api: Which API to display
|
|
:param browser: Web browser used to display the API documentation
|
|
:param object: object to show in the documentation
|
|
:param module: used only if api =
|
|
:py:class:`Qgis`.DocumentationApi.PyQgis
|
|
|
|
.. versionadded:: 3.42
|
|
%End
|
|
|
|
virtual void registerApplicationExitBlocker( QgsApplicationExitBlockerInterface *blocker ) = 0;
|
|
%Docstring
|
|
Register a new application exit blocker, which can be used to prevent
|
|
the QGIS application from exiting while a plugin or script has unsaved
|
|
changes.
|
|
|
|
.. note::
|
|
|
|
Ownership of ``blocker`` is not transferred, and the blocker must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:func:`unregisterApplicationExitBlocker`
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void unregisterApplicationExitBlocker( QgsApplicationExitBlockerInterface *blocker ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered application exit ``blocker``.
|
|
|
|
.. seealso:: :py:func:`registerApplicationExitBlocker`
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void registerMapToolHandler( QgsAbstractMapToolHandler *handler ) = 0;
|
|
%Docstring
|
|
Register a new application map tool ``handler``, which can be used to
|
|
automatically setup all connections and logic required to switch to a
|
|
custom map tool whenever the state of the QGIS application permits.
|
|
|
|
.. note::
|
|
|
|
Ownership of ``handler`` is not transferred, and the handler must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:class:`QgsAbstractMapToolHandler`
|
|
|
|
.. seealso:: :py:func:`unregisterMapToolHandler`
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void unregisterMapToolHandler( QgsAbstractMapToolHandler *handler ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered map tool ``handler``.
|
|
|
|
.. seealso:: :py:func:`registerMapToolHandler`
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void registerCustomDropHandler( QgsCustomDropHandler *handler ) = 0;
|
|
%Docstring
|
|
Register a new custom drop ``handler``.
|
|
|
|
.. note::
|
|
|
|
Ownership of ``handler`` is not transferred, and the handler must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:class:`QgsCustomDropHandler`
|
|
|
|
.. seealso:: :py:func:`unregisterCustomDropHandler`
|
|
%End
|
|
|
|
virtual void unregisterCustomDropHandler( QgsCustomDropHandler *handler ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered custom drop ``handler``.
|
|
|
|
.. seealso:: :py:class:`QgsCustomDropHandler`
|
|
|
|
.. seealso:: :py:func:`registerCustomDropHandler`
|
|
%End
|
|
|
|
virtual void registerCustomProjectOpenHandler( QgsCustomProjectOpenHandler *handler ) = 0;
|
|
%Docstring
|
|
Register a new custom project open ``handler``.
|
|
|
|
.. note::
|
|
|
|
Ownership of ``handler`` is not transferred, and the handler must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:class:`QgsCustomProjectOpenHandler`
|
|
|
|
.. seealso:: :py:func:`unregisterCustomProjectOpenHandler`
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual void unregisterCustomProjectOpenHandler( QgsCustomProjectOpenHandler *handler ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered custom project open ``handler``.
|
|
|
|
.. seealso:: :py:class:`QgsCustomDropHandler`
|
|
|
|
.. seealso:: :py:func:`registerCustomProjectOpenHandler`
|
|
|
|
.. versionadded:: 3.14
|
|
%End
|
|
|
|
virtual void registerCustomLayoutDropHandler( QgsLayoutCustomDropHandler *handler ) = 0;
|
|
%Docstring
|
|
Register a new custom drop ``handler`` for layout windows.
|
|
|
|
.. note::
|
|
|
|
Ownership of ``handler`` is not transferred, and the handler must
|
|
be unregistered when plugin is unloaded.
|
|
|
|
.. seealso:: :py:class:`QgsLayoutCustomDropHandler`
|
|
|
|
.. seealso:: :py:func:`unregisterCustomLayoutDropHandler`
|
|
%End
|
|
|
|
virtual void unregisterCustomLayoutDropHandler( QgsLayoutCustomDropHandler *handler ) = 0;
|
|
%Docstring
|
|
Unregister a previously registered custom drop ``handler`` for layout
|
|
windows.
|
|
|
|
.. seealso:: :py:class:`QgsLayoutCustomDropHandler`
|
|
|
|
.. seealso:: :py:func:`registerCustomLayoutDropHandler`
|
|
%End
|
|
|
|
|
|
|
|
virtual void openURL( const QString &url, bool useQgisDocDirectory = true ) = 0 /Deprecated="Since 3.40. Use QDesktopServices instead."/;
|
|
%Docstring
|
|
Open a url in the users browser. By default the QGIS doc directory is
|
|
used as the base for the URL. To open a URL that is not relative to the
|
|
installed QGIS documentation, set useQgisDocDirectory to ``False``.
|
|
|
|
:param url: URL to open
|
|
:param useQgisDocDirectory: If ``True``, the URL will be formed by
|
|
concatenating url to the QGIS documentation
|
|
directory path (prefix/share/doc)
|
|
|
|
.. deprecated:: 3.40
|
|
|
|
Use QDesktopServices instead.
|
|
%End
|
|
|
|
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false, bool showModal = true ) = 0;
|
|
%Docstring
|
|
Opens a new feature form. Returns ``True`` if dialog was accepted (if
|
|
shown modal, ``True`` otherwise).
|
|
|
|
:param l: vector layer
|
|
:param f: feature to show/modify
|
|
:param updateFeatureOnly: only update the feature update (don't change
|
|
any attributes of the layer) [UNUSED]
|
|
:param showModal: if ``True``, will wait for the dialog to be executed
|
|
(only shown otherwise)
|
|
%End
|
|
|
|
virtual QgsAttributeDialog *getFeatureForm( QgsVectorLayer *l, QgsFeature &f ) = 0;
|
|
%Docstring
|
|
Returns a feature form for a given feature.
|
|
|
|
:param l: The layer for which the dialog will be created
|
|
:param f: The feature for which the dialog will be created
|
|
|
|
:return: A feature form
|
|
%End
|
|
|
|
virtual void preloadForm( const QString &uifile ) = 0;
|
|
%Docstring
|
|
This method is only needed when using a UI form with a custom widget
|
|
plugin and calling openFeatureForm or getFeatureForm from Python (PyQt)
|
|
and you haven't used the info tool first. Python will crash bringing
|
|
QGIS with it if the custom form is not loaded from a C++ method call.
|
|
|
|
This method uses a QTimer to call QUiLoader in order to load the form
|
|
via C++. You only need to call this once. After that you can call
|
|
openFeatureForm/getFeatureForm like usual.
|
|
|
|
More information here: http://qt-project.org/forums/viewthread/27098
|
|
%End
|
|
|
|
virtual void locatorSearch( const QString &searchText ) = 0;
|
|
%Docstring
|
|
This will perform a search in the locator bar by setting the line edit
|
|
text to ``searchText`` and automatically displaying any results.
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
virtual void registerLocatorFilter( QgsLocatorFilter *filter /Transfer/ ) = 0;
|
|
%Docstring
|
|
Registers a locator ``filter`` for the app's locator bar. Ownership of
|
|
the filter is transferred to the locator.
|
|
|
|
.. warning::
|
|
|
|
Plugins which register filters to the locator bar must take care to correctly call
|
|
:py:func:`~QgisInterface.deregisterLocatorFilter` and deregister their filters upon plugin unload to avoid crashes.
|
|
|
|
.. seealso:: :py:func:`deregisterLocatorFilter`
|
|
%End
|
|
|
|
virtual void deregisterLocatorFilter( QgsLocatorFilter *filter ) = 0;
|
|
%Docstring
|
|
Deregisters a locator ``filter`` from the app's locator bar and deletes
|
|
it. Calling this will block whilst any currently running query is
|
|
terminated.
|
|
|
|
Plugins which register filters to the locator bar must take care to
|
|
correctly call :py:func:`~QgisInterface.deregisterLocatorFilter` to
|
|
deregister their filters upon plugin unload to avoid crashes.
|
|
|
|
.. seealso:: :py:func:`registerLocatorFilter`
|
|
%End
|
|
|
|
virtual void invalidateLocatorResults() = 0;
|
|
%Docstring
|
|
Invalidate results from the locator filter.
|
|
|
|
This might be useful if the configuration of the filter changed without
|
|
going through main application settings.
|
|
|
|
.. versionadded:: 3.2
|
|
%End
|
|
|
|
virtual bool askForDatumTransform( QgsCoordinateReferenceSystem sourceCrs, QgsCoordinateReferenceSystem destinationCrs ) = 0;
|
|
%Docstring
|
|
Checks available datum transforms and ask user if several are available
|
|
and none is chosen. Dialog is shown only if global option is set
|
|
accordingly.
|
|
|
|
:return: ``True`` if a datum transform has been specifically chosen by
|
|
user or only one is available.
|
|
%End
|
|
|
|
virtual QgsBrowserGuiModel *browserModel() = 0;
|
|
%Docstring
|
|
Returns the application browser model. Using this shared model is more
|
|
efficient than creating a new browser model for every use.
|
|
|
|
.. versionadded:: 3.4
|
|
%End
|
|
|
|
virtual void setGpsPanelConnection( QgsGpsConnection *connection /Transfer/ ) = 0 /Deprecated="Since 3.44. Use the method from gpsTools() instead."/;
|
|
%Docstring
|
|
Sets a GPS ``connection`` to use within the GPS Panel widget.
|
|
|
|
Any existing GPS connection used by the widget will be disconnect and
|
|
replaced with this connection. The connection is automatically
|
|
registered within the :py:func:`QgsApplication.gpsConnectionRegistry()`.
|
|
|
|
.. deprecated:: 3.44
|
|
|
|
Use the method from :py:func:`~QgisInterface.gpsTools` instead.
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
virtual void blockActiveLayerChanges( bool blocked ) = 0;
|
|
%Docstring
|
|
Sets whether changes to the active layer should be temporarily blocked.
|
|
|
|
This is a low-level method, designed to avoid unnecessary work when
|
|
adding lots of layers at once. Clients which will be adding many layers
|
|
may call blockActiveLayerChanges( ``True`` ) upfront, add all the
|
|
layers, and then follow up with a call to blockActiveLayerChanges(
|
|
``False`` ). This will defer emitting the active layer changed signal
|
|
until they've added all layers, and only emit the signal once for the
|
|
final layer added.
|
|
|
|
.. warning::
|
|
|
|
This must be accompanied by a subsequent call with ``blocked`` as ``False``.
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
signals:
|
|
|
|
void currentLayerChanged( QgsMapLayer *layer );
|
|
%Docstring
|
|
Emitted whenever current (selected) layer changes. The pointer to layer
|
|
can be ``None`` if no layer is selected.
|
|
%End
|
|
|
|
void currentThemeChanged( const QString &theme );
|
|
%Docstring
|
|
Emitted when the current ``theme`` is changed so plugins can change
|
|
their tool button icons.
|
|
%End
|
|
|
|
void layoutDesignerOpened( QgsLayoutDesignerInterface *designer );
|
|
%Docstring
|
|
Emitted when a new layout ``designer`` has been opened.
|
|
|
|
.. seealso:: :py:func:`layoutDesignerWillBeClosed`
|
|
%End
|
|
|
|
void layoutDesignerWillBeClosed( QgsLayoutDesignerInterface *designer );
|
|
%Docstring
|
|
Emitted before a layout ``designer`` is going to be closed and deleted.
|
|
|
|
.. seealso:: :py:func:`layoutDesignerClosed`
|
|
|
|
.. seealso:: :py:func:`layoutDesignerOpened`
|
|
%End
|
|
|
|
void layoutDesignerClosed();
|
|
%Docstring
|
|
Emitted after a layout designer window is closed.
|
|
|
|
.. seealso:: :py:func:`layoutDesignerWillBeClosed`
|
|
|
|
.. seealso:: :py:func:`layoutDesignerOpened`
|
|
%End
|
|
|
|
void initializationCompleted();
|
|
%Docstring
|
|
Emitted when the initialization is complete.
|
|
%End
|
|
|
|
void projectRead();
|
|
%Docstring
|
|
Emitted when a project file is successfully read.
|
|
|
|
.. note::
|
|
|
|
This is useful for plugins that store properties with project files.
|
|
A plugin can connect to this signal. When it is emitted the plugin
|
|
knows to then check the project properties for any relevant state.
|
|
%End
|
|
|
|
void newProjectCreated();
|
|
%Docstring
|
|
Emitted when starting an entirely new project.
|
|
|
|
.. note::
|
|
|
|
This is similar to :py:func:`~QgisInterface.projectRead`; plugins might want to be notified
|
|
that they're in a new project. Yes, :py:func:`~QgisInterface.projectRead` could have been
|
|
overloaded to be used in the case of new projects instead. However,
|
|
it's probably more semantically correct to have an entirely separate
|
|
signal for when this happens.
|
|
%End
|
|
|
|
void layerSavedAs( QgsMapLayer *l, const QString &path );
|
|
%Docstring
|
|
Emitted when a layer has been saved using save as.
|
|
%End
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgisinterface.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|