18 #ifndef QGISINTERFACE_H
19 #define QGISINTERFACE_H
113 virtual void addCustomActionForLayerType( QAction *action, QString menu,
122 virtual void addCustomActionForLayer( QAction *action,
QgsMapLayer *layer ) = 0;
128 virtual bool removeCustomActionForLayerType( QAction *action ) = 0;
134 virtual QList< QgsMapCanvas * > mapCanvases() = 0;
141 virtual QgsMapCanvas *createNewMapCanvas(
const QString &name ) = 0;
148 virtual void closeMapCanvas(
const QString &name ) = 0;
154 virtual QSize
iconSize(
bool dockedToolbar =
false )
const = 0;
161 virtual QList<QgsMapLayer *> editableLayers(
bool modified =
false )
const = 0;
173 virtual QList<QgsMapDecoration *> activeDecorations() = 0;
183 virtual QWidget *mainWindow() = 0;
192 virtual QList<QgsLayoutDesignerInterface *> openLayoutDesigners() = 0;
196 virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
199 virtual QFont defaultStyleSheetFont() = 0;
215 virtual QMenu *projectMenu() = 0;
220 virtual QMenu *editMenu() = 0;
225 virtual QMenu *viewMenu() = 0;
230 virtual QMenu *layerMenu() = 0;
235 virtual QMenu *newLayerMenu() = 0;
241 virtual QMenu *addLayerMenu() = 0;
246 virtual QMenu *settingsMenu() = 0;
251 virtual QMenu *pluginMenu() = 0;
261 virtual QMenu *pluginHelpMenu() = 0;
266 virtual QMenu *rasterMenu() = 0;
271 virtual QMenu *databaseMenu() = 0;
276 virtual QMenu *vectorMenu() = 0;
281 virtual QMenu *webMenu() = 0;
290 virtual QMenu *firstRightStandardMenu() = 0;
295 virtual QMenu *windowMenu() = 0;
300 virtual QMenu *helpMenu() = 0;
307 virtual QToolBar *fileToolBar() = 0;
312 virtual QToolBar *layerToolBar() = 0;
318 virtual QToolBar *dataSourceManagerToolBar() = 0;
323 virtual QToolBar *mapNavToolToolBar() = 0;
328 virtual QToolBar *digitizeToolBar() = 0;
333 virtual QToolBar *advancedDigitizeToolBar() = 0;
339 virtual QToolBar *shapeDigitizeToolBar() = 0;
344 virtual QToolBar *attributesToolBar() = 0;
350 virtual QToolBar *selectionToolBar() = 0;
355 virtual QToolBar *pluginToolBar() = 0;
360 virtual QToolBar *helpToolBar() = 0;
365 virtual QToolBar *rasterToolBar() = 0;
370 virtual QToolBar *vectorToolBar() = 0;
375 virtual QToolBar *databaseToolBar() = 0;
380 virtual QToolBar *webToolBar() = 0;
384 virtual QAction *actionNewProject() = 0;
386 virtual QAction *actionOpenProject() = 0;
388 virtual QAction *actionSaveProject() = 0;
390 virtual QAction *actionSaveProjectAs() = 0;
392 virtual QAction *actionSaveMapAsImage() = 0;
394 virtual QAction *actionProjectProperties() = 0;
397 virtual QAction *actionCreatePrintLayout() = 0;
400 virtual QAction *actionShowLayoutManager() = 0;
402 virtual QAction *actionExit() = 0;
407 virtual QAction *actionCutFeatures() = 0;
409 virtual QAction *actionCopyFeatures() = 0;
411 virtual QAction *actionPasteFeatures() = 0;
413 virtual QAction *actionAddFeature() = 0;
415 virtual QAction *actionDeleteSelected() = 0;
417 virtual QAction *actionMoveFeature() = 0;
419 virtual QAction *actionSplitFeatures() = 0;
421 virtual QAction *actionSplitParts() = 0;
423 virtual QAction *actionAddRing() = 0;
425 virtual QAction *actionAddPart() = 0;
427 virtual QAction *actionSimplifyFeature() = 0;
429 virtual QAction *actionDeleteRing() = 0;
431 virtual QAction *actionDeletePart() = 0;
437 virtual QAction *actionVertexTool() = 0;
444 virtual QAction *actionVertexToolActiveLayer() = 0;
454 virtual QActionGroup *mapToolActionGroup() = 0;
458 virtual QAction *actionPan() = 0;
460 virtual QAction *actionPanToSelected() = 0;
462 virtual QAction *actionZoomIn() = 0;
464 virtual QAction *actionZoomOut() = 0;
466 virtual QAction *actionSelect() = 0;
468 virtual QAction *actionSelectRectangle() = 0;
470 virtual QAction *actionSelectPolygon() = 0;
472 virtual QAction *actionSelectFreehand() = 0;
474 virtual QAction *actionSelectRadius() = 0;
476 virtual QAction *actionIdentify() = 0;
478 virtual QAction *actionFeatureAction() = 0;
480 virtual QAction *actionMeasure() = 0;
482 virtual QAction *actionMeasureArea() = 0;
484 virtual QAction *actionZoomFullExtent() = 0;
491 Q_DECL_DEPRECATED
virtual QAction *actionZoomToLayer() = 0
SIP_DEPRECATED;
497 virtual QAction *actionZoomToLayers() = 0;
500 virtual QAction *actionZoomToSelected() = 0;
502 virtual QAction *actionZoomLast() = 0;
504 virtual QAction *actionZoomNext() = 0;
506 virtual QAction *actionZoomActualSize() = 0;
508 virtual QAction *actionMapTips() = 0;
510 virtual QAction *actionNewBookmark() = 0;
512 virtual QAction *actionShowBookmarks() = 0;
514 virtual QAction *actionDraw() = 0;
517 virtual QAction *actionNewVectorLayer() = 0;
518 virtual QAction *actionAddOgrLayer() = 0;
519 virtual QAction *actionAddRasterLayer() = 0;
520 virtual QAction *actionAddPgLayer() = 0;
521 virtual QAction *actionAddWmsLayer() = 0;
527 virtual QAction *actionAddXyzLayer() = 0;
533 virtual QAction *actionAddVectorTileLayer() = 0;
539 virtual QAction *actionAddPointCloudLayer() = 0;
542 virtual QAction *actionAddAfsLayer() = 0;
545 virtual QAction *actionAddAmsLayer() = 0;
547 virtual QAction *actionCopyLayerStyle() = 0;
548 virtual QAction *actionPasteLayerStyle() = 0;
549 virtual QAction *actionOpenTable() = 0;
550 virtual QAction *actionOpenFieldCalculator() = 0;
556 virtual QAction *actionOpenStatisticalSummary() = 0;
558 virtual QAction *actionToggleEditing() = 0;
559 virtual QAction *actionSaveActiveLayerEdits() = 0;
560 virtual QAction *actionAllEdits() = 0;
561 virtual QAction *actionSaveEdits() = 0;
562 virtual QAction *actionSaveAllEdits() = 0;
563 virtual QAction *actionRollbackEdits() = 0;
564 virtual QAction *actionRollbackAllEdits() = 0;
565 virtual QAction *actionCancelEdits() = 0;
566 virtual QAction *actionCancelAllEdits() = 0;
567 virtual QAction *actionLayerSaveAs() = 0;
568 virtual QAction *actionDuplicateLayer() = 0;
569 virtual QAction *actionLayerProperties() = 0;
570 virtual QAction *actionAddToOverview() = 0;
571 virtual QAction *actionAddAllToOverview() = 0;
572 virtual QAction *actionRemoveAllFromOverview() = 0;
573 virtual QAction *actionHideAllLayers() = 0;
574 virtual QAction *actionShowAllLayers() = 0;
575 virtual QAction *actionHideSelectedLayers() = 0;
581 virtual QAction *actionToggleSelectedLayers() = 0;
587 virtual QAction *actionToggleSelectedLayersIndependently() = 0;
593 virtual QAction *actionHideDeselectedLayers() = 0;
594 virtual QAction *actionShowSelectedLayers() = 0;
597 virtual QAction *actionManagePlugins() = 0;
598 virtual QAction *actionPluginListSeparator() = 0;
599 virtual QAction *actionShowPythonDialog() = 0;
602 virtual QAction *actionToggleFullScreen() = 0;
603 virtual QAction *actionOptions() = 0;
604 virtual QAction *actionCustomProjection() = 0;
607 virtual QAction *actionHelpContents() = 0;
608 virtual QAction *actionQgisHomePage() = 0;
609 virtual QAction *actionCheckQgisVersion() = 0;
610 virtual QAction *actionAbout() = 0;
720 virtual int messageTimeout() = 0;
737 virtual void takeAppScreenShots(
const QString &saveDirectory,
const int categories = 0 ) {Q_UNUSED( saveDirectory ) Q_UNUSED( categories );}
753 virtual void zoomFull() = 0;
758 virtual void zoomToPrevious() = 0;
763 virtual void zoomToNext() = 0;
768 virtual void zoomToActiveLayer() = 0;
773 virtual QgsVectorLayer *addVectorLayer(
const QString &vectorLayerPath,
const QString &baseName,
const QString &providerKey ) = 0;
778 virtual QgsRasterLayer *addRasterLayer(
const QString &rasterLayerPath,
const QString &baseName = QString() ) = 0;
783 virtual QgsRasterLayer *addRasterLayer(
const QString &url,
const QString &layerName,
const QString &providerKey ) = 0;
788 virtual QgsMeshLayer *addMeshLayer(
const QString &url,
const QString &baseName,
const QString &providerKey ) = 0;
794 virtual QgsVectorTileLayer *addVectorTileLayer(
const QString &url,
const QString &baseName ) = 0;
800 virtual QgsPointCloudLayer *addPointCloudLayer(
const QString &url,
const QString &baseName,
const QString &providerKey ) = 0;
803 virtual bool addProject(
const QString &project ) = 0;
815 virtual bool newProject(
bool promptToSaveFlag =
false ) = 0;
824 virtual void reloadConnections( ) = 0;
836 virtual void copySelectionToClipboard(
QgsMapLayer * ) = 0;
842 virtual void pasteFromClipboard(
QgsMapLayer * ) = 0;
845 virtual int addToolBarIcon( QAction *qAction ) = 0;
855 virtual QAction *addToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
858 virtual void removeToolBarIcon( QAction *qAction ) = 0;
868 virtual QAction *addRasterToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
871 virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
874 virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
877 virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
887 virtual QAction *addVectorToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
890 virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
893 virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
903 virtual QAction *addDatabaseToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
906 virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
909 virtual int addWebToolBarIcon( QAction *qAction ) = 0;
919 virtual QAction *addWebToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
922 virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
925 virtual QToolBar *addToolBar(
const QString &name ) = 0
SIP_FACTORY;
931 virtual void addToolBar( QToolBar *toolbar
SIP_TRANSFER, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0;
936 virtual void openMessageLog() = 0;
939 virtual void addUserInputWidget( QWidget *widget ) = 0;
945 virtual void showLayoutManager() = 0;
960 virtual void showOptionsDialog( QWidget *parent =
nullptr,
const QString ¤tPage = QString() ) = 0;
967 virtual void showProjectPropertiesDialog(
const QString ¤tPage = QString() ) = 0;
973 virtual void buildStyleSheet(
const QMap<QString, QVariant> &opts ) = 0;
976 virtual void saveStyleSheetOptions(
const QMap<QString, QVariant> &opts ) = 0;
979 virtual void addPluginToMenu(
const QString &name, QAction *action ) = 0;
982 virtual void removePluginMenu(
const QString &name, QAction *action ) = 0;
985 virtual void insertAddLayerAction( QAction *action ) = 0;
988 virtual void removeAddLayerAction( QAction *action ) = 0;
991 virtual void addPluginToDatabaseMenu(
const QString &name, QAction *action ) = 0;
994 virtual void removePluginDatabaseMenu(
const QString &name, QAction *action ) = 0;
997 virtual void addPluginToRasterMenu(
const QString &name, QAction *action ) = 0;
1000 virtual void removePluginRasterMenu(
const QString &name, QAction *action ) = 0;
1003 virtual void addPluginToVectorMenu(
const QString &name, QAction *action ) = 0;
1006 virtual void removePluginVectorMenu(
const QString &name, QAction *action ) = 0;
1009 virtual void addPluginToWebMenu(
const QString &name, QAction *action ) = 0;
1012 virtual void removePluginWebMenu(
const QString &name, QAction *action ) = 0;
1019 virtual void addPluginToMeshMenu(
const QString &name, QAction *action ) = 0;
1026 virtual void removePluginMeshMenu(
const QString &name, QAction *action ) = 0;
1034 virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget ) = 0;
1050 virtual void addTabifiedDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget,
const QStringList &tabifyWith = QStringList(),
bool raiseTab =
false ) = 0;
1057 virtual void removeDockWidget( QDockWidget *dockwidget ) = 0;
1091 virtual void showLayerProperties(
QgsMapLayer *l,
const QString &page = QString() ) = 0;
1094 virtual QDialog *showAttributeTable(
QgsVectorLayer *l,
const QString &filterExpression = QString() ) = 0;
1100 virtual void addWindow( QAction *action ) = 0;
1106 virtual void removeWindow( QAction *action ) = 0;
1109 virtual bool registerMainWindowAction( QAction *action,
const QString &defaultShortcut ) = 0;
1112 virtual bool unregisterMainWindowAction( QAction *action ) = 0;
1292 virtual void openURL(
const QString &url,
bool useQgisDocDirectory =
true ) = 0
SIP_DEPRECATED;
1302 virtual bool openFeatureForm(
QgsVectorLayer *l,
QgsFeature &f,
bool updateFeatureOnly =
false,
bool showModal =
true ) = 0;
1326 virtual void preloadForm(
const QString &uifile ) = 0;
1334 virtual void locatorSearch(
const QString &searchText ) = 0;
1365 virtual void invalidateLocatorResults() = 0;
1405 void currentThemeChanged(
const QString &theme );
1429 void layoutDesignerClosed();
1434 void initializationCompleted();
1452 void newProjectCreated();
1458 void layerSavedAs(
QgsMapLayer *l,
const QString &path );
1463 #endif //#ifndef QGISINTERFACE_H