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