18 #ifndef QGISINTERFACE_H
19 #define QGISINTERFACE_H
108 virtual void addCustomActionForLayerType( QAction *action, QString menu,
117 virtual void addCustomActionForLayer( QAction *action,
QgsMapLayer *layer ) = 0;
123 virtual bool removeCustomActionForLayerType( QAction *action ) = 0;
129 virtual QList< QgsMapCanvas * > mapCanvases() = 0;
136 virtual QgsMapCanvas *createNewMapCanvas(
const QString &name ) = 0;
143 virtual void closeMapCanvas(
const QString &name ) = 0;
149 virtual QSize
iconSize(
bool dockedToolbar =
false )
const = 0;
156 virtual QList<QgsMapLayer *> editableLayers(
bool modified =
false )
const = 0;
172 virtual QWidget *mainWindow() = 0;
181 virtual QList<QgsLayoutDesignerInterface *> openLayoutDesigners() = 0;
185 virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
188 virtual QFont defaultStyleSheetFont() = 0;
204 virtual QMenu *projectMenu() = 0;
209 virtual QMenu *editMenu() = 0;
214 virtual QMenu *viewMenu() = 0;
219 virtual QMenu *layerMenu() = 0;
224 virtual QMenu *newLayerMenu() = 0;
230 virtual QMenu *addLayerMenu() = 0;
235 virtual QMenu *settingsMenu() = 0;
240 virtual QMenu *pluginMenu() = 0;
250 virtual QMenu *pluginHelpMenu() = 0;
255 virtual QMenu *rasterMenu() = 0;
260 virtual QMenu *databaseMenu() = 0;
265 virtual QMenu *vectorMenu() = 0;
270 virtual QMenu *webMenu() = 0;
279 virtual QMenu *firstRightStandardMenu() = 0;
284 virtual QMenu *windowMenu() = 0;
289 virtual QMenu *helpMenu() = 0;
296 virtual QToolBar *fileToolBar() = 0;
301 virtual QToolBar *layerToolBar() = 0;
307 virtual QToolBar *dataSourceManagerToolBar() = 0;
312 virtual QToolBar *mapNavToolToolBar() = 0;
317 virtual QToolBar *digitizeToolBar() = 0;
322 virtual QToolBar *advancedDigitizeToolBar() = 0;
328 virtual QToolBar *shapeDigitizeToolBar() = 0;
333 virtual QToolBar *attributesToolBar() = 0;
339 virtual QToolBar *selectionToolBar() = 0;
344 virtual QToolBar *pluginToolBar() = 0;
349 virtual QToolBar *helpToolBar() = 0;
354 virtual QToolBar *rasterToolBar() = 0;
359 virtual QToolBar *vectorToolBar() = 0;
364 virtual QToolBar *databaseToolBar() = 0;
369 virtual QToolBar *webToolBar() = 0;
373 virtual QAction *actionNewProject() = 0;
375 virtual QAction *actionOpenProject() = 0;
377 virtual QAction *actionSaveProject() = 0;
379 virtual QAction *actionSaveProjectAs() = 0;
381 virtual QAction *actionSaveMapAsImage() = 0;
383 virtual QAction *actionProjectProperties() = 0;
386 virtual QAction *actionCreatePrintLayout() = 0;
389 virtual QAction *actionShowLayoutManager() = 0;
391 virtual QAction *actionExit() = 0;
396 virtual QAction *actionCutFeatures() = 0;
398 virtual QAction *actionCopyFeatures() = 0;
400 virtual QAction *actionPasteFeatures() = 0;
402 virtual QAction *actionAddFeature() = 0;
404 virtual QAction *actionDeleteSelected() = 0;
406 virtual QAction *actionMoveFeature() = 0;
408 virtual QAction *actionSplitFeatures() = 0;
410 virtual QAction *actionSplitParts() = 0;
412 virtual QAction *actionAddRing() = 0;
414 virtual QAction *actionAddPart() = 0;
416 virtual QAction *actionSimplifyFeature() = 0;
418 virtual QAction *actionDeleteRing() = 0;
420 virtual QAction *actionDeletePart() = 0;
426 virtual QAction *actionVertexTool() = 0;
433 virtual QAction *actionVertexToolActiveLayer() = 0;
437 virtual QAction *actionPan() = 0;
439 virtual QAction *actionPanToSelected() = 0;
441 virtual QAction *actionZoomIn() = 0;
443 virtual QAction *actionZoomOut() = 0;
445 virtual QAction *actionSelect() = 0;
447 virtual QAction *actionSelectRectangle() = 0;
449 virtual QAction *actionSelectPolygon() = 0;
451 virtual QAction *actionSelectFreehand() = 0;
453 virtual QAction *actionSelectRadius() = 0;
455 virtual QAction *actionIdentify() = 0;
457 virtual QAction *actionFeatureAction() = 0;
459 virtual QAction *actionMeasure() = 0;
461 virtual QAction *actionMeasureArea() = 0;
463 virtual QAction *actionZoomFullExtent() = 0;
465 virtual QAction *actionZoomToLayer() = 0;
467 virtual QAction *actionZoomToSelected() = 0;
469 virtual QAction *actionZoomLast() = 0;
471 virtual QAction *actionZoomNext() = 0;
473 virtual QAction *actionZoomActualSize() = 0;
475 virtual QAction *actionMapTips() = 0;
477 virtual QAction *actionNewBookmark() = 0;
479 virtual QAction *actionShowBookmarks() = 0;
481 virtual QAction *actionDraw() = 0;
484 virtual QAction *actionNewVectorLayer() = 0;
485 virtual QAction *actionAddOgrLayer() = 0;
486 virtual QAction *actionAddRasterLayer() = 0;
487 virtual QAction *actionAddPgLayer() = 0;
488 virtual QAction *actionAddWmsLayer() = 0;
494 virtual QAction *actionAddXyzLayer() = 0;
500 virtual QAction *actionAddVectorTileLayer() = 0;
502 virtual QAction *actionAddAfsLayer() = 0;
504 virtual QAction *actionAddAmsLayer() = 0;
505 virtual QAction *actionCopyLayerStyle() = 0;
506 virtual QAction *actionPasteLayerStyle() = 0;
507 virtual QAction *actionOpenTable() = 0;
508 virtual QAction *actionOpenFieldCalculator() = 0;
514 virtual QAction *actionOpenStatisticalSummary() = 0;
516 virtual QAction *actionToggleEditing() = 0;
517 virtual QAction *actionSaveActiveLayerEdits() = 0;
518 virtual QAction *actionAllEdits() = 0;
519 virtual QAction *actionSaveEdits() = 0;
520 virtual QAction *actionSaveAllEdits() = 0;
521 virtual QAction *actionRollbackEdits() = 0;
522 virtual QAction *actionRollbackAllEdits() = 0;
523 virtual QAction *actionCancelEdits() = 0;
524 virtual QAction *actionCancelAllEdits() = 0;
525 virtual QAction *actionLayerSaveAs() = 0;
526 virtual QAction *actionDuplicateLayer() = 0;
527 virtual QAction *actionLayerProperties() = 0;
528 virtual QAction *actionAddToOverview() = 0;
529 virtual QAction *actionAddAllToOverview() = 0;
530 virtual QAction *actionRemoveAllFromOverview() = 0;
531 virtual QAction *actionHideAllLayers() = 0;
532 virtual QAction *actionShowAllLayers() = 0;
533 virtual QAction *actionHideSelectedLayers() = 0;
539 virtual QAction *actionToggleSelectedLayers() = 0;
545 virtual QAction *actionToggleSelectedLayersIndependently() = 0;
551 virtual QAction *actionHideDeselectedLayers() = 0;
552 virtual QAction *actionShowSelectedLayers() = 0;
555 virtual QAction *actionManagePlugins() = 0;
556 virtual QAction *actionPluginListSeparator() = 0;
557 virtual QAction *actionShowPythonDialog() = 0;
560 virtual QAction *actionToggleFullScreen() = 0;
561 virtual QAction *actionOptions() = 0;
562 virtual QAction *actionCustomProjection() = 0;
565 virtual QAction *actionHelpContents() = 0;
566 virtual QAction *actionQgisHomePage() = 0;
567 virtual QAction *actionCheckQgisVersion() = 0;
568 virtual QAction *actionAbout() = 0;
572 virtual QAction *actionCircle2Points() = 0;
574 virtual QAction *actionCircle3Points() = 0;
576 virtual QAction *actionCircle3Tangents() = 0;
578 virtual QAction *actionCircle2TangentsPoint() = 0;
580 virtual QAction *actionCircleCenterPoint() = 0;
582 virtual QAction *actionEllipseCenter2Points() = 0;
584 virtual QAction *actionEllipseCenterPoint() = 0;
586 virtual QAction *actionEllipseExtent() = 0;
588 virtual QAction *actionEllipseFoci() = 0;
590 virtual QAction *actionRectangleCenterPoint() = 0;
592 virtual QAction *actionRectangleExtent() = 0;
594 virtual QAction *actionRectangle3PointsDistance() = 0;
596 virtual QAction *actionRectangle3PointsProjected() = 0;
598 virtual QAction *actionRegularPolygon2Points() = 0;
600 virtual QAction *actionRegularPolygonCenterPoint() = 0;
602 virtual QAction *actionRegularPolygonCenterCorner() = 0;
614 virtual int messageTimeout() = 0;
631 virtual void takeAppScreenShots(
const QString &saveDirectory,
const int categories = 0 ) {Q_UNUSED( saveDirectory ) Q_UNUSED( categories );}
647 virtual void zoomFull() = 0;
652 virtual void zoomToPrevious() = 0;
657 virtual void zoomToNext() = 0;
662 virtual void zoomToActiveLayer() = 0;
667 virtual QgsVectorLayer *addVectorLayer(
const QString &vectorLayerPath,
const QString &baseName,
const QString &providerKey ) = 0;
672 virtual QgsRasterLayer *addRasterLayer(
const QString &rasterLayerPath,
const QString &baseName = QString() ) = 0;
677 virtual QgsRasterLayer *addRasterLayer(
const QString &url,
const QString &layerName,
const QString &providerKey ) = 0;
682 virtual QgsMeshLayer *addMeshLayer(
const QString &url,
const QString &baseName,
const QString &providerKey ) = 0;
688 virtual QgsVectorTileLayer *addVectorTileLayer(
const QString &url,
const QString &baseName ) = 0;
691 virtual bool addProject(
const QString &project ) = 0;
703 virtual bool newProject(
bool promptToSaveFlag =
false ) = 0;
712 virtual void reloadConnections( ) = 0;
724 virtual void copySelectionToClipboard(
QgsMapLayer * ) = 0;
730 virtual void pasteFromClipboard(
QgsMapLayer * ) = 0;
733 virtual int addToolBarIcon( QAction *qAction ) = 0;
743 virtual QAction *addToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
746 virtual void removeToolBarIcon( QAction *qAction ) = 0;
756 virtual QAction *addRasterToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
759 virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
762 virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
765 virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
775 virtual QAction *addVectorToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
778 virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
781 virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
791 virtual QAction *addDatabaseToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
794 virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
797 virtual int addWebToolBarIcon( QAction *qAction ) = 0;
807 virtual QAction *addWebToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
810 virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
813 virtual QToolBar *addToolBar(
const QString &name ) = 0
SIP_FACTORY;
819 virtual void addToolBar( QToolBar *toolbar
SIP_TRANSFER, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0;
824 virtual void openMessageLog() = 0;
827 virtual void addUserInputWidget( QWidget *widget ) = 0;
833 virtual void showLayoutManager() = 0;
848 virtual void showOptionsDialog( QWidget *parent =
nullptr,
const QString ¤tPage = QString() ) = 0;
854 virtual void buildStyleSheet(
const QMap<QString, QVariant> &opts ) = 0;
857 virtual void saveStyleSheetOptions(
const QMap<QString, QVariant> &opts ) = 0;
860 virtual void addPluginToMenu(
const QString &name, QAction *action ) = 0;
863 virtual void removePluginMenu(
const QString &name, QAction *action ) = 0;
866 virtual void insertAddLayerAction( QAction *action ) = 0;
869 virtual void removeAddLayerAction( QAction *action ) = 0;
872 virtual void addPluginToDatabaseMenu(
const QString &name, QAction *action ) = 0;
875 virtual void removePluginDatabaseMenu(
const QString &name, QAction *action ) = 0;
878 virtual void addPluginToRasterMenu(
const QString &name, QAction *action ) = 0;
881 virtual void removePluginRasterMenu(
const QString &name, QAction *action ) = 0;
884 virtual void addPluginToVectorMenu(
const QString &name, QAction *action ) = 0;
887 virtual void removePluginVectorMenu(
const QString &name, QAction *action ) = 0;
890 virtual void addPluginToWebMenu(
const QString &name, QAction *action ) = 0;
893 virtual void removePluginWebMenu(
const QString &name, QAction *action ) = 0;
901 virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget ) = 0;
917 virtual void addTabifiedDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget,
const QStringList &tabifyWith = QStringList(),
bool raiseTab =
false ) = 0;
924 virtual void removeDockWidget( QDockWidget *dockwidget ) = 0;
927 virtual void showLayerProperties(
QgsMapLayer *l ) = 0;
930 virtual QDialog *showAttributeTable(
QgsVectorLayer *l,
const QString &filterExpression = QString() ) = 0;
936 virtual void addWindow( QAction *action ) = 0;
942 virtual void removeWindow( QAction *action ) = 0;
945 virtual bool registerMainWindowAction( QAction *action,
const QString &defaultShortcut ) = 0;
948 virtual bool unregisterMainWindowAction( QAction *action ) = 0;
1070 virtual void openURL(
const QString &url,
bool useQgisDocDirectory =
true ) = 0
SIP_DEPRECATED;
1080 virtual bool openFeatureForm(
QgsVectorLayer *l,
QgsFeature &f,
bool updateFeatureOnly =
false,
bool showModal =
true ) = 0;
1104 virtual void preloadForm(
const QString &uifile ) = 0;
1112 virtual void locatorSearch(
const QString &searchText ) = 0;
1143 virtual void invalidateLocatorResults() = 0;
1173 void currentThemeChanged(
const QString &theme );
1197 void layoutDesignerClosed();
1202 void initializationCompleted();
1220 void newProjectCreated();
1226 void layerSavedAs(
QgsMapLayer *l,
const QString &path );
1231 #endif //#ifndef QGISINTERFACE_H