GRASS Programmer's Manual  6.5.svn(2012)-r51648
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
statusbar.SbGoTo Class Reference

Textctrl to set coordinates which to focus on. More...

Inheritance diagram for statusbar.SbGoTo:
Collaboration diagram for statusbar.SbGoTo:

Public Member Functions

def __init__
def ReprojectENToMap
 Reproject east, north from user defined projection.
def OnGoTo
 Go to position.
def GetCenterString
 Get current map center in appropriate format.
def SetCenter
 Set current map center as item value.
def Update
 Called when statusbar action is activated (e.g.

Data Fields

 name
 label
 widget

Detailed Description

Textctrl to set coordinates which to focus on.

Requires MapFrame.GetWindow, MapWindow.GoTo method.

Definition at line 541 of file statusbar.py.


Constructor & Destructor Documentation

def statusbar.SbGoTo.__init__ (   self,
  mapframe,
  statusbar,
  position = 0 
)
Parameters:
mapframeinstance of class with MapFrame interface
statusbarstatusbar instance (wx.Statusbar)
positionitem position in statusbar
Todo:
rewrite Update also in derived classes to take in account item position

Reimplemented from statusbar.SbItem.

Definition at line 547 of file statusbar.py.


Member Function Documentation

def statusbar.SbGoTo.GetCenterString (   self,
  map 
)

Get current map center in appropriate format.

Definition at line 624 of file statusbar.py.

References utils.Deg2DMS(), and utils.ReprojectCoordinates().

Referenced by statusbar.SbGoTo.SetCenter().

def statusbar.SbGoTo.ReprojectENToMap (   self,
  e,
  n,
  useDefinedProjection 
)

Reproject east, north from user defined projection.

Parameters:
e,ncoordinate (for DMS string, else float or string)
useDefinedProjectionprojection defined by user in settings dialog
Exceptions:
SbExceptionif useDefinedProjection is True and projection is not defined in UserSettings

Definition at line 560 of file statusbar.py.

References utils.DMS2Deg(), utils.ReprojectCoordinates(), gcmd.RunCommand(), and utils.split().

Referenced by statusbar.SbGoTo.OnGoTo().

Set current map center as item value.

Definition at line 658 of file statusbar.py.

References statusbar.SbGoTo.GetCenterString(), widgets.FloatSlider.SetValue(), statusbar.SbItem.SetValue(), and model.ModelData.SetValue().

Referenced by statusbar.SbGoTo.Update().

def statusbar.SbGoTo.Update (   self)

Called when statusbar action is activated (e.g.

through wx.Choice).

Reimplemented from statusbar.SbItem.

Definition at line 663 of file statusbar.py.

References statusbar.SbGoTo.SetCenter(), and statusbar.SbItem.Show().

Referenced by wizard.DatumPage.OnDText(), colorrules.VectorColorTable.OnLayerSelection(), manager.GroupPage.OnMkGroup(), and mapwindow.BufferedWindow.TextBounds().


Field Documentation

Definition at line 552 of file statusbar.py.

Referenced by statusbar.SbItem.GetWidget().


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