16#ifndef _TM_LAYERMANAGER_H_
17#define _TM_LAYERMANAGER_H_
29#include "../database/database_tm.h"
31#include "tmgisdatavectormysql.h"
32#include "tmrenderer.h"
33#include "tmscalectrl.h"
34#include "tmselecteddatamemory.h"
35#include "tmmanagerevent.h"
36#include "tmmemoryzoom.h"
39#define ID_MENU_UNLINK_SPATIAL_DATA 10023
42class tmGISLoadingDataThread;
65 tmGISLoadingDataThread* m_Thread;
67 wxStatusBar* m_StatusBar;
75 long m_InternetRefreshTime;
79 wxBitmap* m_ThreadBitmap;
84 bool SaveTOCStatus(
bool isClosing =
false);
89 wxArrayString m_RotationName;
90 wxArrayShort m_RotationStatus;
91 wxArrayString m_RotationLayerNames;
96 bool _ReplaceLayer(
const wxFileName& filename,
const wxString& originalname);
98 void _BuildOverviewsIfNeeded(
tmGISData* layer,
const wxString& displayname);
101 void OnZoomRectangleIn(wxCommandEvent& event);
103 void OnZoomRectangleOut(wxCommandEvent& event);
105 void OnZoomToFeature(wxCommandEvent& event);
107 void OnMoveToFeature(wxCommandEvent& event);
109 void OnPanFinished(wxCommandEvent& event);
111 void OnScrolled(wxCommandEvent& event);
113 void OnSelection(wxCommandEvent& event);
115 void OnRemoveLayers(wxCommandEvent& event);
117 void OnRotationWarning(wxCommandEvent& event);
119 void OnIncompatibleLayerWarning(wxCommandEvent& event);
122 void CreateEmptyBitmap(
const wxSize& size);
125 int ReadLayerExtent(
bool loginfo =
false,
bool buildpyramids =
false);
129 DECLARE_EVENT_TABLE()
139 void InitScaleCtrlList();
151 void AddLayer(wxCommandEvent& event);
155 void GroupAdd(wxCommandEvent& event);
157 bool OpenLayer(
const wxFileName& filename,
bool replace =
false,
const wxString& originalname = wxEmptyString);
163 bool ZoomToLayer(
long layerid);
165 void ZoomToSelectedLayer();
167 void ZoomToFrameLayer();
174 void OnUpdateAngle(wxCommandEvent& event);
182 void OnDisplayLabels(wxCommandEvent& event);
184 void OnTocEdited(wxCommandEvent& event);
187 static void EnableLogging(
bool enable =
true) {
191 static bool IsLoggingEnabled() {
198 void OnZoomRectangle();
206 bool HasZoomPrevious();
217 void CheckGeometryValidity();
219 void ExportSelectedGeometries(
const wxFileName& file);
223 bool ReloadProjectLayers(
bool bFullExtent = TRUE,
bool bInvalidateFullExt = TRUE);
226 return &m_SelectedData;
230 void BlockRefreshProcess(
bool block =
true) {
231 m_BlockRefresh = block;
234 bool GetRefreshBlocked() {
235 return m_BlockRefresh;
238 void SetSelectionColour(
const wxColour& col) {
239 m_SelectedData.SetSelectionColour(col);
242 void SetSelectionHalo(
bool hashalo) {
243 m_SelectedData.SetSelectionHalo(hashalo);
Definition database_tm.h:80
Definition prjdefmemmanage.h:54
In charge of all the drawing into bitmaps.
Definition tmdrawer.h:50
Main class for dealing with GIS data.
Definition tmgisdata.h:48
Definition tmgisscale.h:100
GIS class for dealing with layers.
Definition tmlayermanager.h:57
void OnScaleChanged(wxCommandEvent &event)
Called when user change scale.
Definition tmlayermanager.cpp:899
bool SelectedInvert()
Invert selected values.
Definition tmlayermanager.cpp:1112
bool UnInitLayerManager()
Un-Init the layer manager.
Definition tmlayermanager.cpp:145
void GroupAdd(wxCommandEvent &event)
Definition tmlayermanager.cpp:471
void OnZoomToFit()
Called when user press Zoom to fit.
Definition tmlayermanager.cpp:988
void OnDisplayProperties(wxCommandEvent &event)
Show properties dialog.
Definition tmlayermanager.cpp:919
void OnSizeChange(wxCommandEvent &event)
Called when windows size change.
Definition tmlayermanager.cpp:768
bool SelectedSearch(const wxRect &rect, bool shiftdown=false)
Searching data for selection.
Definition tmlayermanager.cpp:1016
bool InitLayerManager(DataBaseTM *db)
Init the layer manager with a project.
Definition tmlayermanager.cpp:112
void OnShowLayer(wxCommandEvent &event)
Called when showing or hiding a layer.
Definition tmlayermanager.cpp:887
bool LoadProjectLayers()
Load all layers (non threaded)
Definition tmlayermanager.cpp:1484
bool SelectedClear()
Clear all selected objects.
Definition tmlayermanager.cpp:1094
void AddLayer(wxCommandEvent &event)
Response to the event sent by the "Add Gis Data" menu.
Definition tmlayermanager.cpp:425
~tmLayerManager()
Destructor.
Definition tmlayermanager.cpp:98
void OnUpdateCoordinates(wxCommandEvent &event)
Respond to mouse mouve inside renderer area.
Definition tmlayermanager.cpp:807
void RemoveLayer(wxCommandEvent &event)
Response to the event sent by the #tmTOCCtrl.
Definition tmlayermanager.cpp:288
tmMemoryZoomManager
Definition tmmemoryzoom.h:60
Definition tmrenderer.h:99
Definition tmscalectrl.h:31
Store ID of selected data into memory.
Definition tmselecteddatamemory.h:43