ToolMap
Loading...
Searching...
No Matches
tmEditManager Class Reference

Deals with editing data. More...

#include <tmeditmanager.h>

Inheritance diagram for tmEditManager:

Public Member Functions

 tmEditManager (ToolMapFrame *parent, TocCtrl *toc, tmSelectedDataMemory *seldata, tmRenderer *renderer, tmGISScale *scale)
 Constructor.
 
 ~tmEditManager ()
 Destructor.
 
void SetDatabase (DataBaseTM *database)
 
void SetSnappingMemoryRef (tmSnappingMemory *snapping)
 
void SetSnappingShowOnMap (bool show)
 
void OnToolEdit ()
 User select edit tool.
 
void OnToolBezier ()
 
void OnToolBezierModify ()
 
void OnToolModify ()
 User select modify tool.
 
void OnToolEditShared ()
 
void OnToolCutLines ()
 Set tool to cut line tool.
 
void OnToolOrientedPoint ()
 Set oriented point tool.
 
void OnToolVertexDelete ()
 
void OnToolVertexInsert ()
 
bool IsDrawingAllowed ()
 Are we ready for drawing.
 
bool IsModificationAllowed ()
 Are we ready for drawing.
 
bool IsModificationBezierAllowed ()
 
bool IsLayerSpatialType (int layerType=LAYER_SPATIAL_LINE)
 
bool IsMultipleModificationAllowed ()
 
bool DeleteSelected (bool clearSelection=true)
 Delete the geometry and attribution of selected object.
 
bool UndoLastVertex ()
 Remove the last vertex from memory.
 
bool HasLastVertex ()
 
int GetSelectionCount ()
 Number of selected features.
 
bool SelectedSearch (const wxPoint &screenpt)
 Search function.
 
bool CreateIntersections ()
 Create intersections.
 
bool EditVertexPosition ()
 Display a dialog for editing vertex position.
 
bool MergeSelectedLines ()
 Merge selected lines.
 
bool FlipLine ()
 
bool SmoothLine ()
 
void BezierClick (const wxPoint &mousepos)
 
void BezierMove (const wxPoint &mousepos)
 
void BezierDraw (wxGCDC *dc)
 
void BezierClear ()
 
void BezierModifyDraw (wxGCDC *dc)
 
void BezierModifyClickDown (const wxPoint &mousepos)
 
void BezierModifyClickMove (const wxPoint &mousepos)
 
void BezierModifyClickUp (const wxPoint &mousepos)
 
bool BezierToLine (BezierSettingsData settings)
 
bool IsBezierToLinePreviewAllowed ()
 
void SetBezierSettings (BezierSettingsData data, bool savetodb=false)
 
BezierSettingsData GetBezierSettings ()
 
void ArcClick (const wxPoint &mousepos)
 
void ArcMove (const wxPoint &mousepos)
 
void ArcDraw (wxGCDC *dc)
 
void ArcClear ()
 
void ArcModifyClickDown (const wxPoint &mousepos)
 
void ArcModifyClickMove (const wxPoint &mousepos)
 
void ArcModifyClickUp (const wxPoint &mousepos)
 
void ArcVertexInsertUp (const wxPoint &mousepos)
 
void ArcVertexDeleteUp (const wxPoint &mousePos)
 
void DrawSnappingCircle (wxGCDC *dc)
 

Detailed Description

Deals with editing data.

This class is in charge of all stuff related to the editing process (points, lines)

Author
Lucien Schreiber (c) CREALP 2009
Date
26 January 2009

Constructor & Destructor Documentation

◆ tmEditManager()

tmEditManager::tmEditManager ( ToolMapFrame parent,
TocCtrl toc,
tmSelectedDataMemory seldata,
tmRenderer renderer,
tmGISScale scale 
)

Constructor.

Author
Lucien Schreiber (c) CREALP 2009
Date
26 January 2009

◆ ~tmEditManager()

tmEditManager::~tmEditManager ( )

Destructor.

Author
Lucien Schreiber (c) CREALP 2009
Date
26 January 2009

Member Function Documentation

◆ CreateIntersections()

bool tmEditManager::CreateIntersections ( )

Create intersections.

between the selected line and all crossed lines.

Returns
true if all works, false otherwise
Author
Lucien Schreiber (c) CREALP 2009
Date
09 February 2009

◆ DeleteSelected()

bool tmEditManager::DeleteSelected ( bool  clearSelection = true)

Delete the geometry and attribution of selected object.

Parameters
clearSelectiontrue if we sould clear selection ids, if you need to delete more stuff (attribution for exemple) set to false
Returns
true if geometry are deleted
Author
Lucien Schreiber (c) CREALP 2009
Date
05 February 2009

◆ EditVertexPosition()

bool tmEditManager::EditVertexPosition ( )

Display a dialog for editing vertex position.

Checks are done internally for ensuring that :

  • An object is selected
  • Editing layer is selected
    Returns
    true if Editing vertex is allowed, false otherwise
    Author
    Lucien Schreiber (c) CREALP 2009
    Date
    23 February 2009

◆ GetSelectionCount()

int tmEditManager::GetSelectionCount ( )

Number of selected features.

Returns
the number of features selected
Author
Lucien Schreiber (c) CREALP 2009
Date
12 May 2009

◆ IsDrawingAllowed()

bool tmEditManager::IsDrawingAllowed ( )

Are we ready for drawing.

Returns
True if all validation are ok for editing
Author
Lucien Schreiber (c) CREALP 2009
Date
28 January 2009

◆ IsModificationAllowed()

bool tmEditManager::IsModificationAllowed ( )

Are we ready for drawing.

Returns
True if all validation are ok for editing
Author
Lucien Schreiber (c) CREALP 2009
Date
28 January 2009

◆ MergeSelectedLines()

bool tmEditManager::MergeSelectedLines ( )

Merge selected lines.

This function Checks the following rules:

  • Minimum two objects of type lines should been selected.
  • Editing mode should be turned on. Merging is done without user input if all selected lines share the same attribution. If a line is different, a dialog-box is displayed allowing the user to choice the attribution he want to keep for the new merged line.
    Returns
    true if merging was successfull or allowed, see above
    Author
    Lucien Schreiber (c) CREALP 2009
    Date
    27 February 2009

◆ OnToolCutLines()

void tmEditManager::OnToolCutLines ( )

Set tool to cut line tool.

Author
Lucien Schreiber (c) CREALP 2009
Date
05 February 2009

◆ OnToolEdit()

void tmEditManager::OnToolEdit ( )

User select edit tool.

Author
Lucien Schreiber (c) CREALP 2009
Date
26 January 2009

◆ OnToolModify()

void tmEditManager::OnToolModify ( )

User select modify tool.

Author
Lucien Schreiber (c) CREALP 2009
Date
26 January 2009

◆ OnToolOrientedPoint()

void tmEditManager::OnToolOrientedPoint ( )

Set oriented point tool.

Author
Lucien Schreiber (c) CREALP 2009
Date
24 September 2009

◆ SelectedSearch()

bool tmEditManager::SelectedSearch ( const wxPoint &  screenpt)

Search function.

This function is widly inspired from tmLayerManager

Parameters
screenptCoordinate of the clicked point
Returns
true if an object was found
Author
Lucien Schreiber (c) CREALP 2009
Date
06 February 2009

◆ UndoLastVertex()

bool tmEditManager::UndoLastVertex ( )

Remove the last vertex from memory.

This function will only work while editing lines, calling this for points wont work

Returns
true if the last vertex was successfully removed
Author
Lucien Schreiber (c) CREALP 2009
Date
05 February 2009

The documentation for this class was generated from the following files: