2007-01-09 02:39:15 +00:00
|
|
|
|
2011-04-03 17:08:38 +00:00
|
|
|
/**
|
2007-01-09 02:39:15 +00:00
|
|
|
* \class QgisInterface
|
|
|
|
* \brief 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class QgisInterface : QObject
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgisinterface.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
/** Constructor */
|
|
|
|
QgisInterface();
|
|
|
|
|
|
|
|
/** Virtual destructor */
|
|
|
|
virtual ~QgisInterface();
|
2011-04-03 17:08:38 +00:00
|
|
|
|
2009-12-07 21:03:45 +00:00
|
|
|
/** Get pointer to legend interface
|
|
|
|
\note added in 1.4
|
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QgsLegendInterface* legendInterface() = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
public slots: // TODO: do these functions really need to be slots?
|
|
|
|
|
2012-10-05 21:54:54 +02:00
|
|
|
/* Exposed functions */
|
2012-09-26 18:18:44 -06:00
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
//! Zoom to full extent of map layers
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void zoomFull() = 0;
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
//! Zoom to previous view extent
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void zoomToPrevious() = 0;
|
|
|
|
|
2009-04-18 00:02:22 +00:00
|
|
|
//! Zoom to next view extent
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void zoomToNext() = 0;
|
|
|
|
|
|
|
|
//! Zoom to extent of the active layer
|
|
|
|
virtual void zoomToActiveLayer() = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
//! Add a vector layer
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey ) = 0;
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
//! Add a raster layer given a raster layer file name
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QgsRasterLayer* addRasterLayer( QString rasterLayerPath, QString baseName = QString() ) = 0;
|
|
|
|
|
2008-06-05 09:30:48 +00:00
|
|
|
//! Add a WMS layer
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QgsRasterLayer* addRasterLayer( const QString& url, const QString& layerName, const QString& providerKey ) = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
//! Add a project
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual bool addProject( QString theProject ) = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
//! Start a blank project
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void newProject( bool thePromptToSaveFlag = false ) = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
//! Get pointer to the active layer (layer selected in the legend)
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QgsMapLayer *activeLayer() = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
//! Set the active layer (layer gets selected in the legend)
|
|
|
|
//! returns true if the layer exists, false otherwise
|
2009-12-07 18:59:25 +00:00
|
|
|
//! added in 1.4
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual bool setActiveLayer( QgsMapLayer * ) = 0;
|
2009-12-07 18:59:25 +00:00
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
//! Add an icon to the plugins toolbar
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int addToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
//! Remove an action (icon) from the plugin toolbar
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void removeToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-20 17:53:57 +02:00
|
|
|
//! Add an icon to the Raster toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-20 17:53:57 +02:00
|
|
|
//! Remove an action (icon) from the Raster toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-20 17:59:16 +02:00
|
|
|
//! Add an icon to the Vector toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-20 17:59:16 +02:00
|
|
|
//! Remove an action (icon) from the Vector toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-20 18:03:44 +02:00
|
|
|
//! Add an icon to the Database toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-20 18:03:44 +02:00
|
|
|
//! Remove an action (icon) from the Database toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-23 20:17:16 +02:00
|
|
|
//! Add an icon to the Web toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual int addWebToolBarIcon( QAction *qAction ) = 0;
|
|
|
|
|
2011-12-23 20:17:16 +02:00
|
|
|
//! Remove an action (icon) from the Web toolbar
|
|
|
|
//! @note added in 2.0
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
|
2011-12-20 17:53:57 +02:00
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
//! Add toolbar with specified name
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QToolBar *addToolBar( QString name ) = 0 /Factory/;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
/** Return a pointer to the map canvas */
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QgsMapCanvas * mapCanvas() = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
/** Return a pointer to the main window (instance of QgisApp in case of QGIS) */
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QWidget * mainWindow() = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2012-09-02 22:41:20 +10:00
|
|
|
/** Return the message bar of the main app */
|
|
|
|
virtual QgsMessageBar * messageBar() = 0;
|
|
|
|
|
2009-02-27 13:57:26 +00:00
|
|
|
/**Return mainwindows / composer views of running composer instances (currently only one)*/
|
|
|
|
virtual QList<QgsComposerView*> activeComposers() = 0;
|
2009-02-25 19:15:23 +00:00
|
|
|
|
2013-01-18 18:55:31 -07:00
|
|
|
/** Return changeable options built from settings and/or defaults
|
|
|
|
* @note (added in 1.9)
|
|
|
|
*/
|
|
|
|
virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
|
|
|
|
|
|
|
|
/** Generate stylesheet
|
|
|
|
* @param opts generated default option values, or a changed copy of them
|
|
|
|
* @note added in 1.9
|
|
|
|
*/
|
|
|
|
virtual void buildStyleSheet( const QMap<QString, QVariant>& opts ) = 0;
|
|
|
|
|
|
|
|
/** Save changed default option keys/values to user settings
|
|
|
|
* @note added in 1.9
|
|
|
|
*/
|
|
|
|
virtual void saveStyleSheetOptions( const QMap<QString, QVariant>& opts ) = 0;
|
|
|
|
|
|
|
|
/** Get reference font for initial qApp (may not be same as QgisApp)
|
|
|
|
* @note added in 1.9
|
|
|
|
*/
|
|
|
|
virtual QFont defaultStyleSheetFont() = 0;
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
/** Add action to the plugins menu */
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void addPluginToMenu( QString name, QAction* action ) = 0;
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
/** Remove action from the plugins menu */
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void removePluginMenu( QString name, QAction* action ) = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** Add "add layer" action to layer menu
|
2011-03-13 14:22:21 +00:00
|
|
|
* @note added in 1.7
|
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void insertAddLayerAction( QAction *action ) = 0;
|
2011-03-13 14:22:21 +00:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** Remove "add layer" action from layer menu
|
2011-03-13 14:22:21 +00:00
|
|
|
* @note added in 1.7
|
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void removeAddLayerAction( QAction *action ) = 0;
|
2011-03-13 14:22:21 +00:00
|
|
|
|
2010-11-14 14:00:57 +00:00
|
|
|
/** Add action to the Database menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 1.7
|
|
|
|
*/
|
|
|
|
virtual void addPluginToDatabaseMenu( QString name, QAction* action ) = 0;
|
2011-03-13 14:22:21 +00:00
|
|
|
|
|
|
|
/** Remove action from the Database menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 1.7
|
|
|
|
*/
|
|
|
|
virtual void removePluginDatabaseMenu( QString name, QAction* action ) = 0;
|
2010-11-14 14:00:57 +00:00
|
|
|
|
2011-12-20 17:53:57 +02:00
|
|
|
/** Add action to the Raster menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 2.0
|
|
|
|
*/
|
|
|
|
virtual void addPluginToRasterMenu( QString name, QAction* action ) = 0;
|
2011-12-20 17:53:57 +02:00
|
|
|
|
|
|
|
/** Remove action from the Raster menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 2.0
|
|
|
|
*/
|
|
|
|
virtual void removePluginRasterMenu( QString name, QAction* action ) = 0;
|
2011-12-20 17:53:57 +02:00
|
|
|
|
2011-12-20 17:59:16 +02:00
|
|
|
/** Add action to the Vector menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 2.0
|
|
|
|
*/
|
|
|
|
virtual void addPluginToVectorMenu( QString name, QAction* action ) = 0;
|
2011-12-20 17:59:16 +02:00
|
|
|
|
|
|
|
/** Remove action from the Vector menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 2.0
|
|
|
|
*/
|
|
|
|
virtual void removePluginVectorMenu( QString name, QAction* action ) = 0;
|
2011-12-20 17:59:16 +02:00
|
|
|
|
2011-12-23 20:17:16 +02:00
|
|
|
/** Add action to the Web menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 2.0
|
|
|
|
*/
|
|
|
|
virtual void addPluginToWebMenu( QString name, QAction* action ) = 0;
|
2011-12-23 20:17:16 +02:00
|
|
|
|
|
|
|
/** Remove action from the Web menu
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 2.0
|
|
|
|
*/
|
|
|
|
virtual void removePluginWebMenu( QString name, QAction* action ) = 0;
|
2011-12-23 20:17:16 +02:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** Add a dock widget to the main window */
|
|
|
|
virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dockwidget ) = 0;
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2011-03-13 14:22:21 +00:00
|
|
|
/** Remove specified dock widget from main window (doesn't delete it).
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note Added in 1.1
|
|
|
|
*/
|
|
|
|
virtual void removeDockWidget( QDockWidget * dockwidget ) = 0;
|
2009-03-16 14:22:07 +00:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** open layer properties dialog
|
|
|
|
\note added in 1.5
|
2010-01-23 21:50:09 +00:00
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void showLayerProperties( QgsMapLayer *l ) = 0;
|
2010-01-23 21:50:09 +00:00
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
/** open attribute table dialog
|
|
|
|
\note added in 1.7
|
2010-11-23 12:25:24 +00:00
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual void showAttributeTable( QgsVectorLayer *l ) = 0;
|
2010-11-23 12:25:24 +00:00
|
|
|
|
2008-09-05 05:46:56 +00:00
|
|
|
/** Add window to Window menu. The action title is the window title
|
|
|
|
* and the action should raise, unminimize and activate the window. */
|
|
|
|
virtual void addWindow( QAction *action ) = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2008-09-05 05:46:56 +00:00
|
|
|
/** Remove window from Window menu. Calling this is necessary only for
|
|
|
|
* windows which are hidden rather than deleted when closed. */
|
|
|
|
virtual void removeWindow( QAction *action ) = 0;
|
|
|
|
|
2009-05-05 21:52:46 +00:00
|
|
|
/** Register action to the shortcuts manager so its shortcut can be changed in GUI
|
2012-09-24 02:28:15 +02:00
|
|
|
\note added in 1.2
|
2009-05-05 21:52:46 +00:00
|
|
|
*/
|
|
|
|
virtual bool registerMainWindowAction( QAction* action, QString defaultShortcut ) = 0;
|
|
|
|
|
|
|
|
/** Unregister a previously registered action. (e.g. when plugin is going to be unloaded)
|
2012-09-24 02:28:15 +02:00
|
|
|
\note added in 1.2
|
2009-05-05 21:52:46 +00:00
|
|
|
*/
|
|
|
|
virtual bool unregisterMainWindowAction( QAction* action ) = 0;
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
// @todo is this deprecated in favour of QgsContextHelp?
|
|
|
|
/** Open a url in the users browser. By default the QGIS doc directory is used
|
|
|
|
* as the base for the URL. To open a URL that is not relative to the installed
|
|
|
|
* QGIS documentation, set useQgisDocDirectory to false.
|
|
|
|
* @param url URL to open
|
|
|
|
* @param useQgisDocDirectory If true, the URL will be formed by concatenating
|
|
|
|
* url to the QGIS documentation directory path (prefix/share/doc)
|
|
|
|
* @deprecated
|
|
|
|
*/
|
|
|
|
virtual void openURL( QString url, bool useQgisDocDirectory = true ) = 0 /Deprecated/;
|
|
|
|
|
2008-09-05 05:46:56 +00:00
|
|
|
/** Accessors for inserting items into menus and toolbars.
|
|
|
|
* An item can be inserted before any existing action.
|
|
|
|
*/
|
|
|
|
|
|
|
|
//! Menus
|
|
|
|
virtual QMenu *fileMenu() = 0;
|
|
|
|
virtual QMenu *editMenu() = 0;
|
|
|
|
virtual QMenu *viewMenu() = 0;
|
|
|
|
virtual QMenu *layerMenu() = 0;
|
|
|
|
virtual QMenu *settingsMenu() = 0;
|
|
|
|
virtual QMenu *pluginMenu() = 0;
|
2011-12-20 17:53:57 +02:00
|
|
|
virtual QMenu *rasterMenu() = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \note added in 1.7
|
|
|
|
*/
|
|
|
|
virtual QMenu *databaseMenu() = 0;
|
|
|
|
/** \note added in 2.0
|
|
|
|
*/
|
2011-12-20 17:59:16 +02:00
|
|
|
virtual QMenu *vectorMenu() = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \note added in 2.0
|
|
|
|
*/
|
2011-12-23 20:17:16 +02:00
|
|
|
virtual QMenu *webMenu() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QMenu *firstRightStandardMenu() = 0;
|
|
|
|
virtual QMenu *windowMenu() = 0;
|
|
|
|
virtual QMenu *helpMenu() = 0;
|
|
|
|
|
|
|
|
//! ToolBars
|
|
|
|
virtual QToolBar *fileToolBar() = 0;
|
|
|
|
virtual QToolBar *layerToolBar() = 0;
|
|
|
|
virtual QToolBar *mapNavToolToolBar() = 0;
|
|
|
|
virtual QToolBar *digitizeToolBar() = 0;
|
2010-03-27 18:19:19 +00:00
|
|
|
virtual QToolBar *advancedDigitizeToolBar() = 0; // added in v1.5
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QToolBar *attributesToolBar() = 0;
|
|
|
|
virtual QToolBar *pluginToolBar() = 0;
|
|
|
|
virtual QToolBar *helpToolBar() = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \note added in 1.7
|
|
|
|
*/
|
2011-04-03 17:08:38 +00:00
|
|
|
virtual QToolBar *rasterToolBar() = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \note added in 2.0
|
|
|
|
*/
|
2011-12-20 17:59:16 +02:00
|
|
|
virtual QToolBar *vectorToolBar() = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \note added in 2.0
|
|
|
|
*/
|
2011-12-20 18:03:44 +02:00
|
|
|
virtual QToolBar *databaseToolBar() = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
/** \note added in 2.0
|
|
|
|
*/
|
2011-12-23 20:17:16 +02:00
|
|
|
virtual QToolBar *webToolBar() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
|
|
|
|
//! File menu actions
|
|
|
|
virtual QAction *actionNewProject() = 0;
|
|
|
|
virtual QAction *actionOpenProject() = 0;
|
|
|
|
virtual QAction *actionSaveProject() = 0;
|
|
|
|
virtual QAction *actionSaveProjectAs() = 0;
|
|
|
|
virtual QAction *actionSaveMapAsImage() = 0;
|
|
|
|
virtual QAction *actionProjectProperties() = 0;
|
|
|
|
virtual QAction *actionPrintComposer() = 0;
|
2013-02-20 13:10:21 -07:00
|
|
|
virtual QAction *actionShowComposerManager() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QAction *actionExit() = 0;
|
|
|
|
|
|
|
|
//! Edit menu actions
|
|
|
|
virtual QAction *actionCutFeatures() = 0;
|
|
|
|
virtual QAction *actionCopyFeatures() = 0;
|
|
|
|
virtual QAction *actionPasteFeatures() = 0;
|
2011-05-06 00:48:29 +02:00
|
|
|
virtual QAction *actionAddFeature() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QAction *actionDeleteSelected() = 0;
|
|
|
|
virtual QAction *actionMoveFeature() = 0;
|
|
|
|
virtual QAction *actionSplitFeatures() = 0;
|
|
|
|
virtual QAction *actionAddRing() = 0;
|
2012-09-24 02:28:15 +02:00
|
|
|
virtual QAction *actionAddPart() = 0;
|
2010-04-30 21:19:22 +00:00
|
|
|
virtual QAction *actionSimplifyFeature() = 0;
|
|
|
|
virtual QAction *actionDeleteRing() = 0;
|
|
|
|
virtual QAction *actionDeletePart() = 0;
|
|
|
|
virtual QAction *actionNodeTool() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
|
|
|
|
//! View menu actions
|
|
|
|
virtual QAction *actionPan() = 0;
|
2012-06-26 23:44:06 +10:00
|
|
|
virtual QAction *actionTouch() = 0;
|
2012-01-18 11:57:35 +02:00
|
|
|
virtual QAction *actionPanToSelected() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QAction *actionZoomIn() = 0;
|
|
|
|
virtual QAction *actionZoomOut() = 0;
|
|
|
|
virtual QAction *actionSelect() = 0;
|
2010-08-12 16:59:57 +00:00
|
|
|
virtual QAction *actionSelectRectangle() = 0;
|
|
|
|
virtual QAction *actionSelectPolygon() = 0;
|
|
|
|
virtual QAction *actionSelectFreehand() = 0;
|
|
|
|
virtual QAction *actionSelectRadius() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QAction *actionIdentify() = 0;
|
|
|
|
virtual QAction *actionMeasure() = 0;
|
|
|
|
virtual QAction *actionMeasureArea() = 0;
|
|
|
|
virtual QAction *actionZoomFullExtent() = 0;
|
|
|
|
virtual QAction *actionZoomToLayer() = 0;
|
|
|
|
virtual QAction *actionZoomToSelected() = 0;
|
|
|
|
virtual QAction *actionZoomLast() = 0;
|
|
|
|
virtual QAction *actionZoomActualSize() = 0;
|
|
|
|
virtual QAction *actionMapTips() = 0;
|
|
|
|
virtual QAction *actionNewBookmark() = 0;
|
|
|
|
virtual QAction *actionShowBookmarks() = 0;
|
|
|
|
virtual QAction *actionDraw() = 0;
|
|
|
|
|
|
|
|
//! Layer menu actions
|
|
|
|
virtual QAction *actionNewVectorLayer() = 0;
|
|
|
|
virtual QAction *actionAddOgrLayer() = 0;
|
|
|
|
virtual QAction *actionAddRasterLayer() = 0;
|
|
|
|
virtual QAction *actionAddPgLayer() = 0;
|
|
|
|
virtual QAction *actionAddWmsLayer() = 0;
|
2012-11-27 10:35:22 -07:00
|
|
|
/** @note added in 1.9 */
|
|
|
|
virtual QAction *actionCopyLayerStyle() = 0;
|
|
|
|
/** @note added in 1.9 */
|
|
|
|
virtual QAction *actionPasteLayerStyle() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QAction *actionOpenTable() = 0;
|
|
|
|
virtual QAction *actionToggleEditing() = 0;
|
2012-12-01 17:16:01 -07:00
|
|
|
/** @note added in 1.9 */
|
2012-12-31 16:26:46 -07:00
|
|
|
virtual QAction *actionSaveActiveLayerEdits() = 0;
|
|
|
|
/** @note added in 1.9 */
|
2012-12-18 22:51:14 -07:00
|
|
|
virtual QAction *actionAllEdits() = 0;
|
|
|
|
/** @note added in 1.9 */
|
2012-12-01 17:16:01 -07:00
|
|
|
virtual QAction *actionSaveEdits() = 0;
|
|
|
|
/** @note added in 1.9 */
|
|
|
|
virtual QAction *actionSaveAllEdits() = 0;
|
2012-12-18 22:51:14 -07:00
|
|
|
/** @note added in 1.9 */
|
|
|
|
virtual QAction *actionRollbackEdits() = 0;
|
|
|
|
/** @note added in 1.9 */
|
|
|
|
virtual QAction *actionRollbackAllEdits() = 0;
|
|
|
|
/** @note added in 1.9 */
|
|
|
|
virtual QAction *actionCancelEdits() = 0;
|
|
|
|
/** @note added in 1.9 */
|
|
|
|
virtual QAction *actionCancelAllEdits() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QAction *actionLayerSaveAs() = 0;
|
|
|
|
virtual QAction *actionLayerSelectionSaveAs() = 0;
|
|
|
|
virtual QAction *actionRemoveLayer() = 0;
|
2012-11-27 10:35:22 -07:00
|
|
|
/** @note added in 1.9 */
|
2012-10-31 20:04:24 -06:00
|
|
|
virtual QAction *actionDuplicateLayer() = 0;
|
2008-09-05 05:46:56 +00:00
|
|
|
virtual QAction *actionLayerProperties() = 0;
|
|
|
|
virtual QAction *actionAddToOverview() = 0;
|
|
|
|
virtual QAction *actionAddAllToOverview() = 0;
|
|
|
|
virtual QAction *actionRemoveAllFromOverview() = 0;
|
|
|
|
virtual QAction *actionHideAllLayers() = 0;
|
|
|
|
virtual QAction *actionShowAllLayers() = 0;
|
|
|
|
|
|
|
|
//! Plugin menu actions
|
|
|
|
virtual QAction *actionManagePlugins() = 0;
|
|
|
|
virtual QAction *actionPluginListSeparator() = 0;
|
|
|
|
virtual QAction *actionShowPythonDialog() = 0;
|
|
|
|
|
|
|
|
//! Settings menu actions
|
|
|
|
virtual QAction *actionToggleFullScreen() = 0;
|
|
|
|
virtual QAction *actionOptions() = 0;
|
|
|
|
virtual QAction *actionCustomProjection() = 0;
|
|
|
|
|
|
|
|
//! Help menu actions
|
|
|
|
virtual QAction *actionHelpContents() = 0;
|
|
|
|
virtual QAction *actionQgisHomePage() = 0;
|
|
|
|
virtual QAction *actionCheckQgisVersion() = 0;
|
|
|
|
virtual QAction *actionAbout() = 0;
|
|
|
|
|
2012-09-24 02:28:15 +02:00
|
|
|
//! Open feature form
|
|
|
|
// returns true when dialog was accepted
|
2010-09-17 12:39:15 +00:00
|
|
|
// @added in 1.6
|
2010-09-25 20:11:22 +00:00
|
|
|
virtual bool openFeatureForm( QgsVectorLayer *l, QgsFeature &f, bool updateFeatureOnly = false ) = 0;
|
2010-09-17 12:39:15 +00:00
|
|
|
|
2012-12-18 22:51:14 -07:00
|
|
|
/** Return vector layers in edit mode
|
|
|
|
* @param modified whether to return only layers that have been modified
|
|
|
|
* @returns list of layers in legend order, or empty list
|
|
|
|
* @note added in 1.9 */
|
|
|
|
virtual QList<QgsMapLayer *> editableLayers( bool modified = false ) const = 0;
|
|
|
|
|
2013-01-13 17:10:47 -07:00
|
|
|
/** Get timeout for timed messages: default of 5 seconds
|
|
|
|
* @note added in 1.9 */
|
|
|
|
virtual int messageTimeout() = 0;
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
signals:
|
|
|
|
/** Emited whenever current (selected) layer changes.
|
|
|
|
* The pointer to layer can be null if no layer is selected
|
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
void currentLayerChanged( QgsMapLayer * layer );
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2009-12-08 10:35:07 +00:00
|
|
|
/**This signal is emitted when a new composer instance has been created
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 1.4
|
|
|
|
*/
|
2009-12-08 10:35:07 +00:00
|
|
|
void composerAdded( QgsComposerView* v );
|
|
|
|
|
|
|
|
/**This signal is emitted before a new composer instance is going to be removed
|
2012-09-24 02:28:15 +02:00
|
|
|
* @note added in 1.4
|
|
|
|
*/
|
2009-12-08 10:35:07 +00:00
|
|
|
void composerWillBeRemoved( QgsComposerView* v );
|
2012-09-24 02:28:15 +02:00
|
|
|
/**This signal is emitted when the initialization is complete
|
|
|
|
* @note added in version 1.6
|
|
|
|
*/
|
2011-04-03 17:08:38 +00:00
|
|
|
void initializationCompleted();
|
2010-10-30 09:33:01 +00:00
|
|
|
/** 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.
|
|
|
|
|
|
|
|
Added in v1.6
|
|
|
|
*/
|
|
|
|
void projectRead();
|
|
|
|
/** 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.
|
|
|
|
|
|
|
|
Added in v1.6
|
|
|
|
*/
|
2012-09-24 02:28:15 +02:00
|
|
|
void newProjectCreated();
|
2007-01-09 02:39:15 +00:00
|
|
|
};
|