18 #ifndef QGISINTERFACE_H 19 #define QGISINTERFACE_H 102 virtual void addCustomActionForLayerType( QAction *action, QString menu,
111 virtual void addCustomActionForLayer( QAction *action,
QgsMapLayer *layer ) = 0;
117 virtual bool removeCustomActionForLayerType( QAction *action ) = 0;
123 virtual QList< QgsMapCanvas * > mapCanvases() = 0;
130 virtual QgsMapCanvas *createNewMapCanvas(
const QString &name ) = 0;
137 virtual void closeMapCanvas(
const QString &name ) = 0;
143 virtual QSize iconSize(
bool dockedToolbar =
false )
const = 0;
149 virtual QList<QgsMapLayer *> editableLayers(
bool modified =
false )
const = 0;
165 virtual QWidget *mainWindow() = 0;
174 virtual QList<QgsLayoutDesignerInterface *> openLayoutDesigners() = 0;
178 virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
181 virtual QFont defaultStyleSheetFont() = 0;
197 virtual QMenu *projectMenu() = 0;
202 virtual QMenu *editMenu() = 0;
207 virtual QMenu *viewMenu() = 0;
212 virtual QMenu *layerMenu() = 0;
217 virtual QMenu *newLayerMenu() = 0;
223 virtual QMenu *addLayerMenu() = 0;
228 virtual QMenu *settingsMenu() = 0;
233 virtual QMenu *pluginMenu() = 0;
238 virtual QMenu *rasterMenu() = 0;
243 virtual QMenu *databaseMenu() = 0;
248 virtual QMenu *vectorMenu() = 0;
253 virtual QMenu *webMenu() = 0;
262 virtual QMenu *firstRightStandardMenu() = 0;
267 virtual QMenu *windowMenu() = 0;
272 virtual QMenu *helpMenu() = 0;
279 virtual QToolBar *fileToolBar() = 0;
284 virtual QToolBar *layerToolBar() = 0;
290 virtual QToolBar *dataSourceManagerToolBar() = 0;
295 virtual QToolBar *mapNavToolToolBar() = 0;
300 virtual QToolBar *digitizeToolBar() = 0;
305 virtual QToolBar *advancedDigitizeToolBar() = 0;
311 virtual QToolBar *shapeDigitizeToolBar() = 0;
316 virtual QToolBar *attributesToolBar() = 0;
321 virtual QToolBar *pluginToolBar() = 0;
326 virtual QToolBar *helpToolBar() = 0;
331 virtual QToolBar *rasterToolBar() = 0;
336 virtual QToolBar *vectorToolBar() = 0;
341 virtual QToolBar *databaseToolBar() = 0;
346 virtual QToolBar *webToolBar() = 0;
350 virtual QAction *actionNewProject() = 0;
352 virtual QAction *actionOpenProject() = 0;
354 virtual QAction *actionSaveProject() = 0;
356 virtual QAction *actionSaveProjectAs() = 0;
358 virtual QAction *actionSaveMapAsImage() = 0;
360 virtual QAction *actionProjectProperties() = 0;
363 virtual QAction *actionCreatePrintLayout() = 0;
366 virtual QAction *actionShowLayoutManager() = 0;
368 virtual QAction *actionExit() = 0;
373 virtual QAction *actionCutFeatures() = 0;
375 virtual QAction *actionCopyFeatures() = 0;
377 virtual QAction *actionPasteFeatures() = 0;
379 virtual QAction *actionAddFeature() = 0;
381 virtual QAction *actionDeleteSelected() = 0;
383 virtual QAction *actionMoveFeature() = 0;
385 virtual QAction *actionSplitFeatures() = 0;
387 virtual QAction *actionSplitParts() = 0;
389 virtual QAction *actionAddRing() = 0;
391 virtual QAction *actionAddPart() = 0;
393 virtual QAction *actionSimplifyFeature() = 0;
395 virtual QAction *actionDeleteRing() = 0;
397 virtual QAction *actionDeletePart() = 0;
403 virtual QAction *actionVertexTool() = 0;
410 virtual QAction *actionVertexToolActiveLayer() = 0;
414 virtual QAction *actionPan() = 0;
416 virtual QAction *actionPanToSelected() = 0;
418 virtual QAction *actionZoomIn() = 0;
420 virtual QAction *actionZoomOut() = 0;
422 virtual QAction *actionSelect() = 0;
424 virtual QAction *actionSelectRectangle() = 0;
426 virtual QAction *actionSelectPolygon() = 0;
428 virtual QAction *actionSelectFreehand() = 0;
430 virtual QAction *actionSelectRadius() = 0;
432 virtual QAction *actionIdentify() = 0;
434 virtual QAction *actionFeatureAction() = 0;
436 virtual QAction *actionMeasure() = 0;
438 virtual QAction *actionMeasureArea() = 0;
440 virtual QAction *actionZoomFullExtent() = 0;
442 virtual QAction *actionZoomToLayer() = 0;
444 virtual QAction *actionZoomToSelected() = 0;
446 virtual QAction *actionZoomLast() = 0;
448 virtual QAction *actionZoomNext() = 0;
450 virtual QAction *actionZoomActualSize() = 0;
452 virtual QAction *actionMapTips() = 0;
454 virtual QAction *actionNewBookmark() = 0;
456 virtual QAction *actionShowBookmarks() = 0;
458 virtual QAction *actionDraw() = 0;
461 virtual QAction *actionNewVectorLayer() = 0;
462 virtual QAction *actionAddOgrLayer() = 0;
463 virtual QAction *actionAddRasterLayer() = 0;
464 virtual QAction *actionAddPgLayer() = 0;
465 virtual QAction *actionAddWmsLayer() = 0;
467 virtual QAction *actionAddAfsLayer() = 0;
469 virtual QAction *actionAddAmsLayer() = 0;
470 virtual QAction *actionCopyLayerStyle() = 0;
471 virtual QAction *actionPasteLayerStyle() = 0;
472 virtual QAction *actionOpenTable() = 0;
473 virtual QAction *actionOpenFieldCalculator() = 0;
479 virtual QAction *actionOpenStatisticalSummary() = 0;
481 virtual QAction *actionToggleEditing() = 0;
482 virtual QAction *actionSaveActiveLayerEdits() = 0;
483 virtual QAction *actionAllEdits() = 0;
484 virtual QAction *actionSaveEdits() = 0;
485 virtual QAction *actionSaveAllEdits() = 0;
486 virtual QAction *actionRollbackEdits() = 0;
487 virtual QAction *actionRollbackAllEdits() = 0;
488 virtual QAction *actionCancelEdits() = 0;
489 virtual QAction *actionCancelAllEdits() = 0;
490 virtual QAction *actionLayerSaveAs() = 0;
491 virtual QAction *actionDuplicateLayer() = 0;
492 virtual QAction *actionLayerProperties() = 0;
493 virtual QAction *actionAddToOverview() = 0;
494 virtual QAction *actionAddAllToOverview() = 0;
495 virtual QAction *actionRemoveAllFromOverview() = 0;
496 virtual QAction *actionHideAllLayers() = 0;
497 virtual QAction *actionShowAllLayers() = 0;
498 virtual QAction *actionHideSelectedLayers() = 0;
504 virtual QAction *actionHideDeselectedLayers() = 0;
505 virtual QAction *actionShowSelectedLayers() = 0;
508 virtual QAction *actionManagePlugins() = 0;
509 virtual QAction *actionPluginListSeparator() = 0;
510 virtual QAction *actionShowPythonDialog() = 0;
513 virtual QAction *actionToggleFullScreen() = 0;
514 virtual QAction *actionOptions() = 0;
515 virtual QAction *actionCustomProjection() = 0;
518 virtual QAction *actionHelpContents() = 0;
519 virtual QAction *actionQgisHomePage() = 0;
520 virtual QAction *actionCheckQgisVersion() = 0;
521 virtual QAction *actionAbout() = 0;
533 virtual int messageTimeout() = 0;
549 virtual void takeAppScreenShots(
const QString &saveDirectory,
const int categories = 0 ) {Q_UNUSED( saveDirectory ); Q_UNUSED( categories );}
558 virtual void zoomFull() = 0;
563 virtual void zoomToPrevious() = 0;
568 virtual void zoomToNext() = 0;
573 virtual void zoomToActiveLayer() = 0;
578 virtual QgsVectorLayer *addVectorLayer(
const QString &vectorLayerPath,
const QString &baseName,
const QString &providerKey ) = 0;
583 virtual QgsRasterLayer *addRasterLayer(
const QString &rasterLayerPath,
const QString &baseName = QString() ) = 0;
588 virtual QgsRasterLayer *addRasterLayer(
const QString &url,
const QString &layerName,
const QString &providerKey ) = 0;
593 virtual QgsMeshLayer *addMeshLayer(
const QString &url,
const QString &baseName,
const QString &providerKey ) = 0;
596 virtual bool addProject(
const QString &project ) = 0;
598 virtual void newProject(
bool promptToSaveFlag =
false ) = 0;
607 virtual void reloadConnections( ) = 0;
619 virtual void copySelectionToClipboard(
QgsMapLayer * ) = 0;
625 virtual void pasteFromClipboard(
QgsMapLayer * ) = 0;
628 virtual int addToolBarIcon( QAction *qAction ) = 0;
638 virtual QAction *addToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
641 virtual void removeToolBarIcon( QAction *qAction ) = 0;
651 virtual QAction *addRasterToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
654 virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
657 virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
660 virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
670 virtual QAction *addVectorToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
673 virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
676 virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
686 virtual QAction *addDatabaseToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
689 virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
692 virtual int addWebToolBarIcon( QAction *qAction ) = 0;
702 virtual QAction *addWebToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
705 virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
708 virtual QToolBar *addToolBar(
const QString &name ) = 0
SIP_FACTORY;
714 virtual void addToolBar( QToolBar *toolbar SIP_TRANSFER, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0;
719 virtual void openMessageLog() = 0;
722 virtual void addUserInputWidget( QWidget *widget ) = 0;
728 virtual void showLayoutManager() = 0;
743 virtual void showOptionsDialog( QWidget *parent =
nullptr,
const QString ¤tPage = QString() ) = 0;
749 virtual void buildStyleSheet(
const QMap<QString, QVariant> &opts ) = 0;
752 virtual void saveStyleSheetOptions(
const QMap<QString, QVariant> &opts ) = 0;
755 virtual void addPluginToMenu(
const QString &name, QAction *action ) = 0;
758 virtual void removePluginMenu(
const QString &name, QAction *action ) = 0;
761 virtual void insertAddLayerAction( QAction *action ) = 0;
764 virtual void removeAddLayerAction( QAction *action ) = 0;
767 virtual void addPluginToDatabaseMenu(
const QString &name, QAction *action ) = 0;
770 virtual void removePluginDatabaseMenu(
const QString &name, QAction *action ) = 0;
773 virtual void addPluginToRasterMenu(
const QString &name, QAction *action ) = 0;
776 virtual void removePluginRasterMenu(
const QString &name, QAction *action ) = 0;
779 virtual void addPluginToVectorMenu(
const QString &name, QAction *action ) = 0;
782 virtual void removePluginVectorMenu(
const QString &name, QAction *action ) = 0;
785 virtual void addPluginToWebMenu(
const QString &name, QAction *action ) = 0;
788 virtual void removePluginWebMenu(
const QString &name, QAction *action ) = 0;
795 virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget ) = 0;
802 virtual void removeDockWidget( QDockWidget *dockwidget ) = 0;
805 virtual void showLayerProperties(
QgsMapLayer *l ) = 0;
808 virtual QDialog *showAttributeTable(
QgsVectorLayer *l,
const QString &filterExpression = QString() ) = 0;
813 virtual void addWindow( QAction *action ) = 0;
818 virtual void removeWindow( QAction *action ) = 0;
821 virtual bool registerMainWindowAction( QAction *action,
const QString &defaultShortcut ) = 0;
824 virtual bool unregisterMainWindowAction( QAction *action ) = 0;
912 virtual void openURL(
const QString &url,
bool useQgisDocDirectory =
true ) = 0
SIP_DEPRECATED;
922 virtual bool openFeatureForm(
QgsVectorLayer *l,
QgsFeature &f,
bool updateFeatureOnly =
false,
bool showModal =
true ) = 0;
946 virtual void preloadForm(
const QString &uifile ) = 0;
956 virtual void registerLocatorFilter(
QgsLocatorFilter *filter SIP_TRANSFER ) = 0;
977 virtual void invalidateLocatorResults() = 0;
1007 void currentThemeChanged(
const QString &theme );
1031 void layoutDesignerClosed();
1036 void initializationCompleted();
1054 void newProjectCreated();
1060 void layerSavedAs(
QgsMapLayer *l,
const QString &path );
1065 #endif //#ifndef QGISINTERFACE_H
Base class for all map layer types.
The QgsLayerTreeView class extends QTreeView and provides some additional functionality when working ...
The QgsLayerTreeMapCanvasBridge class takes care of updates of layer set for QgsMapCanvas from a laye...
This class provides qgis with the ability to render raster datasets onto the mapcanvas.
#define Q_NOWARN_DEPRECATED_PUSH
A bar for displaying non-blocking messages to the user.
A common interface for layout designer dialogs and widgets.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Abstract base class that may be implemented to handle new types of data to be dropped in QGIS layouts...
Map canvas is a class for displaying all GIS data types on a canvas.
Abstract base class that may be implemented to handle new types of data to be dropped in QGIS...
LayerType
Types of layers that can be added to a map.
Abstract base class for filters which collect locator results.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
QgisInterface Abstract base class defining interfaces exposed by QgisApp and made available to plugin...
#define Q_NOWARN_DEPRECATED_POP
This class represents a coordinate reference system (CRS).
This class has all the configuration of snapping and can return answers to snapping queries...
A model for showing available data sources and other items in a structured tree.
Represents a mesh layer supporting display of data on structured or unstructured meshes.
Interface for master layout type objects, such as print layouts and reports.
Represents a vector layer which manages a vector based data sets.
virtual void takeAppScreenShots(const QString &saveDirectory, const int categories=0)
Take screenshots for user documentation.
A proxy widget for QStatusBar.