Class: QgisInterface¶
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.
Note
This is an abstract class, with methods which must be implemented by a subclass.
The following methods must be implemented: actionAbout()
, actionAddAfsLayer()
, actionAddAllToOverview()
, actionAddAmsLayer()
, actionAddFeature()
, actionAddOgrLayer()
, actionAddPart()
, actionAddPgLayer()
, actionAddPointCloudLayer()
, actionAddRasterLayer()
, actionAddRing()
, actionAddToOverview()
, actionAddVectorTileLayer()
, actionAddWmsLayer()
, actionAddXyzLayer()
, actionAllEdits()
, actionCancelAllEdits()
, actionCancelEdits()
, actionCheckQgisVersion()
, actionCopyFeatures()
, actionCopyLayerStyle()
, actionCreatePrintLayout()
, actionCustomProjection()
, actionCutFeatures()
, actionDeletePart()
, actionDeleteRing()
, actionDeleteSelected()
, actionDraw()
, actionDuplicateLayer()
, actionExit()
, actionFeatureAction()
, actionHelpContents()
, actionHideAllLayers()
, actionHideDeselectedLayers()
, actionHideSelectedLayers()
, actionIdentify()
, actionLayerProperties()
, actionLayerSaveAs()
, actionManagePlugins()
, actionMapTips()
, actionMeasure()
, actionMeasureArea()
, actionMoveFeature()
, actionNewBookmark()
, actionNewProject()
, actionNewVectorLayer()
, actionOpenFieldCalculator()
, actionOpenProject()
, actionOpenStatisticalSummary()
, actionOpenTable()
, actionOptions()
, actionPan()
, actionPanToSelected()
, actionPasteFeatures()
, actionPasteLayerStyle()
, actionPluginListSeparator()
, actionProjectProperties()
, actionQgisHomePage()
, actionRemoveAllFromOverview()
, actionRollbackAllEdits()
, actionRollbackEdits()
, actionSaveActiveLayerEdits()
, actionSaveAllEdits()
, actionSaveEdits()
, actionSaveMapAsImage()
, actionSaveProject()
, actionSaveProjectAs()
, actionSelect()
, actionSelectFreehand()
, actionSelectPolygon()
, actionSelectRadius()
, actionSelectRectangle()
, actionShowAllLayers()
, actionShowBookmarks()
, actionShowLayoutManager()
, actionShowPythonDialog()
, actionShowSelectedLayers()
, actionSimplifyFeature()
, actionSplitFeatures()
, actionSplitParts()
, actionToggleEditing()
, actionToggleFullScreen()
, actionToggleSelectedLayers()
, actionToggleSelectedLayersIndependently()
, actionVertexTool()
, actionVertexToolActiveLayer()
, actionZoomActualSize()
, actionZoomFullExtent()
, actionZoomIn()
, actionZoomLast()
, actionZoomNext()
, actionZoomOut()
, actionZoomToLayer()
, actionZoomToLayers()
, actionZoomToSelected()
, activeDecorations()
, activeLayer()
, addCustomActionForLayer()
, addCustomActionForLayerType()
, addDatabaseToolBarIcon()
, addDatabaseToolBarWidget()
, addDockWidget()
, addLayerMenu()
, addMeshLayer()
, addPluginToDatabaseMenu()
, addPluginToMenu()
, addPluginToMeshMenu()
, addPluginToRasterMenu()
, addPluginToVectorMenu()
, addPluginToWebMenu()
, addPointCloudLayer()
, addProject()
, addProjectExportAction()
, addProjectImportAction()
, addRasterLayer()
, addRasterToolBarIcon()
, addRasterToolBarWidget()
, addTabifiedDockWidget()
, addTiledSceneLayer()
, addToolBar()
, addToolBarIcon()
, addToolBarWidget()
, addUserInputWidget()
, addVectorLayer()
, addVectorTileLayer()
, addVectorToolBarIcon()
, addVectorToolBarWidget()
, addWebToolBarIcon()
, addWebToolBarWidget()
, addWindow()
, advancedDigitizeToolBar()
, askForDatumTransform()
, attributesToolBar()
, blockActiveLayerChanges()
, browserModel()
, buildStyleSheet()
, cadDockWidget()
, closeMapCanvas()
, closeMapCanvas3D()
, copySelectionToClipboard()
, createNewMapCanvas()
, createNewMapCanvas3D()
, createProjectModelSubMenu()
, dataSourceManagerToolBar()
, databaseMenu()
, databaseToolBar()
, defaultStyleSheetFont()
, defaultStyleSheetOptions()
, deregisterLocatorFilter()
, digitizeToolBar()
, editMenu()
, editableLayers()
, fileToolBar()
, firstRightStandardMenu()
, getFeatureForm()
, gpsTools()
, helpMenu()
, helpToolBar()
, iconSize()
, insertAddLayerAction()
, invalidateLocatorResults()
, layerMenu()
, layerToolBar()
, layerTreeCanvasBridge()
, layerTreeInsertionPoint()
, layerTreeView()
, locatorSearch()
, mainWindow()
, mapCanvas()
, mapCanvases()
, mapCanvases3D()
, mapNavToolToolBar()
, mapToolActionGroup()
, meshMenu()
, messageBar()
, messageTimeout()
, newLayerMenu()
, newProject()
, openDataSourceManagerPage()
, openFeatureForm()
, openLayoutDesigner()
, openLayoutDesigners()
, openMessageLog()
, openURL()
, pasteFromClipboard()
, pluginHelpMenu()
, pluginManagerInterface()
, pluginMenu()
, pluginToolBar()
, preloadForm()
, projectImportExportMenu()
, projectMenu()
, projectModelsMenu()
, rasterMenu()
, rasterToolBar()
, registerApplicationExitBlocker()
, registerCustomDropHandler()
, registerCustomLayoutDropHandler()
, registerCustomProjectOpenHandler()
, registerDevToolWidgetFactory()
, registerLocatorFilter()
, registerMainWindowAction()
, registerMapLayerConfigWidgetFactory()
, registerMapToolHandler()
, registerOptionsWidgetFactory()
, registerProjectPropertiesWidgetFactory()
, reloadConnections()
, removeAddLayerAction()
, removeCustomActionForLayerType()
, removeDatabaseToolBarIcon()
, removeDockWidget()
, removePluginDatabaseMenu()
, removePluginMenu()
, removePluginMeshMenu()
, removePluginRasterMenu()
, removePluginVectorMenu()
, removePluginWebMenu()
, removeProjectExportAction()
, removeProjectImportAction()
, removeRasterToolBarIcon()
, removeToolBarIcon()
, removeVectorToolBarIcon()
, removeWebToolBarIcon()
, removeWindow()
, saveStyleSheetOptions()
, selectionToolBar()
, setActiveLayer()
, setGpsPanelConnection()
, settingsMenu()
, shapeDigitizeToolBar()
, showApiDocumentation()
, showAttributeTable()
, showLayerProperties()
, showLayoutManager()
, showOptionsDialog()
, showProjectPropertiesDialog()
, statusBarIface()
, unregisterApplicationExitBlocker()
, unregisterCustomDropHandler()
, unregisterCustomLayoutDropHandler()
, unregisterCustomProjectOpenHandler()
, unregisterDevToolWidgetFactory()
, unregisterMainWindowAction()
, unregisterMapLayerConfigWidgetFactory()
, unregisterMapToolHandler()
, unregisterOptionsWidgetFactory()
, unregisterProjectPropertiesWidgetFactory()
, userProfileManager()
, vectorLayerTools()
, vectorMenu()
, vectorToolBar()
, viewMenu()
, webMenu()
, webToolBar()
, windowMenu()
, zoomFull()
, zoomToActiveLayer()
, zoomToNext()
, zoomToPrevious()
Class Hierarchy¶
Base classes¶
Abstract Methods
Returns the native Add ArcGIS REST Server action. |
|
Returns the native Add ArcGIS REST Server action. |
|
Returns the native Add Feature action. |
|
Returns the native Add Part action. |
|
Returns the native Add Point Cloud Layer action. |
|
Returns the native Add Ring action. |
|
Returns the native Add Vector Tile Layer action. |
|
Returns the native Add XYZ Layer action. |
|
Returns the native Copy Features action. |
|
Create new print layout action |
|
Returns the native Cut Features action. |
|
Returns the native Delete Part action. |
|
Returns the native Delete Ring action. |
|
Returns the native Delete Selected Features action. |
|
Returns the native draw action. |
|
Returns the Exit QGIS action. |
|
Returns the native run action feature action. |
|
Returns the Hide Deselected Layers action. |
|
Returns the native identify action. |
|
Returns the native map tips action. |
|
Returns the native measure action. |
|
Returns the native measure area action. |
|
Returns the native Move Features action. |
|
Returns the native new bookmark action. |
|
Returns the native New Project action. |
|
Returns the Open Project action. |
|
Statistical summary action. |
|
Returns the native pan action. |
|
Returns the native pan to selected action. |
|
Returns the native Paste Features action. |
|
Returns the native Project Properties action. |
|
Returns the native Save Map as Image action. |
|
Returns the native Save Project action. |
|
Returns the native Save Project As action. |
|
Returns the native select action. |
|
Returns the native select freehand action. |
|
Returns the native select polygon action. |
|
Returns the native select radius action. |
|
Returns the native select rectangle action. |
|
Returns the native show bookmarks action. |
|
Show layout manager action |
|
Returns the native Simplify/Smooth Features action. |
|
Returns the native Split Features action. |
|
Returns the native Split Parts action. |
|
Returns the Toggle Selected Layers action. |
|
Returns the Toggle Selected Layers Independently action. |
|
Returns the native "Vertex Tool for All Layers" action. |
|
Returns the native "Vertex Tool for Active Layer" action. |
|
Returns the native zoom resolution (100%) action. |
|
Returns the native zoom full extent action. |
|
Returns the native zoom in action. |
|
Returns the native zoom last action. |
|
Returns the native zoom next action. |
|
Returns the native zoom out action. |
|
Returns the native zoom to layer action. |
|
Returns the native zoom to layers action. |
|
Returns the native zoom to selected action. |
|
Returns a list of the active decorations. |
|
Returns a pointer to the active layer (layer selected in the legend) |
|
Add action to context menu for a specific layer in the layer tree. |
|
Add action to context menu for layers in the layer tree. |
|
Add an icon to the Database toolbar |
|
Add a widget to the database toolbar. |
|
Adds a dock widget to the main window, in the specified dock area. |
|
Returns a reference to the main window "Add Layer" menu. |
|
Adds a mesh layer to the current project, using the specified data provider and source url. |
|
Add action to the Database menu |
|
Add action to the plugins menu |
|
Add action to the Mesh menu |
|
Add action to the Raster menu |
|
Add action to the Vector menu |
|
Add action to the Web menu |
|
Adds a point cloud layer to the current project, using the specified data provider and source url. |
|
Adds (opens) a project |
|
Adds an action to the QGIS "Export project" menu. |
|
Adds an action to the QGIS "Import project" menu. |
|
Adds a raster layer to the current project, given a raster layer file name. |
|
Add an icon to the Raster toolbar |
|
Add a widget to the raster toolbar. |
|
Add a dock widget to the given area and tabify it (if other dock widgets exist in the same area). |
|
Adds a tiled scene layer to the current project, using the specified data provider and source url. |
|
Add toolbar with specified name |
|
Add an icon to the plugins toolbar |
|
Add a widget to the plugins toolbar. |
|
Adds a widget to the user input tool bar. |
|
Adds a vector layer to the current project, using the specified data provider and source url. |
|
Adds a vector tile layer to the current project, using the specified source url. |
|
Add an icon to the Vector toolbar |
|
Add a widget to the vector toolbar. |
|
Add an icon to the Web toolbar |
|
Add a widget to the web toolbar. |
|
Add window to Window menu. |
|
Returns a reference to the main window "Advanced Digitizing" toolbar. |
|
Checks available datum transforms and ask user if several are available and none is chosen. |
|
Returns a reference to the main window "Attributes" toolbar. |
|
Sets whether changes to the active layer should be temporarily blocked. |
|
Returns the application browser model. |
|
Generate stylesheet |
|
Advanced digitizing dock widget |
|
Closes the additional map canvas with matching name. |
|
Closes the additional map canvas with matching name. |
|
Copy selected features from the layer to clipboard |
|
Create a new map canvas with the specified unique name. |
|
Create a new 3D map canvas with the specified unique name. |
|
Creates a new project model submenu in the "Projects" - "Models" submenu. |
|
Returns a reference to the main window "Data Source Manager" toolbar. |
|
Returns a reference to the main window "Database" menu. |
|
Returns a reference to the main window "Database" toolbar. |
|
Returns a reference font for initial qApp (may not be same as |
|
Returns changeable options built from settings and/or defaults |
|
Deregisters a locator filter from the app's locator bar and deletes it. |
|
Returns a reference to the main window "Digitize" toolbar. |
|
Returns a reference to the main window "Edit" menu. |
|
Returns vector layers in edit mode |
|
Returns a reference to the main window "File" toolbar. |
|
Returns a reference to the right most standard menu, which is usually the last menu item before the "Help" menu. |
|
Returns a feature form for a given feature. |
|
Returns an interface to allow plugins to use QGIS GPS tools. |
|
Returns a reference to the main window "Help" menu. |
|
Returns a reference to the main window "Help" toolbar. |
|
Returns the toolbar icon size. |
|
Add "add layer" action to layer menu |
|
Invalidate results from the locator filter. |
|
Returns a reference to the main window "Layer" menu. |
|
Returns a reference to the main window "Layer" toolbar. |
|
Returns a pointer to the layer tree canvas bridge |
|
Returns the insertion point. |
|
This will perform a search in the locator bar by setting the line edit text to searchText and automatically displaying any results. |
|
Returns a pointer to the main window (instance of |
|
Returns a pointer to the map canvas |
|
Returns a list of all map canvases open in the app. |
|
Returns a list of all 3D map canvases open in the app. |
|
Returns a reference to the main window "Map Navigation" toolbar. |
|
Returns the action group for map tools. |
|
Returns a reference to the main window "Mesh" menu. |
|
Returns the message bar of the main app |
|
Returns the timeout for timed messages: default of 5 seconds |
|
Returns a reference to the main window "Create New Layer" menu. |
|
Starts a new blank project. |
|
Opens a page in the main window "Data Source Manager" dialog. |
|
Opens a new feature form. |
|
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. |
|
Returns all currently open layout designers. |
|
Opens the message log dock widget, and optionally activates a specific tab by name. |
|
Open a url in the users browser. |
|
Paste features from clipboard to the layer |
|
Returns a reference to the main window "Plugin Help" sub-menu. |
|
Returns a reference to the main window "Plugin" menu. |
|
Returns a reference to the main window "Plugin" toolbar. |
|
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. |
|
Returns a reference to the main window "Import/Export" project menu. |
|
Returns a reference to the main window "Project" menu. |
|
Returns a reference to the main window "Projects" - "Models" submenu. |
|
Returns a reference to the main window "Raster" menu. |
|
Returns a reference to the main window "Raster" toolbar. |
|
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. |
|
Register a new custom drop handler. |
|
Register a new custom drop handler for layout windows. |
|
Register a new custom project open handler. |
|
Register a new tool in the development/debugging tools dock. |
|
Registers a locator filter for the app's locator bar. |
|
Register action to the shortcuts manager so its shortcut can be changed in GUI |
|
Register a new tab in the map layer properties dialog. |
|
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. |
|
Register a new tab in the options dialog. |
|
Register a new tab in the project properties dialog. |
|
Triggered when connections have changed. |
|
Remove "add layer" action from layer menu |
|
Remove action for layers in the layer tree previously added with |
|
Remove an action (icon) from the Database toolbar |
|
Removes the specified dock widget from main window (without deleting it). |
|
Remove action from the Database menu |
|
Remove action from the plugins menu |
|
Remove action from the Mesh menu |
|
Remove action from the Raster menu |
|
Remove action from the Vector menu |
|
Remove action from the Web menu |
|
Adds an action to the QGIS "Export project" menu. |
|
Adds an action to the QGIS "Import project" menu. |
|
Remove an action (icon) from the Raster toolbar |
|
Remove an action (icon) from the plugin toolbar |
|
Remove an action (icon) from the Vector toolbar |
|
Remove an action (icon) from the Web toolbar |
|
Remove window from Window menu. |
|
Save changed default option keys/values to user settings |
|
Returns a reference to the main window "Selection" toolbar. |
|
Set the active layer (layer gets selected in the legend) returns |
|
Sets a GPS connection to use within the GPS Panel widget. |
|
Returns a reference to the main window "Settings" menu. |
|
Returns a reference to the main window "Shape Digitizing" toolbar. |
|
Show a page of the API documentation |
|
Open attribute table dialog |
|
Opens layer properties dialog for the layer l. |
|
Opens the layout manager dialog. |
|
Opens the options dialog. |
|
Opens the project properties dialog. |
|
Returns a pointer to the app's status bar interface. |
|
Unregister a previously registered application exit blocker. |
|
Unregister a previously registered custom drop handler. |
|
Unregister a previously registered custom drop handler for layout windows. |
|
Unregister a previously registered custom project open handler. |
|
Unregister a previously registered tool factory from the development/debugging tools dock. |
|
Unregister a previously registered action. |
|
Unregister a previously registered tab in the map layer properties dialog. |
|
Unregister a previously registered map tool handler. |
|
Unregister a previously registered tab in the options dialog. |
|
Unregister a previously registered tab in the options dialog. |
|
Returns a reference to the user profile manager |
|
Access the vector layer tools instance. |
|
Returns a reference to the main window "Vector" menu. |
|
Returns a reference to the main window "Vector" toolbar. |
|
Returns a reference to the main window "View" menu. |
|
Returns a reference to the main window "Web" menu. |
|
Returns a reference to the main window "Web" toolbar. |
|
Returns a reference to the main window "Window" menu. |
|
Zooms to the full extent of all map layers. |
|
Zooms to extent of the active layer. |
|
Zooms to the next view extent. |
|
Zooms to the previous view extent. |
Virtual Methods
In PyQGIS, only methods marked as virtual
can be safely overridden in a Python subclass of QgisInterface. See the FAQ for more details.
Returns the native add circle from 2 points action. |
|
Returns the native add circle from 2 tangents and a point action. |
|
Returns the native add circle from 3 points action. |
|
Returns the native add circle from 3 tangents action. |
|
Returns the native add circle from center action. |
|
Returns the native add ellipse from center and 2 points action. |
|
Returns the native add ellipse from center and a point action. |
|
Returns the native add ellipse from an extent action. |
|
Returns the native add ellipse from foci action. |
|
Returns the native add rectangle from 3 points (distance from 2nd and 3rd points) action. |
|
Returns the native add rectangle from 3 points (distance from projected 3rd point on segment p1 and p2) action. |
|
Returns the native add rectangle from center and a point action. |
|
Returns the native add rectangle from extent action. |
|
Returns the native add regular polygon from 2 points action. |
|
Returns the native add regular polygon from center and a corner action. |
|
Returns the native add regular polygon from center and a point action. |
|
Take screenshots for user documentation |
Signals
Emitted whenever current (selected) layer changes. |
|
Emitted when the current theme is changed so plugins can change their tool button icons. |
|
Emitted when the initialization is complete. |
|
Emitted when a layer has been saved using save as. |
|
Emitted after a layout designer window is closed. |
|
Emitted when a new layout designer has been opened. |
|
Emitted before a layout designer is going to be closed and deleted. |
|
Emitted when starting an entirely new project. |
|
Emitted when a project file is successfully read. |
- class qgis.gui.QgisInterface[source]¶
Bases:
QObject
- abstract actionAddAfsLayer(self) QAction | None [source]¶
Returns the native Add ArcGIS REST Server action.
- Return type:
Optional[QAction]
- abstract actionAddAmsLayer(self) QAction | None [source]¶
Returns the native Add ArcGIS REST Server action.
- Return type:
Optional[QAction]
- abstract actionAddFeature(self) QAction | None [source]¶
Returns the native Add Feature action.
- Return type:
Optional[QAction]
- abstract actionAddPart(self) QAction | None [source]¶
Returns the native Add Part action.
- Return type:
Optional[QAction]
- abstract actionAddPointCloudLayer(self) QAction | None [source]¶
Returns the native Add Point Cloud Layer action.
Added in version 3.18.
- Return type:
Optional[QAction]
- abstract actionAddRing(self) QAction | None [source]¶
Returns the native Add Ring action.
- Return type:
Optional[QAction]
- abstract actionAddVectorTileLayer(self) QAction | None [source]¶
Returns the native Add Vector Tile Layer action.
Added in version 3.14.
- Return type:
Optional[QAction]
- abstract actionAddXyzLayer(self) QAction | None [source]¶
Returns the native Add XYZ Layer action.
Added in version 3.14.
- Return type:
Optional[QAction]
- virtual actionCircle2Points(self) QAction | None [source]¶
Returns the native add circle from 2 points action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionCircle2TangentsPoint(self) QAction | None [source]¶
Returns the native add circle from 2 tangents and a point action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionCircle3Points(self) QAction | None [source]¶
Returns the native add circle from 3 points action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionCircle3Tangents(self) QAction | None [source]¶
Returns the native add circle from 3 tangents action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionCircleCenterPoint(self) QAction | None [source]¶
Returns the native add circle from center action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- abstract actionCopyFeatures(self) QAction | None [source]¶
Returns the native Copy Features action.
- Return type:
Optional[QAction]
- abstract actionCreatePrintLayout(self) QAction | None [source]¶
Create new print layout action
- Return type:
Optional[QAction]
- abstract actionCutFeatures(self) QAction | None [source]¶
Returns the native Cut Features action.
- Return type:
Optional[QAction]
- abstract actionDeletePart(self) QAction | None [source]¶
Returns the native Delete Part action.
- Return type:
Optional[QAction]
- abstract actionDeleteRing(self) QAction | None [source]¶
Returns the native Delete Ring action.
- Return type:
Optional[QAction]
- abstract actionDeleteSelected(self) QAction | None [source]¶
Returns the native Delete Selected Features action.
- Return type:
Optional[QAction]
- abstract actionDraw(self) QAction | None [source]¶
Returns the native draw action.
- Return type:
Optional[QAction]
- virtual actionEllipseCenter2Points(self) QAction | None [source]¶
Returns the native add ellipse from center and 2 points action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionEllipseCenterPoint(self) QAction | None [source]¶
Returns the native add ellipse from center and a point action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionEllipseExtent(self) QAction | None [source]¶
Returns the native add ellipse from an extent action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionEllipseFoci(self) QAction | None [source]¶
Returns the native add ellipse from foci action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- abstract actionExit(self) QAction | None [source]¶
Returns the Exit QGIS action.
- Return type:
Optional[QAction]
- abstract actionFeatureAction(self) QAction | None [source]¶
Returns the native run action feature action. Call
trigger()
on it to set the default run feature action map tool.- Return type:
Optional[QAction]
- abstract actionHideDeselectedLayers(self) QAction | None [source]¶
Returns the Hide Deselected Layers action.
- Return type:
Optional[QAction]
- abstract actionIdentify(self) QAction | None [source]¶
Returns the native identify action. Call
trigger()
on it to set the default identify map tool.- Return type:
Optional[QAction]
- abstract actionMapTips(self) QAction | None [source]¶
Returns the native map tips action. Call
trigger()
on it to toggle map tips.- Return type:
Optional[QAction]
- abstract actionMeasure(self) QAction | None [source]¶
Returns the native measure action. Call
trigger()
on it to set the default measure map tool.- Return type:
Optional[QAction]
- abstract actionMeasureArea(self) QAction | None [source]¶
Returns the native measure area action. Call
trigger()
on it to set the default measure area map tool.- Return type:
Optional[QAction]
- abstract actionMoveFeature(self) QAction | None [source]¶
Returns the native Move Features action.
- Return type:
Optional[QAction]
- abstract actionNewBookmark(self) QAction | None [source]¶
Returns the native new bookmark action. Call
trigger()
on it to open the new bookmark dialog.- Return type:
Optional[QAction]
- abstract actionNewProject(self) QAction | None [source]¶
Returns the native New Project action.
- Return type:
Optional[QAction]
- abstract actionOpenProject(self) QAction | None [source]¶
Returns the Open Project action.
- Return type:
Optional[QAction]
- abstract actionOpenStatisticalSummary(self) QAction | None [source]¶
Statistical summary action.
- Return type:
Optional[QAction]
- abstract actionPan(self) QAction | None [source]¶
Returns the native pan action. Call
trigger()
on it to set the default pan map tool.- Return type:
Optional[QAction]
- abstract actionPanToSelected(self) QAction | None [source]¶
Returns the native pan to selected action. Call
trigger()
on it to pan the map canvas to the selection.- Return type:
Optional[QAction]
- abstract actionPasteFeatures(self) QAction | None [source]¶
Returns the native Paste Features action.
- Return type:
Optional[QAction]
- abstract actionProjectProperties(self) QAction | None [source]¶
Returns the native Project Properties action.
- Return type:
Optional[QAction]
- virtual actionRectangle3PointsDistance(self) QAction | None [source]¶
Returns the native add rectangle from 3 points (distance from 2nd and 3rd points) action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionRectangle3PointsProjected(self) QAction | None [source]¶
Returns the native add rectangle from 3 points (distance from projected 3rd point on segment p1 and p2) action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionRectangleCenterPoint(self) QAction | None [source]¶
Returns the native add rectangle from center and a point action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionRectangleExtent(self) QAction | None [source]¶
Returns the native add rectangle from extent action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionRegularPolygon2Points(self) QAction | None [source]¶
Returns the native add regular polygon from 2 points action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionRegularPolygonCenterCorner(self) QAction | None [source]¶
Returns the native add regular polygon from center and a corner action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- virtual actionRegularPolygonCenterPoint(self) QAction | None [source]¶
Returns the native add regular polygon from center and a point action. Call
trigger()
on it to set the map tool.Deprecated since version 3.26: Shape digitizing is now part of the add feature tool. To enable the shape tool, use
QgsMapToolCapture.setCurrentCaptureTechnique()
and thenQgsMapToolCapture.setCurrentShapeMapTool()
.- Return type:
Optional[QAction]
- abstract actionSaveMapAsImage(self) QAction | None [source]¶
Returns the native Save Map as Image action.
- Return type:
Optional[QAction]
- abstract actionSaveProject(self) QAction | None [source]¶
Returns the native Save Project action.
- Return type:
Optional[QAction]
- abstract actionSaveProjectAs(self) QAction | None [source]¶
Returns the native Save Project As action.
- Return type:
Optional[QAction]
- abstract actionSelect(self) QAction | None [source]¶
Returns the native select action. Call
trigger()
on it to set the default select map tool.- Return type:
Optional[QAction]
- abstract actionSelectFreehand(self) QAction | None [source]¶
Returns the native select freehand action. Call
trigger()
on it to set the default select freehand map tool.- Return type:
Optional[QAction]
- abstract actionSelectPolygon(self) QAction | None [source]¶
Returns the native select polygon action. Call
trigger()
on it to set the default select polygon map tool.- Return type:
Optional[QAction]
- abstract actionSelectRadius(self) QAction | None [source]¶
Returns the native select radius action. Call
trigger()
on it to set the default select radius map tool.- Return type:
Optional[QAction]
- abstract actionSelectRectangle(self) QAction | None [source]¶
Returns the native select rectangle action. Call
trigger()
on it to set the default select rectangle map tool.- Return type:
Optional[QAction]
- abstract actionShowBookmarks(self) QAction | None [source]¶
Returns the native show bookmarks action. Call
trigger()
on it to open the bookmarks dialog.- Return type:
Optional[QAction]
- abstract actionShowLayoutManager(self) QAction | None [source]¶
Show layout manager action
- Return type:
Optional[QAction]
- abstract actionSimplifyFeature(self) QAction | None [source]¶
Returns the native Simplify/Smooth Features action.
- Return type:
Optional[QAction]
- abstract actionSplitFeatures(self) QAction | None [source]¶
Returns the native Split Features action.
- Return type:
Optional[QAction]
- abstract actionSplitParts(self) QAction | None [source]¶
Returns the native Split Parts action.
- Return type:
Optional[QAction]
- abstract actionToggleSelectedLayers(self) QAction | None [source]¶
Returns the Toggle Selected Layers action.
Added in version 3.14.
- Return type:
Optional[QAction]
- abstract actionToggleSelectedLayersIndependently(self) QAction | None [source]¶
Returns the Toggle Selected Layers Independently action.
Added in version 3.14.
- Return type:
Optional[QAction]
- abstract actionVertexTool(self) QAction | None [source]¶
Returns the native “Vertex Tool for All Layers” action.
See also
- Return type:
Optional[QAction]
- abstract actionVertexToolActiveLayer(self) QAction | None [source]¶
Returns the native “Vertex Tool for Active Layer” action.
See also
Added in version 3.6.
- Return type:
Optional[QAction]
- abstract actionZoomActualSize(self) QAction | None [source]¶
Returns the native zoom resolution (100%) action. Call
trigger()
on it to zoom to actual size.- Return type:
Optional[QAction]
- abstract actionZoomFullExtent(self) QAction | None [source]¶
Returns the native zoom full extent action. Call
trigger()
on it to zoom to the full extent.- Return type:
Optional[QAction]
- abstract actionZoomIn(self) QAction | None [source]¶
Returns the native zoom in action. Call
trigger()
on it to set the default zoom in map tool.- Return type:
Optional[QAction]
- abstract actionZoomLast(self) QAction | None [source]¶
Returns the native zoom last action. Call
trigger()
on it to zoom to last.- Return type:
Optional[QAction]
- abstract actionZoomNext(self) QAction | None [source]¶
Returns the native zoom next action. Call
trigger()
on it to zoom to next.- Return type:
Optional[QAction]
- abstract actionZoomOut(self) QAction | None [source]¶
Returns the native zoom out action. Call
trigger()
on it to set the default zoom out map tool.- Return type:
Optional[QAction]
- abstract actionZoomToLayer(self) QAction | None [source]¶
Returns the native zoom to layer action. Call
trigger()
on it to zoom to the active layer.Deprecated since version 3.40: Use
actionZoomToLayers()
instead.- Return type:
Optional[QAction]
- abstract actionZoomToLayers(self) QAction | None [source]¶
Returns the native zoom to layers action. Call
trigger()
on it to zoom to the selected layers.Added in version 3.18.
- Return type:
Optional[QAction]
- abstract actionZoomToSelected(self) QAction | None [source]¶
Returns the native zoom to selected action. Call
trigger()
on it to zoom to the current selection.- Return type:
Optional[QAction]
- abstract activeDecorations(self) List[QgsMapDecoration] ¶
Returns a list of the active decorations.
Added in version 3.22.
- Return type:
List[QgsMapDecoration]
- abstract activeLayer(self) QgsMapLayer | None [source]¶
Returns a pointer to the active layer (layer selected in the legend)
- Return type:
Optional[QgsMapLayer]
- abstract addCustomActionForLayer(self, action: QAction | None, layer: QgsMapLayer | None)[source]¶
Add action to context menu for a specific layer in the layer tree. It is necessary to first call
addCustomActionForLayerType()
with allLayers=false in order for this method to have any effect.See also
- Parameters:
action (Optional[QAction])
layer (Optional[QgsMapLayer])
- abstract addCustomActionForLayerType(self, action: QAction | None, menu: str | None, type: Qgis.LayerType, allLayers: bool)[source]¶
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 withaddCustomActionForLayer()
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.
See also
See also
- Parameters:
action (Optional[QAction])
menu (Optional[str])
type (Qgis.LayerType)
allLayers (bool)
- abstract addDatabaseToolBarIcon(self, qAction: QAction | None) int [source]¶
Add an icon to the Database toolbar
- Parameters:
qAction (Optional[QAction])
- Return type:
int
- abstract addDatabaseToolBarWidget(self, widget: QWidget | None) QAction | None [source]¶
Add a widget to the database toolbar. To remove this widget again, call
removeDatabaseToolBarIcon()
with the returned QAction.- Parameters:
widget (Optional[QWidget]) – widget to add. The toolbar will take ownership of this widget
- Return type:
Optional[QAction]
- Returns:
the QAction you can use to remove this widget from the toolbar
- abstract addDockWidget(self, area: Qt.DockWidgetArea, dockwidget: QDockWidget | None)[source]¶
Adds a
dock
widget to the main window, in the specified dockarea
.See also
See also
- Parameters:
area (Qt.DockWidgetArea)
dockwidget (Optional[QDockWidget])
- abstract addLayerMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Add Layer” menu.
- Return type:
Optional[QMenu]
- abstract addMeshLayer(self, url: str | None, baseName: str | None, providerKey: str | None) QgsMeshLayer | None [source]¶
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).- Parameters:
url (Optional[str])
baseName (Optional[str])
providerKey (Optional[str])
- Return type:
Optional[QgsMeshLayer]
- abstract addPluginToDatabaseMenu(self, name: str | None, action: QAction | None)[source]¶
Add action to the Database menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract addPluginToMenu(self, name: str | None, action: QAction | None)[source]¶
Add action to the plugins menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract addPluginToMeshMenu(self, name: str | None, action: QAction | None)[source]¶
Add action to the Mesh menu
Added in version 3.24.
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract addPluginToRasterMenu(self, name: str | None, action: QAction | None)[source]¶
Add action to the Raster menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract addPluginToVectorMenu(self, name: str | None, action: QAction | None)[source]¶
Add action to the Vector menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract addPluginToWebMenu(self, name: str | None, action: QAction | None)[source]¶
Add action to the Web menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract addPointCloudLayer(self, url: str | None, baseName: str | None, providerKey: str | None) QgsPointCloudLayer | None [source]¶
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).Added in version 3.18.
- Parameters:
url (Optional[str])
baseName (Optional[str])
providerKey (Optional[str])
- Return type:
Optional[QgsPointCloudLayer]
- abstract addProject(self, project: str | None) bool [source]¶
Adds (opens) a project
- Parameters:
project (Optional[str])
- Return type:
bool
- abstract addProjectExportAction(self, action: QAction | None)[source]¶
Adds an
action
to the QGIS “Export project” menu.See also
See also
Added in version 3.30.
- Parameters:
action (Optional[QAction])
- abstract addProjectImportAction(self, action: QAction | None)[source]¶
Adds an
action
to the QGIS “Import project” menu.See also
See also
Added in version 3.30.
- Parameters:
action (Optional[QAction])
- abstract addRasterLayer(self, rasterLayerPath: str | None, baseName: str | None = '') QgsRasterLayer | None [source]¶
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).- Parameters:
rasterLayerPath (Optional[str])
baseName (Optional[str] = '')
- Return type:
Optional[QgsRasterLayer]
- abstract addRasterLayer(self, url: str | None, layerName: str | None, providerKey: str | None) QgsRasterLayer | None [source]
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).- Parameters:
url (Optional[str])
layerName (Optional[str])
providerKey (Optional[str])
- Return type:
Optional[QgsRasterLayer]
- abstract addRasterToolBarIcon(self, qAction: QAction | None) int [source]¶
Add an icon to the Raster toolbar
- Parameters:
qAction (Optional[QAction])
- Return type:
int
- abstract addRasterToolBarWidget(self, widget: QWidget | None) QAction | None [source]¶
Add a widget to the raster toolbar. To remove this widget again, call
removeRasterToolBarIcon()
with the returned QAction.- Parameters:
widget (Optional[QWidget]) – widget to add. The toolbar will take ownership of this widget
- Return type:
Optional[QAction]
- Returns:
the QAction you can use to remove this widget from the toolbar
- abstract addTabifiedDockWidget(self, area: Qt.DockWidgetArea, dockwidget: QDockWidget | None, tabifyWith: Iterable[str | None] = [], raiseTab: bool = False)[source]¶
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 unlessraiseTab
is passed asTrue
.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 thatarea
(or iftabifyWith
is not given at all), the new dock widget will be created anyways, but its location within thatarea
will be unpredictable.Added in version 3.14.
- Parameters:
area (Qt.DockWidgetArea)
dockwidget (Optional[QDockWidget])
tabifyWith (Iterable[Optional[str]] = [])
raiseTab (bool = False)
- abstract addTiledSceneLayer(self, url: str | None, baseName: str | None, providerKey: str | None) QgsTiledSceneLayer | None [source]¶
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).Added in version 3.34.
- Parameters:
url (Optional[str])
baseName (Optional[str])
providerKey (Optional[str])
- Return type:
Optional[QgsTiledSceneLayer]
- abstract addToolBar(self, name: str | None) QToolBar | None [source]¶
Add toolbar with specified name
- Parameters:
name (Optional[str])
- Return type:
Optional[QToolBar]
- abstract addToolBar(self, toolbar: QToolBar | None, area: Qt.ToolBarArea = Qt.TopToolBarArea)[source]
Add a toolbar
- Parameters:
toolbar (Optional[QToolBar])
area (Qt.ToolBarArea = Qt.TopToolBarArea)
- abstract addToolBarIcon(self, qAction: QAction | None) int [source]¶
Add an icon to the plugins toolbar
- Parameters:
qAction (Optional[QAction])
- Return type:
int
- abstract addToolBarWidget(self, widget: QWidget | None) QAction | None [source]¶
Add a widget to the plugins toolbar. To remove this widget again, call
removeToolBarIcon()
with the returned QAction.- Parameters:
widget (Optional[QWidget]) – widget to add. The toolbar will take ownership of this widget
- Return type:
Optional[QAction]
- Returns:
the QAction you can use to remove this widget from the toolbar
- abstract addUserInputWidget(self, widget: QWidget | None)[source]¶
Adds a widget to the user input tool bar.
- Parameters:
widget (Optional[QWidget])
- abstract addVectorLayer(self, vectorLayerPath: str | None, baseName: str | None, providerKey: str | None) QgsVectorLayer | None [source]¶
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).- Parameters:
vectorLayerPath (Optional[str])
baseName (Optional[str])
providerKey (Optional[str])
- Return type:
Optional[QgsVectorLayer]
- abstract addVectorTileLayer(self, url: str | None, baseName: str | None) QgsVectorTileLayer | None [source]¶
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).Added in version 3.14.
- Parameters:
url (Optional[str])
baseName (Optional[str])
- Return type:
Optional[QgsVectorTileLayer]
- abstract addVectorToolBarIcon(self, qAction: QAction | None) int [source]¶
Add an icon to the Vector toolbar
- Parameters:
qAction (Optional[QAction])
- Return type:
int
- abstract addVectorToolBarWidget(self, widget: QWidget | None) QAction | None [source]¶
Add a widget to the vector toolbar. To remove this widget again, call
removeVectorToolBarIcon()
with the returned QAction.- Parameters:
widget (Optional[QWidget]) – widget to add. The toolbar will take ownership of this widget
- Return type:
Optional[QAction]
- Returns:
the QAction you can use to remove this widget from the toolbar
- abstract addWebToolBarIcon(self, qAction: QAction | None) int [source]¶
Add an icon to the Web toolbar
- Parameters:
qAction (Optional[QAction])
- Return type:
int
- abstract addWebToolBarWidget(self, widget: QWidget | None) QAction | None [source]¶
Add a widget to the web toolbar. To remove this widget again, call
removeWebToolBarIcon()
with the returned QAction.- Parameters:
widget (Optional[QWidget]) – widget to add. The toolbar will take ownership of this widget
- Return type:
Optional[QAction]
- Returns:
the QAction you can use to remove this widget from the toolbar
- abstract addWindow(self, action: QAction | None)[source]¶
Add window to Window menu. The action title is the window title and the action should raise, unminimize and activate the window.
- Parameters:
action (Optional[QAction])
- abstract advancedDigitizeToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Advanced Digitizing” toolbar.
- Return type:
Optional[QToolBar]
- abstract askForDatumTransform(self, sourceCrs: QgsCoordinateReferenceSystem, destinationCrs: QgsCoordinateReferenceSystem) bool [source]¶
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 type:
bool
- Returns:
True
if a datum transform has been specifically chosen by user or only one is available.- Parameters:
sourceCrs (QgsCoordinateReferenceSystem)
destinationCrs (QgsCoordinateReferenceSystem)
- abstract attributesToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Attributes” toolbar.
- Return type:
Optional[QToolBar]
- abstract blockActiveLayerChanges(self, blocked: bool)[source]¶
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
asFalse
.Added in version 3.36.
- Parameters:
blocked (bool)
- abstract browserModel(self) QgsBrowserGuiModel | None [source]¶
Returns the application browser model. Using this shared model is more efficient than creating a new browser model for every use.
Added in version 3.4.
- Return type:
Optional[QgsBrowserGuiModel]
- abstract buildStyleSheet(self, opts: Dict[str | None, Any])[source]¶
Generate stylesheet
- Parameters:
opts (Dict[Optional[str], Any]) – generated default option values, or a changed copy of them
- abstract cadDockWidget(self) QgsAdvancedDigitizingDockWidget | None [source]¶
Advanced digitizing dock widget
- Return type:
Optional[QgsAdvancedDigitizingDockWidget]
- abstract closeMapCanvas(self, name: str | None)[source]¶
Closes the additional map canvas with matching
name
.See also
- Parameters:
name (Optional[str])
- abstract closeMapCanvas3D(self, name: str | None)[source]¶
Closes the additional map canvas with matching
name
.See also
Added in version 3.36.
- Parameters:
name (Optional[str])
- abstract copySelectionToClipboard(self, a0: QgsMapLayer | None)[source]¶
Copy selected features from the layer to clipboard
- Parameters:
a0 (Optional[QgsMapLayer])
- abstract createNewMapCanvas(self, name: str | None) QgsMapCanvas | None [source]¶
Create a new map canvas with the specified unique
name
.See also
- Parameters:
name (Optional[str])
- Return type:
Optional[QgsMapCanvas]
- abstract createNewMapCanvas3D(self, name: str | None, sceneMode: Qgis.SceneMode = Qgis.SceneMode.Local) Qgs3DMapCanvas | None [source]¶
Create a new 3D map canvas with the specified unique
name
.Note
Scene mode (local or globe) can be selected since QGIS 3.44.
See also
Added in version 3.36.
- Parameters:
name (Optional[str])
sceneMode (Qgis.SceneMode = Qgis.SceneMode.Local)
- Return type:
Optional[Qgs3DMapCanvas]
- abstract createProjectModelSubMenu(self, title: str | None) QMenu | None [source]¶
Creates a new project model submenu in the “Projects” - “Models” submenu.
Added in version 3.42.
- Parameters:
title (Optional[str])
- Return type:
Optional[QMenu]
- signal currentLayerChanged(layer: QgsMapLayer)[source]¶
Emitted whenever current (selected) layer changes. The pointer to layer can be
None
if no layer is selected.- Parameters:
layer (QgsMapLayer)
- signal currentThemeChanged(theme: str)[source]¶
Emitted when the current
theme
is changed so plugins can change their tool button icons.- Parameters:
theme (str)
- abstract dataSourceManagerToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Data Source Manager” toolbar.
Added in version 3.4.
- Return type:
Optional[QToolBar]
- abstract databaseMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Database” menu.
- Return type:
Optional[QMenu]
- abstract databaseToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Database” toolbar.
- Return type:
Optional[QToolBar]
- abstract defaultStyleSheetFont(self) QFont [source]¶
Returns a reference font for initial qApp (may not be same as
QgisApp
)- Return type:
QFont
- abstract defaultStyleSheetOptions(self) Dict[str, Any] ¶
Returns changeable options built from settings and/or defaults
- Return type:
Dict[str, Any]
- abstract deregisterLocatorFilter(self, filter: QgsLocatorFilter | None)[source]¶
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
deregisterLocatorFilter()
to deregister their filters upon plugin unload to avoid crashes.See also
- Parameters:
filter (Optional[QgsLocatorFilter])
- abstract digitizeToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Digitize” toolbar.
- Return type:
Optional[QToolBar]
- abstract editMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Edit” menu.
- Return type:
Optional[QMenu]
- abstract editableLayers(self, modified: bool = False) List[QgsMapLayer] ¶
Returns vector layers in edit mode
- Parameters:
modified (bool = False) – whether to return only layers that have been modified
- Return type:
List[QgsMapLayer]
- Returns:
list of layers in legend order, or empty list
- abstract fileToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “File” toolbar.
- Return type:
Optional[QToolBar]
- abstract firstRightStandardMenu(self) QMenu | None [source]¶
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.
- Return type:
Optional[QMenu]
- abstract getFeatureForm(self, l: QgsVectorLayer | None, f: QgsFeature) QgsAttributeDialog | None [source]¶
Returns a feature form for a given feature.
- Parameters:
l (Optional[QgsVectorLayer]) – The layer for which the dialog will be created
f (QgsFeature) – The feature for which the dialog will be created
- Return type:
Optional[QgsAttributeDialog]
- Returns:
A feature form
- abstract gpsTools(self) QgsGpsToolsInterface | None [source]¶
Returns an interface to allow plugins to use QGIS GPS tools.
- Return type:
Optional[QgsGpsToolsInterface]
- abstract helpMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Help” menu.
- Return type:
Optional[QMenu]
- abstract helpToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Help” toolbar.
- Return type:
Optional[QToolBar]
- abstract iconSize(self, dockedToolbar: bool = False) QSize [source]¶
Returns the toolbar icon size. If
dockedToolbar
isTrue
, the icon size for toolbars contained within docks is returned.- Parameters:
dockedToolbar (bool = False)
- Return type:
QSize
- abstract insertAddLayerAction(self, action: QAction | None)[source]¶
Add “add layer” action to layer menu
- Parameters:
action (Optional[QAction])
- abstract invalidateLocatorResults(self)[source]¶
Invalidate results from the locator filter.
This might be useful if the configuration of the filter changed without going through main application settings.
Added in version 3.2.
- abstract layerMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Layer” menu.
- Return type:
Optional[QMenu]
- signal layerSavedAs(l: QgsMapLayer, path: str)[source]¶
Emitted when a layer has been saved using save as.
- Parameters:
l (QgsMapLayer)
path (str)
- abstract layerToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Layer” toolbar.
- Return type:
Optional[QToolBar]
- abstract layerTreeCanvasBridge(self) QgsLayerTreeMapCanvasBridge | None [source]¶
Returns a pointer to the layer tree canvas bridge
- Return type:
Optional[QgsLayerTreeMapCanvasBridge]
- abstract layerTreeInsertionPoint(self) QgsLayerTreeRegistryBridge.InsertionPoint [source]¶
Returns the insertion point. This represents the current layer tree group and index where newly added map layers should be inserted into.
Added in version 3.10.
- Return type:
- abstract layerTreeView(self) QgsLayerTreeView | None [source]¶
- Return type:
Optional[QgsLayerTreeView]
- signal layoutDesignerClosed[source]¶
Emitted after a layout designer window is closed.
See also
See also
- signal layoutDesignerOpened(designer: QgsLayoutDesignerInterface)[source]¶
Emitted when a new layout
designer
has been opened.See also
- Parameters:
designer (QgsLayoutDesignerInterface)
- signal layoutDesignerWillBeClosed(designer: QgsLayoutDesignerInterface)[source]¶
Emitted before a layout
designer
is going to be closed and deleted.See also
See also
- Parameters:
designer (QgsLayoutDesignerInterface)
- abstract locatorSearch(self, searchText: str | None)[source]¶
This will perform a search in the locator bar by setting the line edit text to
searchText
and automatically displaying any results.Added in version 3.10.
- Parameters:
searchText (Optional[str])
- abstract mainWindow(self) QWidget | None [source]¶
Returns a pointer to the main window (instance of
QgisApp
in case of QGIS)- Return type:
Optional[QWidget]
- abstract mapCanvas(self) QgsMapCanvas | None [source]¶
Returns a pointer to the map canvas
- Return type:
Optional[QgsMapCanvas]
- abstract mapCanvases(self) List[QgsMapCanvas] ¶
Returns a list of all map canvases open in the app.
- Return type:
List[QgsMapCanvas]
- abstract mapCanvases3D(self) List[Qgs3DMapCanvas] ¶
Returns a list of all 3D map canvases open in the app.
Added in version 3.36.
- Return type:
List[Qgs3DMapCanvas]
Returns a reference to the main window “Map Navigation” toolbar.
- Return type:
Optional[QToolBar]
- abstract mapToolActionGroup(self) QActionGroup | None [source]¶
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.
Added in version 3.16.
- Return type:
Optional[QActionGroup]
- abstract meshMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Mesh” menu.
Added in version 3.34.
- Return type:
Optional[QMenu]
- abstract messageBar(self) QgsMessageBar | None [source]¶
Returns the message bar of the main app
- Return type:
Optional[QgsMessageBar]
- abstract messageTimeout(self) int [source]¶
Returns the timeout for timed messages: default of 5 seconds
- Return type:
int
- abstract newLayerMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Create New Layer” menu.
- Return type:
Optional[QMenu]
- abstract newProject(self, promptToSaveFlag: bool = False) bool [source]¶
Starts a new blank project.
If
promptToSaveFlag
isTrue
then users will be prompted to save any currently open project (if that project has changes). If the flag isFalse
, 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, orFalse
if the operation was not successful (e.g. the user opted to cancel when prompted to save the current project).- Parameters:
promptToSaveFlag (bool = False)
- Return type:
bool
- signal newProjectCreated[source]¶
Emitted when starting an entirely new project.
Note
This is similar to
projectRead()
; plugins might want to be notified that they’re in a new project. Yes,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.
- abstract openDataSourceManagerPage(self, pageName: str | None)[source]¶
Opens a page in the main window “Data Source Manager” dialog.
This method creates and opens the dialog if it is not already visible.
Added in version 3.30.
- Parameters:
pageName (Optional[str])
- abstract openFeatureForm(self, l: QgsVectorLayer | None, f: QgsFeature, updateFeatureOnly: bool = False, showModal: bool = True) bool [source]¶
Opens a new feature form. Returns
True
if dialog was accepted (if shown modal,True
otherwise).- Parameters:
l (Optional[QgsVectorLayer]) – vector layer
f (QgsFeature) – feature to show/modify
updateFeatureOnly (bool = False) – only update the feature update (don’t change any attributes of the layer) [UNUSED]
showModal (bool = True) – if
True
, will wait for the dialog to be executed (only shown otherwise)
- Return type:
bool
- abstract openLayoutDesigner(self, layout: QgsMasterLayoutInterface | None) QgsLayoutDesignerInterface | None [source]¶
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.- Parameters:
layout (Optional[QgsMasterLayoutInterface])
- Return type:
Optional[QgsLayoutDesignerInterface]
- abstract openLayoutDesigners(self) List[QgsLayoutDesignerInterface] ¶
Returns all currently open layout designers.
- Return type:
- abstract openMessageLog(self, tabName: str | None = '')[source]¶
Opens the message log dock widget, and optionally activates a specific tab by name.
- Parameters:
tabName (Optional[str] = '') – Name of the tab to be activated (since QGIS 3.44)
- abstract openURL(self, url: str | None, useQgisDocDirectory: bool = True)[source]¶
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
.- Parameters:
url (Optional[str]) – URL to open
useQgisDocDirectory (bool = True) – If
True
, the URL will be formed by concatenating url to the QGIS documentation directory path (prefix/share/doc)
Deprecated since version 3.40: Use QDesktopServices instead.
- abstract pasteFromClipboard(self, a0: QgsMapLayer | None)[source]¶
Paste features from clipboard to the layer
- Parameters:
a0 (Optional[QgsMapLayer])
- abstract pluginHelpMenu(self) QMenu | None [source]¶
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
pluginMenu()
which solely contains Plugin Help or About actions.Added in version 3.10.
- Return type:
Optional[QMenu]
- abstract pluginManagerInterface(self) QgsPluginManagerInterface | None [source]¶
- Return type:
Optional[QgsPluginManagerInterface]
- abstract pluginMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Plugin” menu.
- Return type:
Optional[QMenu]
- abstract pluginToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Plugin” toolbar.
- Return type:
Optional[QToolBar]
- abstract preloadForm(self, uifile: str | None)[source]¶
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
- Parameters:
uifile (Optional[str])
- abstract projectImportExportMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Import/Export” project menu.
See also
See also
Added in version 3.30.
- Return type:
Optional[QMenu]
- abstract projectMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Project” menu.
- Return type:
Optional[QMenu]
- abstract projectModelsMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Projects” - “Models” submenu.
Added in version 3.42.
- Return type:
Optional[QMenu]
- signal projectRead[source]¶
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.
- abstract rasterMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Raster” menu.
- Return type:
Optional[QMenu]
- abstract rasterToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Raster” toolbar.
- Return type:
Optional[QToolBar]
- abstract registerApplicationExitBlocker(self, blocker: QgsApplicationExitBlockerInterface | None)[source]¶
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.See also
Added in version 3.16.
- Parameters:
blocker (Optional[QgsApplicationExitBlockerInterface])
- abstract registerCustomDropHandler(self, handler: QgsCustomDropHandler | None)[source]¶
Register a new custom drop
handler
.Note
Ownership of
handler
is not transferred, and the handler must be unregistered when plugin is unloaded.See also
See also
- Parameters:
handler (Optional[QgsCustomDropHandler])
- abstract registerCustomLayoutDropHandler(self, handler: QgsLayoutCustomDropHandler | None)[source]¶
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.See also
See also
- Parameters:
handler (Optional[QgsLayoutCustomDropHandler])
- abstract registerCustomProjectOpenHandler(self, handler: QgsCustomProjectOpenHandler | None)[source]¶
Register a new custom project open
handler
.Note
Ownership of
handler
is not transferred, and the handler must be unregistered when plugin is unloaded.See also
See also
Added in version 3.14.
- Parameters:
handler (Optional[QgsCustomProjectOpenHandler])
- abstract registerDevToolWidgetFactory(self, factory: QgsDevToolWidgetFactory | None)[source]¶
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.
See also
Added in version 3.14.
- Parameters:
factory (Optional[QgsDevToolWidgetFactory])
- abstract registerLocatorFilter(self, filter: QgsLocatorFilter | None)[source]¶
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
deregisterLocatorFilter()
and deregister their filters upon plugin unload to avoid crashes.See also
- Parameters:
filter (Optional[QgsLocatorFilter])
- abstract registerMainWindowAction(self, action: QAction | None, defaultShortcut: str | None) bool [source]¶
Register action to the shortcuts manager so its shortcut can be changed in GUI
- Parameters:
action (Optional[QAction])
defaultShortcut (Optional[str])
- Return type:
bool
- abstract registerMapLayerConfigWidgetFactory(self, factory: QgsMapLayerConfigWidgetFactory | None)[source]¶
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.
See also
- Parameters:
factory (Optional[QgsMapLayerConfigWidgetFactory])
- abstract registerMapToolHandler(self, handler: QgsAbstractMapToolHandler | None)[source]¶
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.See also
See also
Added in version 3.16.
- Parameters:
handler (Optional[QgsAbstractMapToolHandler])
- abstract registerOptionsWidgetFactory(self, factory: QgsOptionsWidgetFactory | None)[source]¶
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.
See also
See also
- Parameters:
factory (Optional[QgsOptionsWidgetFactory])
- abstract registerProjectPropertiesWidgetFactory(self, factory: QgsOptionsWidgetFactory | None)[source]¶
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.
See also
Added in version 3.16.
- Parameters:
factory (Optional[QgsOptionsWidgetFactory])
- abstract reloadConnections(self)[source]¶
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)
- abstract removeAddLayerAction(self, action: QAction | None)[source]¶
Remove “add layer” action from layer menu
- Parameters:
action (Optional[QAction])
- abstract removeCustomActionForLayerType(self, action: QAction | None) bool [source]¶
Remove action for layers in the layer tree previously added with
addCustomActionForLayerType()
See also
- Parameters:
action (Optional[QAction])
- Return type:
bool
- abstract removeDatabaseToolBarIcon(self, qAction: QAction | None)[source]¶
Remove an action (icon) from the Database toolbar
- Parameters:
qAction (Optional[QAction])
- abstract removeDockWidget(self, dockwidget: QDockWidget | None)[source]¶
Removes the specified
dock
widget from main window (without deleting it).See also
- Parameters:
dockwidget (Optional[QDockWidget])
- abstract removePluginDatabaseMenu(self, name: str | None, action: QAction | None)[source]¶
Remove action from the Database menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract removePluginMenu(self, name: str | None, action: QAction | None)[source]¶
Remove action from the plugins menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract removePluginMeshMenu(self, name: str | None, action: QAction | None)[source]¶
Remove action from the Mesh menu
Added in version 3.24.
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract removePluginRasterMenu(self, name: str | None, action: QAction | None)[source]¶
Remove action from the Raster menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract removePluginVectorMenu(self, name: str | None, action: QAction | None)[source]¶
Remove action from the Vector menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract removePluginWebMenu(self, name: str | None, action: QAction | None)[source]¶
Remove action from the Web menu
- Parameters:
name (Optional[str])
action (Optional[QAction])
- abstract removeProjectExportAction(self, action: QAction | None)[source]¶
Adds an
action
to the QGIS “Export project” menu.See also
See also
Added in version 3.30.
- Parameters:
action (Optional[QAction])
- abstract removeProjectImportAction(self, action: QAction | None)[source]¶
Adds an
action
to the QGIS “Import project” menu.See also
See also
Added in version 3.30.
- Parameters:
action (Optional[QAction])
- abstract removeRasterToolBarIcon(self, qAction: QAction | None)[source]¶
Remove an action (icon) from the Raster toolbar
- Parameters:
qAction (Optional[QAction])
- abstract removeToolBarIcon(self, qAction: QAction | None)[source]¶
Remove an action (icon) from the plugin toolbar
- Parameters:
qAction (Optional[QAction])
- abstract removeVectorToolBarIcon(self, qAction: QAction | None)[source]¶
Remove an action (icon) from the Vector toolbar
- Parameters:
qAction (Optional[QAction])
- abstract removeWebToolBarIcon(self, qAction: QAction | None)[source]¶
Remove an action (icon) from the Web toolbar
- Parameters:
qAction (Optional[QAction])
- abstract removeWindow(self, action: QAction | None)[source]¶
Remove window from Window menu. Calling this is necessary only for windows which are hidden rather than deleted when closed.
- Parameters:
action (Optional[QAction])
- abstract saveStyleSheetOptions(self, opts: Dict[str | None, Any])[source]¶
Save changed default option keys/values to user settings
- Parameters:
opts (Dict[Optional[str], Any])
- abstract selectionToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Selection” toolbar.
Added in version 3.14.
- Return type:
Optional[QToolBar]
- abstract setActiveLayer(self, a0: QgsMapLayer | None) bool [source]¶
Set the active layer (layer gets selected in the legend) returns
True
if the layer exists,False
otherwise- Parameters:
a0 (Optional[QgsMapLayer])
- Return type:
bool
- abstract setGpsPanelConnection(self, connection: QgsGpsConnection | None)[source]¶
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
QgsApplication.gpsConnectionRegistry()
.Deprecated since version 3.44: Use the method from
gpsTools()
instead.Added in version 3.16.
- Parameters:
connection (Optional[QgsGpsConnection])
- abstract settingsMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Settings” menu.
- Return type:
Optional[QMenu]
- abstract shapeDigitizeToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Shape Digitizing” toolbar.
- Return type:
Optional[QToolBar]
- abstract showApiDocumentation(self, api: Qgis.DocumentationApi = Qgis.DocumentationApi.PyQgis, browser: Qgis.DocumentationBrowser = Qgis.DocumentationBrowser.DeveloperToolsPanel, object: str | None = '', module: str | None = '')[source]¶
Show a page of the API documentation
- Parameters:
api (Qgis.DocumentationApi = Qgis.DocumentationApi.PyQgis) – Which API to display
browser (Qgis.DocumentationBrowser = Qgis.DocumentationBrowser.DeveloperToolsPanel) – Web browser used to display the API documentation
object (Optional[str] = '') – object to show in the documentation
module (Optional[str] = '') – used only if api =
Qgis
.DocumentationApi.PyQgis
Added in version 3.42.
- abstract showAttributeTable(self, l: QgsVectorLayer | None, filterExpression: str | None = '') QDialog | None [source]¶
Open attribute table dialog
- Parameters:
l (Optional[QgsVectorLayer])
filterExpression (Optional[str] = '')
- Return type:
Optional[QDialog]
- abstract showLayerProperties(self, l: QgsMapLayer | None, page: str | None = '')[source]¶
Opens layer properties dialog for the layer
l
. Optionally, apage
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.
- Parameters:
l (Optional[QgsMapLayer])
page (Optional[str] = '')
- abstract showOptionsDialog(self, parent: QWidget | None = None, currentPage: str | None = '')[source]¶
Opens the options dialog. The
currentPage
argument can be used to force the dialog to open at a specific page.- Parameters:
parent (Optional[QWidget] = None)
currentPage (Optional[str] = '')
- abstract showProjectPropertiesDialog(self, currentPage: str | None = '')[source]¶
Opens the project properties dialog. The
currentPage
argument can be used to force the dialog to open at a specific page.Added in version 3.16.
- Parameters:
currentPage (Optional[str] = '')
- abstract statusBarIface(self) QgsStatusBar | None [source]¶
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
statusBar()
method).- Return type:
Optional[QgsStatusBar]
- virtual takeAppScreenShots(self, saveDirectory: str | None, categories: int = 0)[source]¶
Take screenshots for user documentation
- Parameters:
saveDirectory (Optional[str]) – path where the screenshots will be saved
categories (int = 0) – an int as a flag value of
QgsAppScreenShots
.Categories
Added in version 3.4.
- abstract unregisterApplicationExitBlocker(self, blocker: QgsApplicationExitBlockerInterface | None)[source]¶
Unregister a previously registered application exit
blocker
.See also
Added in version 3.16.
- Parameters:
blocker (Optional[QgsApplicationExitBlockerInterface])
- abstract unregisterCustomDropHandler(self, handler: QgsCustomDropHandler | None)[source]¶
Unregister a previously registered custom drop
handler
.See also
See also
- Parameters:
handler (Optional[QgsCustomDropHandler])
- abstract unregisterCustomLayoutDropHandler(self, handler: QgsLayoutCustomDropHandler | None)[source]¶
Unregister a previously registered custom drop
handler
for layout windows.See also
See also
- Parameters:
handler (Optional[QgsLayoutCustomDropHandler])
- abstract unregisterCustomProjectOpenHandler(self, handler: QgsCustomProjectOpenHandler | None)[source]¶
Unregister a previously registered custom project open
handler
.See also
See also
Added in version 3.14.
- Parameters:
handler (Optional[QgsCustomProjectOpenHandler])
- abstract unregisterDevToolWidgetFactory(self, factory: QgsDevToolWidgetFactory | None)[source]¶
Unregister a previously registered tool factory from the development/debugging tools dock.
See also
Added in version 3.14.
- Parameters:
factory (Optional[QgsDevToolWidgetFactory])
- abstract unregisterMainWindowAction(self, action: QAction | None) bool [source]¶
Unregister a previously registered action. (e.g. when plugin is going to be unloaded)
- Parameters:
action (Optional[QAction])
- Return type:
bool
- abstract unregisterMapLayerConfigWidgetFactory(self, factory: QgsMapLayerConfigWidgetFactory | None)[source]¶
Unregister a previously registered tab in the map layer properties dialog.
See also
- Parameters:
factory (Optional[QgsMapLayerConfigWidgetFactory])
- abstract unregisterMapToolHandler(self, handler: QgsAbstractMapToolHandler | None)[source]¶
Unregister a previously registered map tool
handler
.See also
Added in version 3.16.
- Parameters:
handler (Optional[QgsAbstractMapToolHandler])
- abstract unregisterOptionsWidgetFactory(self, factory: QgsOptionsWidgetFactory | None)[source]¶
Unregister a previously registered tab in the options dialog.
See also
See also
- Parameters:
factory (Optional[QgsOptionsWidgetFactory])
- abstract unregisterProjectPropertiesWidgetFactory(self, factory: QgsOptionsWidgetFactory | None)[source]¶
Unregister a previously registered tab in the options dialog.
See also
Added in version 3.16.
- Parameters:
factory (Optional[QgsOptionsWidgetFactory])
- abstract userProfileManager(self) QgsUserProfileManager | None [source]¶
Returns a reference to the user profile manager
Added in version 3.30.
- Return type:
Optional[QgsUserProfileManager]
- abstract vectorLayerTools(self) QgsVectorLayerTools | None [source]¶
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 type:
Optional[QgsVectorLayerTools]
- Returns:
An instance of the vector layer tools
- abstract vectorMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Vector” menu.
- Return type:
Optional[QMenu]
- abstract vectorToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Vector” toolbar.
- Return type:
Optional[QToolBar]
- abstract viewMenu(self) QMenu | None [source]¶
Returns a reference to the main window “View” menu.
- Return type:
Optional[QMenu]
- abstract webMenu(self) QMenu | None [source]¶
Returns a reference to the main window “Web” menu.
- Return type:
Optional[QMenu]
- abstract webToolBar(self) QToolBar | None [source]¶
Returns a reference to the main window “Web” toolbar.
- Return type:
Optional[QToolBar]