#include <qgisappinterface.h>
Inheritance diagram for QgisAppInterface:
Only those functions "exposed" by QgisInterface can be called from within a plugin.
Definition at line 33 of file qgisappinterface.h.
Public Member Functions | |
QgisAppInterface (OmgMainWindow *thepOmgMainWindow) | |
~QgisAppInterface () | |
void | zoomFull () |
Zoom map to full extent. | |
void | zoomPrevious () |
Zoom map to previous extent. | |
void | zoomActiveLayer () |
Zoom to active layer. | |
QgsVectorLayer * | addVectorLayer (QString vectorLayerPath, QString baseName, QString providerKey) |
Add a vector layer. | |
QgsRasterLayer * | addRasterLayer (QString rasterLayerPath, QString baseName) |
Add a raster layer given its file name. | |
QgsRasterLayer * | addRasterLayer (QgsRasterLayer *theRasterLayer, bool theForceRenderFlag=false) |
Add a raster layer given a raster layer obj. | |
bool | addProject (QString theProjectName) |
Add a project. | |
void | newProject (bool thePromptToSaveFlag=false) |
Start a new blank project. | |
QgsMapLayer * | activeLayer () |
Get pointer to the active layer (layer selected in the legend). | |
int | addToolBarIcon (QAction *qAction) |
Add an icon to the plugins toolbar. | |
void | removeToolBarIcon (QAction *qAction) |
Remove an icon (action) from the plugin toolbar. | |
QToolBar * | addToolBar (QString name) |
Add toolbar with specified name. | |
void | openURL (QString url, bool useQgisDocDirectory=true) |
std::map< QString, int > | menuMapByName () |
std::map< int, QString > | menuMapById () |
QgsMapCanvas * | getMapCanvas () |
QWidget * | getMainWindow () |
void | addPluginMenu (QString name, QAction *action) |
void | removePluginMenu (QString name, QAction *action) |
virtual QToolBox * | getToolBox () |
virtual void | refreshLegend (QgsMapLayer *) |
Private Member Functions | |
QgisAppInterface (QgisAppInterface const &) | |
QgisInterface aren't copied. | |
QgisAppInterface & | operator= (QgisAppInterface const &) |
QgisInterface aren't copied. | |
Private Attributes | |
OmgMainWindow * | mpOmgMainWindow |
Pointer to the OmgMainWindow object. |
|
Constructor.
Definition at line 31 of file qgisappinterface.cpp. |
|
Definition at line 40 of file qgisappinterface.cpp. |
|
QgisInterface aren't copied.
|
|
Get pointer to the active layer (layer selected in the legend).
Definition at line 86 of file qgisappinterface.cpp. |
|
Add action to the plugins menu Definition at line 91 of file qgisappinterface.cpp. |
|
Add a project.
Definition at line 76 of file qgisappinterface.cpp. |
|
Add a raster layer given a raster layer obj.
Definition at line 71 of file qgisappinterface.cpp. |
|
Add a raster layer given its file name.
Definition at line 66 of file qgisappinterface.cpp. |
|
Add toolbar with specified name.
Definition at line 110 of file qgisappinterface.cpp. |
|
Add an icon to the plugins toolbar.
Definition at line 101 of file qgisappinterface.cpp. |
|
Add a vector layer.
Definition at line 59 of file qgisappinterface.cpp. |
|
Gives access to main QgisApp object Plugins don't need to know about QgisApp, as we pass it as QWidget, it can be used for connecting slots and using as widget's parent Definition at line 137 of file qgisappinterface.cpp. References mpOmgMainWindow. |
|
Return a pointer to the map canvas used by qgisapp Definition at line 132 of file qgisappinterface.cpp. References mpOmgMainWindow. |
|
Return a pointer to the toolbox (where additional pages can be inserted) Definition at line 142 of file qgisappinterface.cpp. |
|
Get the menu info mapped by menu id (key is menu id, value is name) Definition at line 126 of file qgisappinterface.cpp. |
|
Get the menu info mapped by menu name (key is name, value is menu id) Definition at line 119 of file qgisappinterface.cpp. |
|
Start a new blank project.
Definition at line 81 of file qgisappinterface.cpp. |
|
Open a url in the users browser. By default the QGIS doc directory is used as the base for the URL. To open a URL that is not relative to the installed QGIS documentation, set useQgisDocDirectory to false.
Definition at line 114 of file qgisappinterface.cpp. |
|
QgisInterface aren't copied.
|
|
Definition at line 107 of file qgisappinterface.h. |
|
Remove action from the plugins menu Definition at line 96 of file qgisappinterface.cpp. |
|
Remove an icon (action) from the plugin toolbar.
Definition at line 106 of file qgisappinterface.cpp. |
|
Zoom to active layer.
Definition at line 54 of file qgisappinterface.cpp. |
|
Zoom map to full extent.
Definition at line 44 of file qgisappinterface.cpp. |
|
Zoom map to previous extent.
Definition at line 49 of file qgisappinterface.cpp. |
|
Pointer to the OmgMainWindow object.
Definition at line 118 of file qgisappinterface.h. Referenced by getMainWindow(), and getMapCanvas(). |