|
ToolMap
|
GIS class for dealing with layers. More...
#include <tmlayermanager.h>
Public Member Functions | |
| tmLayerManager (wxWindow *parent, TocCtrl *tocctrl, tmRenderer *renderer, wxStatusBar *status, tmScaleCtrlCombo *scalectrl) | |
| Constructor. | |
| ~tmLayerManager () | |
| Destructor. | |
| void | InitScaleCtrlList () |
| bool | InitLayerManager (DataBaseTM *db) |
| Init the layer manager with a project. | |
| bool | UnInitLayerManager () |
| Un-Init the layer manager. | |
| void | SetMemoryProject (PrjDefMemManage *memoryprj) |
| void | RemoveLayer (wxCommandEvent &event) |
| Response to the event sent by the #tmTOCCtrl. | |
| void | AddLayer (wxCommandEvent &event) |
| Response to the event sent by the "Add Gis Data" menu. | |
| void | AddWebLayer () |
| void | GroupAdd (wxCommandEvent &event) |
| bool | OpenLayer (const wxFileName &filename, bool replace=false, const wxString &originalname=wxEmptyString) |
| tmGISScale * | GetScale () |
| bool | ZoomToLayer (long layerid) |
| void | ZoomToSelectedLayer () |
| void | ZoomToFrameLayer () |
| void | OnSizeChange (wxCommandEvent &event) |
| Called when windows size change. | |
| void | OnUpdateCoordinates (wxCommandEvent &event) |
| Respond to mouse mouve inside renderer area. | |
| void | OnUpdateAngle (wxCommandEvent &event) |
| void | OnShowLayer (wxCommandEvent &event) |
| Called when showing or hiding a layer. | |
| void | OnScaleChanged (wxCommandEvent &event) |
| Called when user change scale. | |
| void | OnDisplayProperties (wxCommandEvent &event) |
| Show properties dialog. | |
| void | OnDisplayLabels (wxCommandEvent &event) |
| void | OnTocEdited (wxCommandEvent &event) |
| void | OnZoomToFit () |
| Called when user press Zoom to fit. | |
| void | OnZoomRectangle () |
| void | OnPan () |
| void | OnSelect () |
| bool | ZoomPrevious () |
| bool | HasZoomPrevious () |
| bool | SelectedSearch (const wxRect &rect, bool shiftdown=false) |
| Searching data for selection. | |
| bool | SelectedClear () |
| Clear all selected objects. | |
| bool | SelectedInvert () |
| Invert selected values. | |
| bool | SelectByOid () |
| void | CheckGeometryValidity () |
| void | ExportSelectedGeometries (const wxFileName &file) |
| bool | LoadProjectLayers () |
| Load all layers (non threaded) | |
| bool | ReloadProjectLayers (bool bFullExtent=TRUE, bool bInvalidateFullExt=TRUE) |
| tmSelectedDataMemory * | GetSelectedDataMemory () |
| void | BlockRefreshProcess (bool block=true) |
| bool | GetRefreshBlocked () |
| void | SetSelectionColour (const wxColour &col) |
| void | SetSelectionHalo (bool hashalo) |
Static Public Member Functions | |
| static void | EnableLogging (bool enable=true) |
| static bool | IsLoggingEnabled () |
GIS class for dealing with layers.
This is the super class for dealing with GIS. This class is the central point dealing with :
| tmLayerManager::tmLayerManager | ( | wxWindow * | parent, |
| TocCtrl * | tocctrl, | ||
| tmRenderer * | renderer, | ||
| wxStatusBar * | status, | ||
| tmScaleCtrlCombo * | scalectrl ) |
Constructor.
Init values to default and init members.
| tmLayerManager::~tmLayerManager | ( | ) |
Destructor.
| void tmLayerManager::AddLayer | ( | wxCommandEvent & | event | ) |
Response to the event sent by the "Add Gis Data" menu.
This function is doing following operations :
| void tmLayerManager::GroupAdd | ( | wxCommandEvent & | event | ) |
Create the group, and add it to the database. Then call the TocCtrl and add it.
| bool tmLayerManager::InitLayerManager | ( | DataBaseTM * | db | ) |
Init the layer manager with a project.
Call this function when a project is opened, this allows the needed initialization to takes place.
| db | Pointer to a valid DataBaseTM object (ASSERT is done in debug mode) |
| bool tmLayerManager::LoadProjectLayers | ( | ) |
Load all layers (non threaded)
This functions does closely the same that the ReloadProjectLayers() one but isn't threaded and is called during project opening.
| void tmLayerManager::OnDisplayProperties | ( | wxCommandEvent & | event | ) |
Show properties dialog.
| event | Contain the tmLayerProperties info. Use GetClientInfo() for getting info out. |
| void tmLayerManager::OnScaleChanged | ( | wxCommandEvent & | event | ) |
Called when user change scale.
This function is called by the Scale control (tmScaleCtrlCombo) when user specify a scale.
| event | empty. |
| void tmLayerManager::OnShowLayer | ( | wxCommandEvent & | event | ) |
Called when showing or hiding a layer.
This function is called by the TOC (#tmTOCCtrl) when a layers is displayed or hidden
| event | empty. |
| void tmLayerManager::OnSizeChange | ( | wxCommandEvent & | event | ) |
Called when windows size change.
This function is called by the renderer (tmRenderer) when the size change. It call the rendering of all layers in a multi-threaded way.
| event | Contain a tmArraySize with :
|
| void tmLayerManager::OnUpdateCoordinates | ( | wxCommandEvent & | event | ) |
Respond to mouse mouve inside renderer area.
This function is called automatically by the tmRenderer class when the mouse is moved inside the display area
| void tmLayerManager::OnZoomToFit | ( | ) |
Called when user press Zoom to fit.
This functions does the following :
| void tmLayerManager::RemoveLayer | ( | wxCommandEvent & | event | ) |
Response to the event sent by the #tmTOCCtrl.
Item was already deleted from the tmTOCCtrl and is now removed from the DB and the display is refreshed.
| event | Contain the layer database ID into the GetExtraLong() function |
| bool tmLayerManager::SelectedClear | ( | ) |
Clear all selected objects.
This function clear all selected objects
| bool tmLayerManager::SelectedInvert | ( | ) |
Invert selected values.
| bool tmLayerManager::SelectedSearch | ( | const wxRect & | rect, |
| bool | shiftdown = false ) |
Searching data for selection.
This function search and update the tmSelectedDataMemory structure with searched data. If this function return true we should redraw all layers
| rect | area we sould search for selecting data |
| shiftdown | status of the shift key. If down we mainly add data to the selection |
| bool tmLayerManager::UnInitLayerManager | ( | ) |
Un-Init the layer manager.
Call this function when a project is closed