QGIS API Documentation  2.14.0-Essen
Public Slots | Signals | Public Member Functions | List of all members
QgisInterface Class Referenceabstract

QgisInterface Abstract base class defining interfaces exposed by QgisApp and made available to plugins. More...

#include <qgisinterface.h>

Inheritance diagram for QgisInterface:
Inheritance graph
[legend]

Public Slots

virtual QActionactionAbout ()=0
 
virtual QActionactionAddAllToOverview ()=0
 
virtual QActionactionAddFeature ()=0
 
virtual QActionactionAddOgrLayer ()=0
 
virtual QActionactionAddPart ()=0
 
virtual QActionactionAddPgLayer ()=0
 
virtual QActionactionAddRasterLayer ()=0
 
virtual QActionactionAddRing ()=0
 
virtual QActionactionAddToOverview ()=0
 
virtual QActionactionAddWmsLayer ()=0
 
virtual QActionactionAllEdits ()=0
 
virtual QActionactionCancelAllEdits ()=0
 
virtual QActionactionCancelEdits ()=0
 
virtual QActionactionCheckQgisVersion ()=0
 
virtual QActionactionCopyFeatures ()=0
 
virtual QActionactionCopyLayerStyle ()=0
 
virtual QActionactionCustomProjection ()=0
 
virtual QActionactionCutFeatures ()=0
 
virtual QActionactionDeletePart ()=0
 
virtual QActionactionDeleteRing ()=0
 
virtual QActionactionDeleteSelected ()=0
 
virtual QActionactionDraw ()=0
 Get access to the native draw action. More...
 
virtual QActionactionDuplicateLayer ()=0
 
virtual QActionactionExit ()=0
 
virtual QActionactionFeatureAction ()=0
 Get access to the native run action feature action. Call trigger() on it to set the default run feature action map tool. More...
 
virtual QActionactionHelpContents ()=0
 
virtual QActionactionHideAllLayers ()=0
 
virtual QActionactionHideSelectedLayers ()=0
 
virtual QActionactionIdentify ()=0
 Get access to the native identify action. Call trigger() on it to set the default identify map tool. More...
 
virtual QActionactionLayerProperties ()=0
 
virtual QActionactionLayerSaveAs ()=0
 
virtual Q_DECL_DEPRECATED QActionactionLayerSelectionSaveAs ()=0
 
virtual QActionactionManagePlugins ()=0
 
virtual QActionactionMapTips ()=0
 Get access to the native map tips action. Call trigger() on it to toggle map tips. More...
 
virtual QActionactionMeasure ()=0
 Get access to the native measure action. Call trigger() on it to set the default measure map tool. More...
 
virtual QActionactionMeasureArea ()=0
 Get access to the native measure area action. Call trigger() on it to set the default measure area map tool. More...
 
virtual QActionactionMoveFeature ()=0
 
virtual QActionactionNewBookmark ()=0
 Get access to the native new bookmark action. Call trigger() on it to open the new bookmark dialog. More...
 
virtual QActionactionNewProject ()=0
 
virtual QActionactionNewVectorLayer ()=0
 
virtual QActionactionNodeTool ()=0
 
virtual QActionactionOpenFieldCalculator ()=0
 
virtual QActionactionOpenProject ()=0
 
virtual QActionactionOpenTable ()=0
 
virtual QActionactionOptions ()=0
 
virtual QActionactionPan ()=0
 Get access to the native pan action. Call trigger() on it to set the default pan map tool. More...
 
virtual QActionactionPanToSelected ()=0
 Get access to the native pan to selected action. Call trigger() on it to pan the map canvas to the selection. More...
 
virtual QActionactionPasteFeatures ()=0
 
virtual QActionactionPasteLayerStyle ()=0
 
virtual QActionactionPluginListSeparator ()=0
 
virtual QActionactionPrintComposer ()=0
 
virtual QActionactionProjectProperties ()=0
 
virtual QActionactionQgisHomePage ()=0
 
virtual QActionactionRemoveAllFromOverview ()=0
 
virtual QActionactionRemoveLayer ()=0
 
virtual QActionactionRollbackAllEdits ()=0
 
virtual QActionactionRollbackEdits ()=0
 
virtual QActionactionSaveActiveLayerEdits ()=0
 
virtual QActionactionSaveAllEdits ()=0
 
virtual QActionactionSaveEdits ()=0
 
virtual QActionactionSaveMapAsImage ()=0
 
virtual QActionactionSaveProject ()=0
 
virtual QActionactionSaveProjectAs ()=0
 
virtual QActionactionSelect ()=0
 Get access to the native select action. Call trigger() on it to set the default select map tool. More...
 
virtual QActionactionSelectFreehand ()=0
 Get access to the native select freehand action. Call trigger() on it to set the default select freehand map tool. More...
 
virtual QActionactionSelectPolygon ()=0
 Get access to the native select polygon action. Call trigger() on it to set the default select polygon map tool. More...
 
virtual QActionactionSelectRadius ()=0
 Get access to the native select radius action. Call trigger() on it to set the default select radius map tool. More...
 
virtual QActionactionSelectRectangle ()=0
 Get access to the native select rectangle action. Call trigger() on it to set the default select rectangle map tool. More...
 
virtual QActionactionShowAllLayers ()=0
 
virtual QActionactionShowBookmarks ()=0
 Get access to the native show bookmarks action. Call trigger() on it to open the bookmarks dialog. More...
 
virtual QActionactionShowComposerManager ()=0
 
virtual QActionactionShowPythonDialog ()=0
 
virtual QActionactionShowSelectedLayers ()=0
 
virtual QActionactionSimplifyFeature ()=0
 
virtual QActionactionSplitFeatures ()=0
 
virtual QActionactionSplitParts ()=0
 
virtual QActionactionToggleEditing ()=0
 
virtual QActionactionToggleFullScreen ()=0
 
virtual QActionactionTouch ()=0
 Get access to the native touch action. More...
 
virtual QActionactionZoomActualSize ()=0
 Get access to the native zoom resolution (100%) action. Call trigger() on it to zoom to actual size. More...
 
virtual QActionactionZoomFullExtent ()=0
 Get access to the native zoom full extent action. Call trigger() on it to zoom to the full extent. More...
 
virtual QActionactionZoomIn ()=0
 Get access to the native zoom in action. Call trigger() on it to set the default zoom in map tool. More...
 
virtual QActionactionZoomLast ()=0
 Get access to the native zoom last action. Call trigger() on it to zoom to last. More...
 
virtual QActionactionZoomNext ()=0
 Get access to the native zoom next action. Call trigger() on it to zoom to next. More...
 
virtual QActionactionZoomOut ()=0
 Get access to the native zoom out action. Call trigger() on it to set the default zoom out map tool. More...
 
virtual QActionactionZoomToLayer ()=0
 Get access to the native zoom to layer action. Call trigger() on it to zoom to the active layer. More...
 
virtual QActionactionZoomToSelected ()=0
 Get access to the native zoom to selected action. Call trigger() on it to zoom to the current selection. More...
 
virtual QList< QgsComposerView * > activeComposers ()=0
 Return mainwindows / composer views of running composer instances (currently only one) More...
 
virtual QgsMapLayeractiveLayer ()=0
 Get pointer to the active layer (layer selected in the legend) More...
 
virtual int addDatabaseToolBarIcon (QAction *qAction)=0
 Add an icon to the Database toolbar. More...
 
virtual QActionaddDatabaseToolBarWidget (QWidget *widget)=0
 Add a widget to the database toolbar. More...
 
virtual void addDockWidget (Qt::DockWidgetArea area, QDockWidget *dockwidget)=0
 Add a dock widget to the main window. More...
 
virtual QMenuaddLayerMenu ()=0
 
virtual void addPluginToDatabaseMenu (const QString &name, QAction *action)=0
 Add action to the Database menu. More...
 
virtual void addPluginToMenu (const QString &name, QAction *action)=0
 Add action to the plugins menu. More...
 
virtual void addPluginToRasterMenu (const QString &name, QAction *action)=0
 Add action to the Raster menu. More...
 
virtual void addPluginToVectorMenu (const QString &name, QAction *action)=0
 Add action to the Vector menu. More...
 
virtual void addPluginToWebMenu (const QString &name, QAction *action)=0
 Add action to the Web menu. More...
 
virtual bool addProject (const QString &theProject)=0
 Add a project. More...
 
virtual QgsRasterLayeraddRasterLayer (const QString &rasterLayerPath, const QString &baseName=QString())=0
 Add a raster layer given a raster layer file name. More...
 
virtual QgsRasterLayeraddRasterLayer (const QString &url, const QString &layerName, const QString &providerKey)=0
 Add a WMS layer. More...
 
virtual int addRasterToolBarIcon (QAction *qAction)=0
 Add an icon to the Raster toolbar. More...
 
virtual QActionaddRasterToolBarWidget (QWidget *widget)=0
 Add a widget to the raster toolbar. More...
 
virtual QToolBaraddToolBar (const QString &name)=0
 Add toolbar with specified name. More...
 
virtual void addToolBar (QToolBar *toolbar, Qt::ToolBarArea area=Qt::TopToolBarArea)=0
 Add a toolbar. More...
 
virtual int addToolBarIcon (QAction *qAction)=0
 Add an icon to the plugins toolbar. More...
 
virtual QActionaddToolBarWidget (QWidget *widget)=0
 Add a widget to the plugins toolbar. More...
 
virtual void addUserInputWidget (QWidget *widget)=0
 Adds a widget to the user input tool bar. More...
 
virtual QgsVectorLayeraddVectorLayer (const QString &vectorLayerPath, const QString &baseName, const QString &providerKey)=0
 Add a vector layer. More...
 
virtual int addVectorToolBarIcon (QAction *qAction)=0
 Add an icon to the Vector toolbar. More...
 
virtual QActionaddVectorToolBarWidget (QWidget *widget)=0
 Add a widget to the vector toolbar. More...
 
virtual int addWebToolBarIcon (QAction *qAction)=0
 Add an icon to the Web toolbar. More...
 
virtual QActionaddWebToolBarWidget (QWidget *widget)=0
 Add a widget to the web toolbar. More...
 
virtual void addWindow (QAction *action)=0
 Add window to Window menu. More...
 
virtual QToolBaradvancedDigitizeToolBar ()=0
 
virtual QToolBarattributesToolBar ()=0
 
virtual void buildStyleSheet (const QMap< QString, QVariant > &opts)=0
 Generate stylesheet. More...
 
virtual QgsAdvancedDigitizingDockWidgetcadDockWidget ()=0
 Advanced digitizing dock widget. More...
 
virtual QgsComposerViewcreateNewComposer (const QString &title=QString())=0
 Create a new composer. More...
 
virtual QMenudatabaseMenu ()=0
 
virtual QToolBardatabaseToolBar ()=0
 
virtual QFont defaultStyleSheetFont ()=0
 Get reference font for initial qApp (may not be same as QgisApp) More...
 
virtual QMap< QString, QVariantdefaultStyleSheetOptions ()=0
 Return changeable options built from settings and/or defaults. More...
 
virtual void deleteComposer (QgsComposerView *composerView)=0
 Deletes parent composer of composer view, after closing composer window. More...
 
virtual QToolBardigitizeToolBar ()=0
 
virtual QgsComposerViewduplicateComposer (QgsComposerView *composerView, const QString &title=QString())=0
 Duplicate an existing parent composer from composer view. More...
 
virtual QList< QgsMapLayer * > editableLayers (bool modified=false) const =0
 Return vector layers in edit mode. More...
 
virtual QMenueditMenu ()=0
 
virtual Q_DECL_DEPRECATED QMenufileMenu ()=0
 Accessors for inserting items into menus and toolbars. More...
 
virtual QToolBarfileToolBar ()=0
 
virtual QMenufirstRightStandardMenu ()=0
 
virtual QgsAttributeDialoggetFeatureForm (QgsVectorLayer *l, QgsFeature &f)=0
 Returns a feature form for a given feature. More...
 
virtual QMenuhelpMenu ()=0
 
virtual QToolBarhelpToolBar ()=0
 
virtual void insertAddLayerAction (QAction *action)=0
 Add "add layer" action to layer menu. More...
 
virtual QMenulayerMenu ()=0
 
virtual QToolBarlayerToolBar ()=0
 
virtual QgsLayerTreeMapCanvasBridgelayerTreeCanvasBridge ()=0
 Returns a pointer to the layer tree canvas bridge. More...
 
virtual QWidgetmainWindow ()=0
 Return a pointer to the main window (instance of QgisApp in case of QGIS) More...
 
virtual QgsMapCanvasmapCanvas ()=0
 Return a pointer to the map canvas. More...
 
virtual QToolBarmapNavToolToolBar ()=0
 
virtual QgsMessageBarmessageBar ()=0
 Return the message bar of the main app. More...
 
virtual int messageTimeout ()=0
 Get timeout for timed messages: default of 5 seconds. More...
 
virtual QMenunewLayerMenu ()=0
 
virtual void newProject (bool thePromptToSaveFlag=false)=0
 Start a blank project. More...
 
virtual bool openFeatureForm (QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly=false, bool showModal=true)=0
 Open feature form. More...
 
virtual void openMessageLog ()=0
 Open the message log dock widget. More...
 
virtual Q_DECL_DEPRECATED void openURL (const QString &url, bool useQgisDocDirectory=true)=0
 Open a url in the users browser. More...
 
virtual QMenupluginMenu ()=0
 
virtual QToolBarpluginToolBar ()=0
 
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 (PyQt4) and you havn't used the info tool first. More...
 
virtual QMenuprojectMenu ()=0
 
virtual QMenurasterMenu ()=0
 
virtual QToolBarrasterToolBar ()=0
 
virtual bool registerMainWindowAction (QAction *action, const QString &defaultShortcut)=0
 Register action to the shortcuts manager so its shortcut can be changed in GUI. More...
 
virtual void removeAddLayerAction (QAction *action)=0
 Remove "add layer" action from layer menu. More...
 
virtual void removeDatabaseToolBarIcon (QAction *qAction)=0
 Remove an action (icon) from the Database toolbar. More...
 
virtual void removeDockWidget (QDockWidget *dockwidget)=0
 Remove specified dock widget from main window (doesn't delete it). More...
 
virtual void removePluginDatabaseMenu (const QString &name, QAction *action)=0
 Remove action from the Database menu. More...
 
virtual void removePluginMenu (const QString &name, QAction *action)=0
 Remove action from the plugins menu. More...
 
virtual void removePluginRasterMenu (const QString &name, QAction *action)=0
 Remove action from the Raster menu. More...
 
virtual void removePluginVectorMenu (const QString &name, QAction *action)=0
 Remove action from the Vector menu. More...
 
virtual void removePluginWebMenu (const QString &name, QAction *action)=0
 Remove action from the Web menu. More...
 
virtual void removeRasterToolBarIcon (QAction *qAction)=0
 Remove an action (icon) from the Raster toolbar. More...
 
virtual void removeToolBarIcon (QAction *qAction)=0
 Remove an action (icon) from the plugin toolbar. More...
 
virtual void removeVectorToolBarIcon (QAction *qAction)=0
 Remove an action (icon) from the Vector toolbar. More...
 
virtual void removeWebToolBarIcon (QAction *qAction)=0
 Remove an action (icon) from the Web toolbar. More...
 
virtual void removeWindow (QAction *action)=0
 Remove window from Window menu. More...
 
virtual void saveStyleSheetOptions (const QMap< QString, QVariant > &opts)=0
 Save changed default option keys/values to user settings. More...
 
virtual bool setActiveLayer (QgsMapLayer *)=0
 Set the active layer (layer gets selected in the legend) returns true if the layer exists, false otherwise. More...
 
virtual QMenusettingsMenu ()=0
 
virtual QDialogshowAttributeTable (QgsVectorLayer *l, const QString &filterExpression=QString())=0
 Open attribute table dialog. More...
 
virtual void showLayerProperties (QgsMapLayer *l)=0
 Open layer properties dialog. More...
 
virtual bool unregisterMainWindowAction (QAction *action)=0
 Unregister a previously registered action. More...
 
virtual QgsVectorLayerToolsvectorLayerTools ()=0
 Access the vector layer tools instance. More...
 
virtual QMenuvectorMenu ()=0
 
virtual QToolBarvectorToolBar ()=0
 
virtual QMenuviewMenu ()=0
 
virtual QMenuwebMenu ()=0
 
virtual QToolBarwebToolBar ()=0
 
virtual QMenuwindowMenu ()=0
 
virtual void zoomFull ()=0
 Zoom to full extent of map layers. More...
 
virtual void zoomToActiveLayer ()=0
 Zoom to extent of the active layer. More...
 
virtual void zoomToNext ()=0
 Zoom to next view extent. More...
 
virtual void zoomToPrevious ()=0
 Zoom to previous view extent. More...
 

Signals

void composerAdded (QgsComposerView *v)
 This signal is emitted when a new composer instance has been created. More...
 
void composerRemoved (QgsComposerView *v)
 This signal is emitted when a composer instance has been removed. More...
 
void composerWillBeRemoved (QgsComposerView *v)
 This signal is emitted before a new composer instance is going to be removed. More...
 
void currentLayerChanged (QgsMapLayer *layer)
 Emitted whenever current (selected) layer changes. More...
 
void initializationCompleted ()
 This signal is emitted when the initialization is complete. More...
 
void layerSavedAs (QgsMapLayer *l, const QString &path)
 This signal is emitted when a layer has been saved using save as. More...
 
void newProjectCreated ()
 Emitted when starting an entirely new project. More...
 
void projectRead ()
 Emitted when a project file is successfully read. More...
 

Public Member Functions

 QgisInterface ()
 Constructor. More...
 
virtual ~QgisInterface ()
 Virtual destructor. More...
 
virtual QgsLayerTreeViewlayerTreeView ()=0
 
virtual QgsLegendInterfacelegendInterface ()=0
 Get pointer to legend interface. More...
 
virtual QgsPluginManagerInterfacepluginManagerInterface ()=0
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
 QObject (QObject *parent, const char *name)
 
virtual  ~QObject ()
 
bool blockSignals (bool block)
 
QObjectchild (const char *objName, const char *inheritsClass, bool recursiveSearch) const
 
const QObjectList & children () const
 
const char * className () const
 
bool connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const QObject *receiver, const char *method)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method)
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArraydynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name) const
 
QList< T > findChildren (const QRegExp &regExp) const
 
QList< T > findChildren (const QString &name) const
 
bool inherits (const char *className) const
 
void insertChild (QObject *object)
 
void installEventFilter (QObject *filterObj)
 
bool isA (const char *className) const
 
bool isWidgetType () const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
const char * name () const
 
const char * name (const char *defaultName) const
 
QString objectName () const
 
QObjectparent () const
 
QVariant property (const char *name) const
 
void removeChild (QObject *object)
 
void removeEventFilter (QObject *obj)
 
void setName (const char *name)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval)
 
QThreadthread () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
bool connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
bool connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
bool checkConnectArgs (const char *signal, const QObject *object, const char *method)
 
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const char *signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const char *signal)
 
int receivers (const char *signal) const
 
QObjectsender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Static Protected Member Functions inherited from QObject
QByteArray normalizeSignalSlot (const char *signalSlot)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

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 64 of file qgisinterface.h.

Constructor & Destructor Documentation

QgisInterface::QgisInterface ( )

Constructor.

Definition at line 21 of file qgisinterface.cpp.

QgisInterface::~QgisInterface ( )
virtual

Virtual destructor.

Definition at line 27 of file qgisinterface.cpp.

Member Function Documentation

virtual QAction* QgisInterface::actionAbout ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddAllToOverview ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddFeature ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddOgrLayer ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddPart ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddPgLayer ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddRasterLayer ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddRing ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddToOverview ( )
pure virtualslot
virtual QAction* QgisInterface::actionAddWmsLayer ( )
pure virtualslot
virtual QAction* QgisInterface::actionAllEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionCancelAllEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionCancelEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionCheckQgisVersion ( )
pure virtualslot
virtual QAction* QgisInterface::actionCopyFeatures ( )
pure virtualslot
virtual QAction* QgisInterface::actionCopyLayerStyle ( )
pure virtualslot
virtual QAction* QgisInterface::actionCustomProjection ( )
pure virtualslot
virtual QAction* QgisInterface::actionCutFeatures ( )
pure virtualslot
virtual QAction* QgisInterface::actionDeletePart ( )
pure virtualslot
virtual QAction* QgisInterface::actionDeleteRing ( )
pure virtualslot
virtual QAction* QgisInterface::actionDeleteSelected ( )
pure virtualslot
virtual QAction* QgisInterface::actionDraw ( )
pure virtualslot

Get access to the native draw action.

virtual QAction* QgisInterface::actionDuplicateLayer ( )
pure virtualslot
virtual QAction* QgisInterface::actionExit ( )
pure virtualslot
virtual QAction* QgisInterface::actionFeatureAction ( )
pure virtualslot

Get access to the native run action feature action. Call trigger() on it to set the default run feature action map tool.

virtual QAction* QgisInterface::actionHelpContents ( )
pure virtualslot
virtual QAction* QgisInterface::actionHideAllLayers ( )
pure virtualslot
virtual QAction* QgisInterface::actionHideSelectedLayers ( )
pure virtualslot
virtual QAction* QgisInterface::actionIdentify ( )
pure virtualslot

Get access to the native identify action. Call trigger() on it to set the default identify map tool.

virtual QAction* QgisInterface::actionLayerProperties ( )
pure virtualslot
virtual QAction* QgisInterface::actionLayerSaveAs ( )
pure virtualslot
virtual Q_DECL_DEPRECATED QAction* QgisInterface::actionLayerSelectionSaveAs ( )
pure virtualslot
Deprecated:
in 2.4 - returns null pointer
virtual QAction* QgisInterface::actionManagePlugins ( )
pure virtualslot
virtual QAction* QgisInterface::actionMapTips ( )
pure virtualslot

Get access to the native map tips action. Call trigger() on it to toggle map tips.

virtual QAction* QgisInterface::actionMeasure ( )
pure virtualslot

Get access to the native measure action. Call trigger() on it to set the default measure map tool.

virtual QAction* QgisInterface::actionMeasureArea ( )
pure virtualslot

Get access to the native measure area action. Call trigger() on it to set the default measure area map tool.

virtual QAction* QgisInterface::actionMoveFeature ( )
pure virtualslot
virtual QAction* QgisInterface::actionNewBookmark ( )
pure virtualslot

Get access to the native new bookmark action. Call trigger() on it to open the new bookmark dialog.

virtual QAction* QgisInterface::actionNewProject ( )
pure virtualslot
virtual QAction* QgisInterface::actionNewVectorLayer ( )
pure virtualslot
virtual QAction* QgisInterface::actionNodeTool ( )
pure virtualslot
virtual QAction* QgisInterface::actionOpenFieldCalculator ( )
pure virtualslot
virtual QAction* QgisInterface::actionOpenProject ( )
pure virtualslot
virtual QAction* QgisInterface::actionOpenTable ( )
pure virtualslot
virtual QAction* QgisInterface::actionOptions ( )
pure virtualslot
virtual QAction* QgisInterface::actionPan ( )
pure virtualslot

Get access to the native pan action. Call trigger() on it to set the default pan map tool.

virtual QAction* QgisInterface::actionPanToSelected ( )
pure virtualslot

Get access to the native pan to selected action. Call trigger() on it to pan the map canvas to the selection.

virtual QAction* QgisInterface::actionPasteFeatures ( )
pure virtualslot
virtual QAction* QgisInterface::actionPasteLayerStyle ( )
pure virtualslot
virtual QAction* QgisInterface::actionPluginListSeparator ( )
pure virtualslot
virtual QAction* QgisInterface::actionPrintComposer ( )
pure virtualslot
virtual QAction* QgisInterface::actionProjectProperties ( )
pure virtualslot
virtual QAction* QgisInterface::actionQgisHomePage ( )
pure virtualslot
virtual QAction* QgisInterface::actionRemoveAllFromOverview ( )
pure virtualslot
virtual QAction* QgisInterface::actionRemoveLayer ( )
pure virtualslot
virtual QAction* QgisInterface::actionRollbackAllEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionRollbackEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionSaveActiveLayerEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionSaveAllEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionSaveEdits ( )
pure virtualslot
virtual QAction* QgisInterface::actionSaveMapAsImage ( )
pure virtualslot
virtual QAction* QgisInterface::actionSaveProject ( )
pure virtualslot
virtual QAction* QgisInterface::actionSaveProjectAs ( )
pure virtualslot
virtual QAction* QgisInterface::actionSelect ( )
pure virtualslot

Get access to the native select action. Call trigger() on it to set the default select map tool.

virtual QAction* QgisInterface::actionSelectFreehand ( )
pure virtualslot

Get access to the native select freehand action. Call trigger() on it to set the default select freehand map tool.

virtual QAction* QgisInterface::actionSelectPolygon ( )
pure virtualslot

Get access to the native select polygon action. Call trigger() on it to set the default select polygon map tool.

virtual QAction* QgisInterface::actionSelectRadius ( )
pure virtualslot

Get access to the native select radius action. Call trigger() on it to set the default select radius map tool.

virtual QAction* QgisInterface::actionSelectRectangle ( )
pure virtualslot

Get access to the native select rectangle action. Call trigger() on it to set the default select rectangle map tool.

virtual QAction* QgisInterface::actionShowAllLayers ( )
pure virtualslot
virtual QAction* QgisInterface::actionShowBookmarks ( )
pure virtualslot

Get access to the native show bookmarks action. Call trigger() on it to open the bookmarks dialog.

virtual QAction* QgisInterface::actionShowComposerManager ( )
pure virtualslot
virtual QAction* QgisInterface::actionShowPythonDialog ( )
pure virtualslot
virtual QAction* QgisInterface::actionShowSelectedLayers ( )
pure virtualslot
virtual QAction* QgisInterface::actionSimplifyFeature ( )
pure virtualslot
virtual QAction* QgisInterface::actionSplitFeatures ( )
pure virtualslot
virtual QAction* QgisInterface::actionSplitParts ( )
pure virtualslot
virtual QAction* QgisInterface::actionToggleEditing ( )
pure virtualslot
virtual QAction* QgisInterface::actionToggleFullScreen ( )
pure virtualslot
virtual QAction* QgisInterface::actionTouch ( )
pure virtualslot

Get access to the native touch action.

virtual QAction* QgisInterface::actionZoomActualSize ( )
pure virtualslot

Get access to the native zoom resolution (100%) action. Call trigger() on it to zoom to actual size.

virtual QAction* QgisInterface::actionZoomFullExtent ( )
pure virtualslot

Get access to the native zoom full extent action. Call trigger() on it to zoom to the full extent.

virtual QAction* QgisInterface::actionZoomIn ( )
pure virtualslot

Get access to the native zoom in action. Call trigger() on it to set the default zoom in map tool.

virtual QAction* QgisInterface::actionZoomLast ( )
pure virtualslot

Get access to the native zoom last action. Call trigger() on it to zoom to last.

virtual QAction* QgisInterface::actionZoomNext ( )
pure virtualslot

Get access to the native zoom next action. Call trigger() on it to zoom to next.

virtual QAction* QgisInterface::actionZoomOut ( )
pure virtualslot

Get access to the native zoom out action. Call trigger() on it to set the default zoom out map tool.

virtual QAction* QgisInterface::actionZoomToLayer ( )
pure virtualslot

Get access to the native zoom to layer action. Call trigger() on it to zoom to the active layer.

virtual QAction* QgisInterface::actionZoomToSelected ( )
pure virtualslot

Get access to the native zoom to selected action. Call trigger() on it to zoom to the current selection.

virtual QList<QgsComposerView*> QgisInterface::activeComposers ( )
pure virtualslot

Return mainwindows / composer views of running composer instances (currently only one)

virtual QgsMapLayer* QgisInterface::activeLayer ( )
pure virtualslot

Get pointer to the active layer (layer selected in the legend)

virtual int QgisInterface::addDatabaseToolBarIcon ( QAction qAction)
pure virtualslot

Add an icon to the Database toolbar.

virtual QAction* QgisInterface::addDatabaseToolBarWidget ( QWidget widget)
pure virtualslot

Add a widget to the database toolbar.

To remove this widget again, call removeDatabaseToolBarIcon with the returned QAction.

Parameters
widgetwidget to add. The toolbar will take ownership of this widget
Returns
the QAction you can use to remove this widget from the toolbar
virtual void QgisInterface::addDockWidget ( Qt::DockWidgetArea  area,
QDockWidget dockwidget 
)
pure virtualslot

Add a dock widget to the main window.

virtual QMenu* QgisInterface::addLayerMenu ( )
pure virtualslot
Note
added in 2.5
virtual void QgisInterface::addPluginToDatabaseMenu ( const QString name,
QAction action 
)
pure virtualslot

Add action to the Database menu.

virtual void QgisInterface::addPluginToMenu ( const QString name,
QAction action 
)
pure virtualslot

Add action to the plugins menu.

virtual void QgisInterface::addPluginToRasterMenu ( const QString name,
QAction action 
)
pure virtualslot

Add action to the Raster menu.

virtual void QgisInterface::addPluginToVectorMenu ( const QString name,
QAction action 
)
pure virtualslot

Add action to the Vector menu.

virtual void QgisInterface::addPluginToWebMenu ( const QString name,
QAction action 
)
pure virtualslot

Add action to the Web menu.

virtual bool QgisInterface::addProject ( const QString theProject)
pure virtualslot

Add a project.

virtual QgsRasterLayer* QgisInterface::addRasterLayer ( const QString rasterLayerPath,
const QString baseName = QString() 
)
pure virtualslot

Add a raster layer given a raster layer file name.

virtual QgsRasterLayer* QgisInterface::addRasterLayer ( const QString url,
const QString layerName,
const QString providerKey 
)
pure virtualslot

Add a WMS layer.

virtual int QgisInterface::addRasterToolBarIcon ( QAction qAction)
pure virtualslot

Add an icon to the Raster toolbar.

virtual QAction* QgisInterface::addRasterToolBarWidget ( QWidget widget)
pure virtualslot

Add a widget to the raster toolbar.

To remove this widget again, call removeRasterToolBarIcon with the returned QAction.

Parameters
widgetwidget to add. The toolbar will take ownership of this widget
Returns
the QAction you can use to remove this widget from the toolbar
virtual QToolBar* QgisInterface::addToolBar ( const QString name)
pure virtualslot

Add toolbar with specified name.

virtual void QgisInterface::addToolBar ( QToolBar toolbar,
Qt::ToolBarArea  area = Qt::TopToolBarArea 
)
pure virtualslot

Add a toolbar.

Note
added in 2.3
virtual int QgisInterface::addToolBarIcon ( QAction qAction)
pure virtualslot

Add an icon to the plugins toolbar.

virtual QAction* QgisInterface::addToolBarWidget ( QWidget widget)
pure virtualslot

Add a widget to the plugins toolbar.

To remove this widget again, call removeToolBarIcon with the returned QAction.

Parameters
widgetwidget to add. The toolbar will take ownership of this widget
Returns
the QAction you can use to remove this widget from the toolbar
virtual void QgisInterface::addUserInputWidget ( QWidget widget)
pure virtualslot

Adds a widget to the user input tool bar.

virtual QgsVectorLayer* QgisInterface::addVectorLayer ( const QString vectorLayerPath,
const QString baseName,
const QString providerKey 
)
pure virtualslot

Add a vector layer.

virtual int QgisInterface::addVectorToolBarIcon ( QAction qAction)
pure virtualslot

Add an icon to the Vector toolbar.

virtual QAction* QgisInterface::addVectorToolBarWidget ( QWidget widget)
pure virtualslot

Add a widget to the vector toolbar.

To remove this widget again, call removeVectorToolBarIcon with the returned QAction.

Parameters
widgetwidget to add. The toolbar will take ownership of this widget
Returns
the QAction you can use to remove this widget from the toolbar
virtual int QgisInterface::addWebToolBarIcon ( QAction qAction)
pure virtualslot

Add an icon to the Web toolbar.

virtual QAction* QgisInterface::addWebToolBarWidget ( QWidget widget)
pure virtualslot

Add a widget to the web toolbar.

To remove this widget again, call removeWebToolBarIcon with the returned QAction.

Parameters
widgetwidget to add. The toolbar will take ownership of this widget
Returns
the QAction you can use to remove this widget from the toolbar
virtual void QgisInterface::addWindow ( QAction action)
pure virtualslot

Add window to Window menu.

The action title is the window title and the action should raise, unminimize and activate the window.

virtual QToolBar* QgisInterface::advancedDigitizeToolBar ( )
pure virtualslot
virtual QToolBar* QgisInterface::attributesToolBar ( )
pure virtualslot
virtual void QgisInterface::buildStyleSheet ( const QMap< QString, QVariant > &  opts)
pure virtualslot

Generate stylesheet.

Parameters
optsgenerated default option values, or a changed copy of them
virtual QgsAdvancedDigitizingDockWidget* QgisInterface::cadDockWidget ( )
pure virtualslot

Advanced digitizing dock widget.

Note
Added in 2.12
void QgisInterface::composerAdded ( QgsComposerView v)
signal

This signal is emitted when a new composer instance has been created.

void QgisInterface::composerRemoved ( QgsComposerView v)
signal

This signal is emitted when a composer instance has been removed.

Note
added in version 2.9
void QgisInterface::composerWillBeRemoved ( QgsComposerView v)
signal

This signal is emitted before a new composer instance is going to be removed.

virtual QgsComposerView* QgisInterface::createNewComposer ( const QString title = QString())
pure virtualslot

Create a new composer.

Parameters
titlewindow title for new composer (one will be generated if empty)
Returns
pointer to composer's view
Note
new composer window will be shown and activated
void QgisInterface::currentLayerChanged ( QgsMapLayer layer)
signal

Emitted whenever current (selected) layer changes.

The pointer to layer can be null if no layer is selected

virtual QMenu* QgisInterface::databaseMenu ( )
pure virtualslot
virtual QToolBar* QgisInterface::databaseToolBar ( )
pure virtualslot
virtual QFont QgisInterface::defaultStyleSheetFont ( )
pure virtualslot

Get reference font for initial qApp (may not be same as QgisApp)

virtual QMap<QString, QVariant> QgisInterface::defaultStyleSheetOptions ( )
pure virtualslot

Return changeable options built from settings and/or defaults.

virtual void QgisInterface::deleteComposer ( QgsComposerView composerView)
pure virtualslot

Deletes parent composer of composer view, after closing composer window.

virtual QToolBar* QgisInterface::digitizeToolBar ( )
pure virtualslot
virtual QgsComposerView* QgisInterface::duplicateComposer ( QgsComposerView composerView,
const QString title = QString() 
)
pure virtualslot

Duplicate an existing parent composer from composer view.

Parameters
composerViewpointer to existing composer view
titlewindow title for duplicated composer (one will be generated if empty)
Returns
pointer to duplicate composer's view
Note
dupicate composer window will be hidden until loaded, then shown and activated
virtual QList<QgsMapLayer *> QgisInterface::editableLayers ( bool  modified = false) const
pure virtualslot

Return vector layers in edit mode.

Parameters
modifiedwhether to return only layers that have been modified
Returns
list of layers in legend order, or empty list
virtual QMenu* QgisInterface::editMenu ( )
pure virtualslot
virtual Q_DECL_DEPRECATED QMenu* QgisInterface::fileMenu ( )
pure virtualslot

Accessors for inserting items into menus and toolbars.

An item can be inserted before any existing action.

virtual QToolBar* QgisInterface::fileToolBar ( )
pure virtualslot
virtual QMenu* QgisInterface::firstRightStandardMenu ( )
pure virtualslot
virtual QgsAttributeDialog* QgisInterface::getFeatureForm ( QgsVectorLayer l,
QgsFeature f 
)
pure virtualslot

Returns a feature form for a given feature.

Parameters
lThe layer for which the dialog will be created
fThe feature for which the dialog will be created
Returns
A feature form
virtual QMenu* QgisInterface::helpMenu ( )
pure virtualslot
virtual QToolBar* QgisInterface::helpToolBar ( )
pure virtualslot
void QgisInterface::initializationCompleted ( )
signal

This signal is emitted when the initialization is complete.

virtual void QgisInterface::insertAddLayerAction ( QAction action)
pure virtualslot

Add "add layer" action to layer menu.

virtual QMenu* QgisInterface::layerMenu ( )
pure virtualslot
void QgisInterface::layerSavedAs ( QgsMapLayer l,
const QString path 
)
signal

This signal is emitted when a layer has been saved using save as.

Note
added in version 2.7
virtual QToolBar* QgisInterface::layerToolBar ( )
pure virtualslot
virtual QgsLayerTreeMapCanvasBridge* QgisInterface::layerTreeCanvasBridge ( )
pure virtualslot

Returns a pointer to the layer tree canvas bridge.

Note
added in 2.12
virtual QgsLayerTreeView* QgisInterface::layerTreeView ( )
pure virtual
virtual QgsLegendInterface* QgisInterface::legendInterface ( )
pure virtual

Get pointer to legend interface.

virtual QWidget* QgisInterface::mainWindow ( )
pure virtualslot

Return a pointer to the main window (instance of QgisApp in case of QGIS)

virtual QgsMapCanvas* QgisInterface::mapCanvas ( )
pure virtualslot

Return a pointer to the map canvas.

virtual QToolBar* QgisInterface::mapNavToolToolBar ( )
pure virtualslot
virtual QgsMessageBar* QgisInterface::messageBar ( )
pure virtualslot

Return the message bar of the main app.

virtual int QgisInterface::messageTimeout ( )
pure virtualslot

Get timeout for timed messages: default of 5 seconds.

virtual QMenu* QgisInterface::newLayerMenu ( )
pure virtualslot
virtual void QgisInterface::newProject ( bool  thePromptToSaveFlag = false)
pure virtualslot

Start a blank project.

void QgisInterface::newProjectCreated ( )
signal

Emitted when starting an entirely new project.

Note
This is similar to projectRead(); plug-ins 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.
virtual bool QgisInterface::openFeatureForm ( QgsVectorLayer l,
QgsFeature f,
bool  updateFeatureOnly = false,
bool  showModal = true 
)
pure virtualslot

Open feature form.

Parameters
lvector layer
ffeature to show/modify
updateFeatureOnlyonly update the feature update (don't change any attributes of the layer) [UNUSED]
showModalif true, will wait for the dialog to be executed (only shown otherwise)
virtual void QgisInterface::openMessageLog ( )
pure virtualslot

Open the message log dock widget.

virtual Q_DECL_DEPRECATED void QgisInterface::openURL ( const QString url,
bool  useQgisDocDirectory = true 
)
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.

Parameters
urlURL to open
useQgisDocDirectoryIf true, the URL will be formed by concatenating url to the QGIS documentation directory path (prefix/share/doc)
Deprecated:
virtual QgsPluginManagerInterface* QgisInterface::pluginManagerInterface ( )
pure virtual
virtual QMenu* QgisInterface::pluginMenu ( )
pure virtualslot
virtual QToolBar* QgisInterface::pluginToolBar ( )
pure virtualslot
virtual void QgisInterface::preloadForm ( const QString uifile)
pure virtualslot

This method is only needed when using a UI form with a custom widget plugin and calling openFeatureForm or getFeatureForm from Python (PyQt4) and you havn't used the info tool first.

Python will crash bringing QGIS wtih 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 normal

More information here: http://qt-project.org/forums/viewthread/27098/

virtual QMenu* QgisInterface::projectMenu ( )
pure virtualslot
void QgisInterface::projectRead ( )
signal

Emitted when a project file is successfully read.

Note
This is useful for plug-ins that store properties with project files. A plug-in can connect to this signal. When it is emitted, the plug-in knows to then check the project properties for any relevant state.
virtual QMenu* QgisInterface::rasterMenu ( )
pure virtualslot
virtual QToolBar* QgisInterface::rasterToolBar ( )
pure virtualslot
virtual bool QgisInterface::registerMainWindowAction ( QAction action,
const QString defaultShortcut 
)
pure virtualslot

Register action to the shortcuts manager so its shortcut can be changed in GUI.

virtual void QgisInterface::removeAddLayerAction ( QAction action)
pure virtualslot

Remove "add layer" action from layer menu.

virtual void QgisInterface::removeDatabaseToolBarIcon ( QAction qAction)
pure virtualslot

Remove an action (icon) from the Database toolbar.

virtual void QgisInterface::removeDockWidget ( QDockWidget dockwidget)
pure virtualslot

Remove specified dock widget from main window (doesn't delete it).

virtual void QgisInterface::removePluginDatabaseMenu ( const QString name,
QAction action 
)
pure virtualslot

Remove action from the Database menu.

virtual void QgisInterface::removePluginMenu ( const QString name,
QAction action 
)
pure virtualslot

Remove action from the plugins menu.

virtual void QgisInterface::removePluginRasterMenu ( const QString name,
QAction action 
)
pure virtualslot

Remove action from the Raster menu.

virtual void QgisInterface::removePluginVectorMenu ( const QString name,
QAction action 
)
pure virtualslot

Remove action from the Vector menu.

virtual void QgisInterface::removePluginWebMenu ( const QString name,
QAction action 
)
pure virtualslot

Remove action from the Web menu.

virtual void QgisInterface::removeRasterToolBarIcon ( QAction qAction)
pure virtualslot

Remove an action (icon) from the Raster toolbar.

virtual void QgisInterface::removeToolBarIcon ( QAction qAction)
pure virtualslot

Remove an action (icon) from the plugin toolbar.

virtual void QgisInterface::removeVectorToolBarIcon ( QAction qAction)
pure virtualslot

Remove an action (icon) from the Vector toolbar.

virtual void QgisInterface::removeWebToolBarIcon ( QAction qAction)
pure virtualslot

Remove an action (icon) from the Web toolbar.

virtual void QgisInterface::removeWindow ( QAction action)
pure virtualslot

Remove window from Window menu.

Calling this is necessary only for windows which are hidden rather than deleted when closed.

virtual void QgisInterface::saveStyleSheetOptions ( const QMap< QString, QVariant > &  opts)
pure virtualslot

Save changed default option keys/values to user settings.

virtual bool QgisInterface::setActiveLayer ( QgsMapLayer )
pure virtualslot

Set the active layer (layer gets selected in the legend) returns true if the layer exists, false otherwise.

virtual QMenu* QgisInterface::settingsMenu ( )
pure virtualslot
virtual QDialog* QgisInterface::showAttributeTable ( QgsVectorLayer l,
const QString filterExpression = QString() 
)
pure virtualslot

Open attribute table dialog.

virtual void QgisInterface::showLayerProperties ( QgsMapLayer l)
pure virtualslot

Open layer properties dialog.

virtual bool QgisInterface::unregisterMainWindowAction ( QAction action)
pure virtualslot

Unregister a previously registered action.

(e.g. when plugin is going to be unloaded)

virtual QgsVectorLayerTools* QgisInterface::vectorLayerTools ( )
pure virtualslot

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.

Returns
An instance of the vector layer tools
virtual QMenu* QgisInterface::vectorMenu ( )
pure virtualslot
virtual QToolBar* QgisInterface::vectorToolBar ( )
pure virtualslot
virtual QMenu* QgisInterface::viewMenu ( )
pure virtualslot
virtual QMenu* QgisInterface::webMenu ( )
pure virtualslot
virtual QToolBar* QgisInterface::webToolBar ( )
pure virtualslot
virtual QMenu* QgisInterface::windowMenu ( )
pure virtualslot
virtual void QgisInterface::zoomFull ( )
pure virtualslot

Zoom to full extent of map layers.

virtual void QgisInterface::zoomToActiveLayer ( )
pure virtualslot

Zoom to extent of the active layer.

virtual void QgisInterface::zoomToNext ( )
pure virtualslot

Zoom to next view extent.

virtual void QgisInterface::zoomToPrevious ( )
pure virtualslot

Zoom to previous view extent.


The documentation for this class was generated from the following files: