18 #ifndef QGISINTERFACE_H
19 #define QGISINTERFACE_H
46 # pragma warning( push )
47 # pragma warning( disable: 4996 ) // was declared deprecated
86 virtual void zoomFull() = 0;
89 virtual void zoomToPrevious() = 0;
92 virtual void zoomToNext() = 0;
95 virtual void zoomToActiveLayer() = 0;
98 virtual QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey ) = 0;
101 virtual QgsRasterLayer* addRasterLayer( QString rasterLayerPath, QString baseName = QString() ) = 0;
104 virtual QgsRasterLayer* addRasterLayer(
const QString& url,
const QString& layerName,
const QString& providerKey ) = 0;
107 virtual bool addProject( QString theProject ) = 0;
109 virtual void newProject(
bool thePromptToSaveFlag =
false ) = 0;
120 virtual int addToolBarIcon( QAction *qAction ) = 0;
130 virtual QAction* addToolBarWidget( QWidget* widget ) = 0;
133 virtual void removeToolBarIcon( QAction *qAction ) = 0;
143 virtual QAction* addRasterToolBarWidget( QWidget* widget ) = 0;
147 virtual int addRasterToolBarIcon( QAction *qAction ) = 0;
151 virtual void removeRasterToolBarIcon( QAction *qAction ) = 0;
156 virtual int addVectorToolBarIcon( QAction *qAction ) = 0;
166 virtual QAction* addVectorToolBarWidget( QWidget* widget ) = 0;
170 virtual void removeVectorToolBarIcon( QAction *qAction ) = 0;
174 virtual int addDatabaseToolBarIcon( QAction *qAction ) = 0;
184 virtual QAction* addDatabaseToolBarWidget( QWidget* widget ) = 0;
188 virtual void removeDatabaseToolBarIcon( QAction *qAction ) = 0;
192 virtual int addWebToolBarIcon( QAction *qAction ) = 0;
202 virtual QAction* addWebToolBarWidget( QWidget* widget ) = 0;
206 virtual void removeWebToolBarIcon( QAction *qAction ) = 0;
209 virtual QToolBar *addToolBar( QString name ) = 0;
215 virtual QWidget * mainWindow() = 0;
221 virtual QList<QgsComposerView*> activeComposers() = 0;
228 virtual QgsComposerView* createNewComposer( QString title = QString(
"" ) ) = 0;
246 virtual QMap<QString, QVariant> defaultStyleSheetOptions() = 0;
252 virtual void buildStyleSheet(
const QMap<QString, QVariant>& opts ) = 0;
257 virtual void saveStyleSheetOptions(
const QMap<QString, QVariant>& opts ) = 0;
262 virtual QFont defaultStyleSheetFont() = 0;
265 virtual void addPluginToMenu( QString name, QAction* action ) = 0;
268 virtual void removePluginMenu( QString name, QAction* action ) = 0;
273 virtual void insertAddLayerAction( QAction *action ) = 0;
278 virtual void removeAddLayerAction( QAction *action ) = 0;
283 virtual void addPluginToDatabaseMenu( QString name, QAction* action ) = 0;
288 virtual void removePluginDatabaseMenu( QString name, QAction* action ) = 0;
293 virtual void addPluginToRasterMenu( QString name, QAction* action ) = 0;
298 virtual void removePluginRasterMenu( QString name, QAction* action ) = 0;
303 virtual void addPluginToVectorMenu( QString name, QAction* action ) = 0;
308 virtual void removePluginVectorMenu( QString name, QAction* action ) = 0;
313 virtual void addPluginToWebMenu( QString name, QAction* action ) = 0;
318 virtual void removePluginWebMenu( QString name, QAction* action ) = 0;
321 virtual void addDockWidget( Qt::DockWidgetArea area, QDockWidget * dockwidget ) = 0;
326 virtual void removeDockWidget( QDockWidget * dockwidget ) = 0;
331 virtual void showLayerProperties(
QgsMapLayer *l ) = 0;
340 virtual void addWindow( QAction *action ) = 0;
344 virtual void removeWindow( QAction *action ) = 0;
349 virtual bool registerMainWindowAction( QAction* action, QString defaultShortcut ) = 0;
354 virtual bool unregisterMainWindowAction( QAction* action ) = 0;
368 virtual void openURL( QString url,
bool useQgisDocDirectory =
true ) = 0;
379 virtual QMenu *fileMenu() = 0;
380 virtual QMenu *projectMenu() = 0;
381 virtual QMenu *editMenu() = 0;
382 virtual QMenu *viewMenu() = 0;
383 virtual QMenu *layerMenu() = 0;
386 virtual QMenu *newLayerMenu() = 0;
387 virtual QMenu *settingsMenu() = 0;
388 virtual QMenu *pluginMenu() = 0;
389 virtual QMenu *rasterMenu() = 0;
392 virtual QMenu *databaseMenu() = 0;
395 virtual QMenu *vectorMenu() = 0;
398 virtual QMenu *webMenu() = 0;
399 virtual QMenu *firstRightStandardMenu() = 0;
400 virtual QMenu *windowMenu() = 0;
401 virtual QMenu *helpMenu() = 0;
404 virtual QToolBar *fileToolBar() = 0;
405 virtual QToolBar *layerToolBar() = 0;
406 virtual QToolBar *mapNavToolToolBar() = 0;
407 virtual QToolBar *digitizeToolBar() = 0;
408 virtual QToolBar *advancedDigitizeToolBar() = 0;
409 virtual QToolBar *attributesToolBar() = 0;
410 virtual QToolBar *pluginToolBar() = 0;
411 virtual QToolBar *helpToolBar() = 0;
414 virtual QToolBar *rasterToolBar() = 0;
417 virtual QToolBar *vectorToolBar() = 0;
420 virtual QToolBar *databaseToolBar() = 0;
423 virtual QToolBar *webToolBar() = 0;
426 virtual QAction *actionNewProject() = 0;
427 virtual QAction *actionOpenProject() = 0;
428 virtual QAction *actionSaveProject() = 0;
429 virtual QAction *actionSaveProjectAs() = 0;
430 virtual QAction *actionSaveMapAsImage() = 0;
431 virtual QAction *actionProjectProperties() = 0;
432 virtual QAction *actionPrintComposer() = 0;
433 virtual QAction *actionShowComposerManager() = 0;
434 virtual QAction *actionExit() = 0;
437 virtual QAction *actionCutFeatures() = 0;
438 virtual QAction *actionCopyFeatures() = 0;
439 virtual QAction *actionPasteFeatures() = 0;
440 virtual QAction *actionAddFeature() = 0;
441 virtual QAction *actionDeleteSelected() = 0;
442 virtual QAction *actionMoveFeature() = 0;
443 virtual QAction *actionSplitFeatures() = 0;
444 virtual QAction *actionAddRing() = 0;
445 virtual QAction *actionAddPart() = 0;
446 virtual QAction *actionSimplifyFeature() = 0;
447 virtual QAction *actionDeleteRing() = 0;
448 virtual QAction *actionDeletePart() = 0;
449 virtual QAction *actionNodeTool() = 0;
452 virtual QAction *actionPan() = 0;
453 virtual QAction *actionTouch() = 0;
454 virtual QAction *actionPanToSelected() = 0;
455 virtual QAction *actionZoomIn() = 0;
456 virtual QAction *actionZoomOut() = 0;
457 virtual QAction *actionSelect() = 0;
458 virtual QAction *actionSelectRectangle() = 0;
459 virtual QAction *actionSelectPolygon() = 0;
460 virtual QAction *actionSelectFreehand() = 0;
461 virtual QAction *actionSelectRadius() = 0;
462 virtual QAction *actionIdentify() = 0;
463 virtual QAction *actionMeasure() = 0;
464 virtual QAction *actionMeasureArea() = 0;
465 virtual QAction *actionZoomFullExtent() = 0;
466 virtual QAction *actionZoomToLayer() = 0;
467 virtual QAction *actionZoomToSelected() = 0;
468 virtual QAction *actionZoomLast() = 0;
469 virtual QAction *actionZoomActualSize() = 0;
470 virtual QAction *actionMapTips() = 0;
471 virtual QAction *actionNewBookmark() = 0;
472 virtual QAction *actionShowBookmarks() = 0;
473 virtual QAction *actionDraw() = 0;
476 virtual QAction *actionNewVectorLayer() = 0;
477 virtual QAction *actionAddOgrLayer() = 0;
478 virtual QAction *actionAddRasterLayer() = 0;
479 virtual QAction *actionAddPgLayer() = 0;
480 virtual QAction *actionAddWmsLayer() = 0;
482 virtual QAction *actionCopyLayerStyle() = 0;
484 virtual QAction *actionPasteLayerStyle() = 0;
485 virtual QAction *actionOpenTable() = 0;
486 virtual QAction *actionOpenFieldCalculator() = 0;
487 virtual QAction *actionToggleEditing() = 0;
489 virtual QAction *actionSaveActiveLayerEdits() = 0;
491 virtual QAction *actionAllEdits() = 0;
493 virtual QAction *actionSaveEdits() = 0;
495 virtual QAction *actionSaveAllEdits() = 0;
497 virtual QAction *actionRollbackEdits() = 0;
499 virtual QAction *actionRollbackAllEdits() = 0;
501 virtual QAction *actionCancelEdits() = 0;
503 virtual QAction *actionCancelAllEdits() = 0;
504 virtual QAction *actionLayerSaveAs() = 0;
505 virtual QAction *actionLayerSelectionSaveAs() = 0;
506 virtual QAction *actionRemoveLayer() = 0;
508 virtual QAction *actionDuplicateLayer() = 0;
509 virtual QAction *actionLayerProperties() = 0;
510 virtual QAction *actionAddToOverview() = 0;
511 virtual QAction *actionAddAllToOverview() = 0;
512 virtual QAction *actionRemoveAllFromOverview() = 0;
513 virtual QAction *actionHideAllLayers() = 0;
514 virtual QAction *actionShowAllLayers() = 0;
517 virtual QAction *actionManagePlugins() = 0;
518 virtual QAction *actionPluginListSeparator() = 0;
519 virtual QAction *actionShowPythonDialog() = 0;
522 virtual QAction *actionToggleFullScreen() = 0;
523 virtual QAction *actionOptions() = 0;
524 virtual QAction *actionCustomProjection() = 0;
527 virtual QAction *actionHelpContents() = 0;
528 virtual QAction *actionQgisHomePage() = 0;
529 virtual QAction *actionCheckQgisVersion() = 0;
530 virtual QAction *actionAbout() = 0;
539 virtual void preloadForm( QString uifile ) = 0;
545 virtual QList<QgsMapLayer *> editableLayers(
bool modified =
false )
const = 0;
549 virtual int messageTimeout() = 0;
569 void initializationCompleted();
589 void newProjectCreated();
593 # pragma warning( pop )
594 # pragma warning( disable: 4190 )
600 # define QGISEXTERN extern "C" __declspec( dllexport )
602 # define QGISEXTERN extern "C"
606 #endif //#ifndef QGISINTERFACE_H