18 #ifndef QGISINTERFACE_H 19 #define QGISINTERFACE_H 31 class QgsLayoutCustomDropHandler;
37 class QgsLayoutDesignerInterface;
100 virtual void addCustomActionForLayerType( QAction *action, QString menu,
109 virtual void addCustomActionForLayer( QAction *action,
QgsMapLayer *layer ) = 0;
115 virtual bool removeCustomActionForLayerType( QAction *action ) = 0;
121 virtual QList< QgsMapCanvas * > mapCanvases() = 0;
128 virtual QgsMapCanvas *createNewMapCanvas(
const QString &name ) = 0;
135 virtual void closeMapCanvas(
const QString &name ) = 0;
141 virtual QSize iconSize(
bool dockedToolbar =
false )
const = 0;
147 virtual QList<QgsMapLayer *> editableLayers(
bool modified =
false )
const = 0;
163 virtual QWidget *mainWindow() = 0;
172 virtual QList<QgsLayoutDesignerInterface *> openLayoutDesigners() = 0;
176 virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
179 virtual QFont defaultStyleSheetFont() = 0;
193 virtual QMenu *projectMenu() = 0;
194 virtual QMenu *editMenu() = 0;
195 virtual QMenu *viewMenu() = 0;
196 virtual QMenu *layerMenu() = 0;
197 virtual QMenu *newLayerMenu() = 0;
199 virtual QMenu *addLayerMenu() = 0;
200 virtual QMenu *settingsMenu() = 0;
201 virtual QMenu *pluginMenu() = 0;
202 virtual QMenu *rasterMenu() = 0;
203 virtual QMenu *databaseMenu() = 0;
204 virtual QMenu *vectorMenu() = 0;
205 virtual QMenu *webMenu() = 0;
206 virtual QMenu *firstRightStandardMenu() = 0;
207 virtual QMenu *windowMenu() = 0;
208 virtual QMenu *helpMenu() = 0;
211 virtual QToolBar *fileToolBar() = 0;
212 virtual QToolBar *layerToolBar() = 0;
213 virtual QToolBar *mapNavToolToolBar() = 0;
214 virtual QToolBar *digitizeToolBar() = 0;
215 virtual QToolBar *advancedDigitizeToolBar() = 0;
216 virtual QToolBar *shapeDigitizeToolBar() = 0;
217 virtual QToolBar *attributesToolBar() = 0;
218 virtual QToolBar *pluginToolBar() = 0;
219 virtual QToolBar *helpToolBar() = 0;
220 virtual QToolBar *rasterToolBar() = 0;
221 virtual QToolBar *vectorToolBar() = 0;
222 virtual QToolBar *databaseToolBar() = 0;
223 virtual QToolBar *webToolBar() = 0;
226 virtual QAction *actionNewProject() = 0;
227 virtual QAction *actionOpenProject() = 0;
228 virtual QAction *actionSaveProject() = 0;
229 virtual QAction *actionSaveProjectAs() = 0;
230 virtual QAction *actionSaveMapAsImage() = 0;
231 virtual QAction *actionProjectProperties() = 0;
234 virtual QAction *actionCreatePrintLayout() = 0;
237 virtual QAction *actionShowLayoutManager() = 0;
238 virtual QAction *actionExit() = 0;
241 virtual QAction *actionCutFeatures() = 0;
242 virtual QAction *actionCopyFeatures() = 0;
243 virtual QAction *actionPasteFeatures() = 0;
244 virtual QAction *actionAddFeature() = 0;
245 virtual QAction *actionDeleteSelected() = 0;
246 virtual QAction *actionMoveFeature() = 0;
247 virtual QAction *actionSplitFeatures() = 0;
248 virtual QAction *actionSplitParts() = 0;
249 virtual QAction *actionAddRing() = 0;
250 virtual QAction *actionAddPart() = 0;
251 virtual QAction *actionSimplifyFeature() = 0;
252 virtual QAction *actionDeleteRing() = 0;
253 virtual QAction *actionDeletePart() = 0;
254 virtual QAction *actionVertexTool() = 0;
258 virtual QAction *actionPan() = 0;
260 virtual QAction *actionPanToSelected() = 0;
262 virtual QAction *actionZoomIn() = 0;
264 virtual QAction *actionZoomOut() = 0;
266 virtual QAction *actionSelect() = 0;
268 virtual QAction *actionSelectRectangle() = 0;
270 virtual QAction *actionSelectPolygon() = 0;
272 virtual QAction *actionSelectFreehand() = 0;
274 virtual QAction *actionSelectRadius() = 0;
276 virtual QAction *actionIdentify() = 0;
278 virtual QAction *actionFeatureAction() = 0;
280 virtual QAction *actionMeasure() = 0;
282 virtual QAction *actionMeasureArea() = 0;
284 virtual QAction *actionZoomFullExtent() = 0;
286 virtual QAction *actionZoomToLayer() = 0;
288 virtual QAction *actionZoomToSelected() = 0;
290 virtual QAction *actionZoomLast() = 0;
292 virtual QAction *actionZoomNext() = 0;
294 virtual QAction *actionZoomActualSize() = 0;
296 virtual QAction *actionMapTips() = 0;
298 virtual QAction *actionNewBookmark() = 0;
300 virtual QAction *actionShowBookmarks() = 0;
302 virtual QAction *actionDraw() = 0;
305 virtual QAction *actionNewVectorLayer() = 0;
306 virtual QAction *actionAddOgrLayer() = 0;
307 virtual QAction *actionAddRasterLayer() = 0;
308 virtual QAction *actionAddPgLayer() = 0;
309 virtual QAction *actionAddWmsLayer() = 0;
311 virtual QAction *actionAddAfsLayer() = 0;
313 virtual QAction *actionAddAmsLayer() = 0;
314 virtual QAction *actionCopyLayerStyle() = 0;
315 virtual QAction *actionPasteLayerStyle() = 0;
316 virtual QAction *actionOpenTable() = 0;
317 virtual QAction *actionOpenFieldCalculator() = 0;
323 virtual QAction *actionOpenStatisticalSummary() = 0;
325 virtual QAction *actionToggleEditing() = 0;
326 virtual QAction *actionSaveActiveLayerEdits() = 0;
327 virtual QAction *actionAllEdits() = 0;
328 virtual QAction *actionSaveEdits() = 0;
329 virtual QAction *actionSaveAllEdits() = 0;
330 virtual QAction *actionRollbackEdits() = 0;
331 virtual QAction *actionRollbackAllEdits() = 0;
332 virtual QAction *actionCancelEdits() = 0;
333 virtual QAction *actionCancelAllEdits() = 0;
334 virtual QAction *actionLayerSaveAs() = 0;
335 virtual QAction *actionDuplicateLayer() = 0;
336 virtual QAction *actionLayerProperties() = 0;
337 virtual QAction *actionAddToOverview() = 0;
338 virtual QAction *actionAddAllToOverview() = 0;
339 virtual QAction *actionRemoveAllFromOverview() = 0;
340 virtual QAction *actionHideAllLayers() = 0;
341 virtual QAction *actionShowAllLayers() = 0;
342 virtual QAction *actionHideSelectedLayers() = 0;
348 virtual QAction *actionHideDeselectedLayers() = 0;
349 virtual QAction *actionShowSelectedLayers() = 0;
352 virtual QAction *actionManagePlugins() = 0;
353 virtual QAction *actionPluginListSeparator() = 0;
354 virtual QAction *actionShowPythonDialog() = 0;
357 virtual QAction *actionToggleFullScreen() = 0;
358 virtual QAction *actionOptions() = 0;
359 virtual QAction *actionCustomProjection() = 0;
362 virtual QAction *actionHelpContents() = 0;
363 virtual QAction *actionQgisHomePage() = 0;
364 virtual QAction *actionCheckQgisVersion() = 0;
365 virtual QAction *actionAbout() = 0;
377 virtual int messageTimeout() = 0;
392 virtual void zoomFull() = 0;
395 virtual void zoomToPrevious() = 0;
398 virtual void zoomToNext() = 0;
401 virtual void zoomToActiveLayer() = 0;
404 virtual QgsVectorLayer *addVectorLayer(
const QString &vectorLayerPath,
const QString &baseName,
const QString &providerKey ) = 0;
407 virtual QgsRasterLayer *addRasterLayer(
const QString &rasterLayerPath,
const QString &baseName = QString() ) = 0;
410 virtual QgsRasterLayer *addRasterLayer(
const QString &url,
const QString &layerName,
const QString &providerKey ) = 0;
413 virtual bool addProject(
const QString &project ) = 0;
415 virtual void newProject(
bool promptToSaveFlag =
false ) = 0;
424 virtual void reloadConnections( ) = 0;
436 virtual void copySelectionToClipboard(
QgsMapLayer * ) = 0;
442 virtual void pasteFromClipboard(
QgsMapLayer * ) = 0;
445 virtual int addToolBarIcon( QAction *qAction ) = 0;
455 virtual QAction *addToolBarWidget( QWidget *widget
SIP_TRANSFER ) = 0;
458 virtual void removeToolBarIcon( QAction *qAction ) = 0;
468 virtual QAction *addRasterToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
471 virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
474 virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
477 virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
487 virtual QAction *addVectorToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
490 virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
493 virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
503 virtual QAction *addDatabaseToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
506 virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
509 virtual int addWebToolBarIcon( QAction *qAction ) = 0;
519 virtual QAction *addWebToolBarWidget( QWidget *widget SIP_TRANSFER ) = 0;
522 virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
525 virtual QToolBar *addToolBar(
const QString &name ) = 0
SIP_FACTORY;
531 virtual void addToolBar( QToolBar *toolbar SIP_TRANSFER, Qt::ToolBarArea area = Qt::TopToolBarArea ) = 0;
534 virtual void openMessageLog() = 0;
537 virtual void addUserInputWidget( QWidget *widget ) = 0;
543 virtual void showLayoutManager() = 0;
558 virtual void showOptionsDialog( QWidget *parent =
nullptr,
const QString ¤tPage = QString() ) = 0;
564 virtual void buildStyleSheet(
const QMap<QString, QVariant> &opts ) = 0;
567 virtual void saveStyleSheetOptions(
const QMap<QString, QVariant> &opts ) = 0;
570 virtual void addPluginToMenu(
const QString &name, QAction *action ) = 0;
573 virtual void removePluginMenu(
const QString &name, QAction *action ) = 0;
576 virtual void insertAddLayerAction( QAction *action ) = 0;
579 virtual void removeAddLayerAction( QAction *action ) = 0;
582 virtual void addPluginToDatabaseMenu(
const QString &name, QAction *action ) = 0;
585 virtual void removePluginDatabaseMenu(
const QString &name, QAction *action ) = 0;
588 virtual void addPluginToRasterMenu(
const QString &name, QAction *action ) = 0;
591 virtual void removePluginRasterMenu(
const QString &name, QAction *action ) = 0;
594 virtual void addPluginToVectorMenu(
const QString &name, QAction *action ) = 0;
597 virtual void removePluginVectorMenu(
const QString &name, QAction *action ) = 0;
600 virtual void addPluginToWebMenu(
const QString &name, QAction *action ) = 0;
603 virtual void removePluginWebMenu(
const QString &name, QAction *action ) = 0;
606 virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget *dockwidget ) = 0;
609 virtual void removeDockWidget( QDockWidget *dockwidget ) = 0;
612 virtual void showLayerProperties(
QgsMapLayer *l ) = 0;
615 virtual QDialog *showAttributeTable(
QgsVectorLayer *l,
const QString &filterExpression = QString() ) = 0;
620 virtual void addWindow( QAction *action ) = 0;
625 virtual void removeWindow( QAction *action ) = 0;
628 virtual bool registerMainWindowAction( QAction *action,
const QString &defaultShortcut ) = 0;
631 virtual bool unregisterMainWindowAction( QAction *action ) = 0;
683 virtual void registerCustomLayoutDropHandler( QgsLayoutCustomDropHandler *handler ) = 0;
689 virtual void unregisterCustomLayoutDropHandler( QgsLayoutCustomDropHandler *handler ) = 0;
705 virtual void openURL(
const QString &url,
bool useQgisDocDirectory =
true ) = 0
SIP_DEPRECATED;
714 virtual bool openFeatureForm(
QgsVectorLayer *l,
QgsFeature &
f,
bool updateFeatureOnly =
false,
bool showModal =
true ) = 0;
738 virtual void preloadForm(
const QString &uifile ) = 0;
748 virtual void registerLocatorFilter(
QgsLocatorFilter *filter SIP_TRANSFER ) = 0;
783 void currentThemeChanged(
const QString &theme );
790 void layoutDesignerOpened( QgsLayoutDesignerInterface *designer );
799 void layoutDesignerWillBeClosed( QgsLayoutDesignerInterface *designer );
807 void layoutDesignerClosed();
812 void initializationCompleted();
832 void newProjectCreated();
839 void layerSavedAs(
QgsMapLayer *l,
const QString &path );
844 #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.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
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...
Interface for master layout type objects, such as print layouts and reports.
Represents a vector layer which manages a vector based data sets.
A proxy widget for QStatusBar.