[GRASS-SVN] r57385 - in grass/trunk/gui/wxpython: gui_core mapdisp nviz
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Aug 3 13:44:12 PDT 2013
Author: wenzeslaus
Date: 2013-08-03 13:44:12 -0700 (Sat, 03 Aug 2013)
New Revision: 57385
Modified:
grass/trunk/gui/wxpython/gui_core/mapwindow.py
grass/trunk/gui/wxpython/mapdisp/mapwindow.py
grass/trunk/gui/wxpython/nviz/mapwindow.py
Log:
wxGUI/mapwindow: unused parameters removed, depreciation warnings added
Modified: grass/trunk/gui/wxpython/gui_core/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapwindow.py 2013-08-03 20:29:18 UTC (rev 57384)
+++ grass/trunk/gui/wxpython/gui_core/mapwindow.py 2013-08-03 20:44:12 UTC (rev 57385)
@@ -103,10 +103,9 @@
- Pixel2Cell
- Cell2Pixel (if it is possible)
"""
- def __init__(self, parent, giface, Map, frame, **kwargs):
+ def __init__(self, parent, giface, Map):
self.parent = parent
self.Map = Map
- self.frame = frame
self._giface = giface
# mouse attributes -- position on the screen, begin and end of
@@ -174,7 +173,12 @@
def RegisterMouseEventHandler(self, event, handler, cursor = None):
"""!Binds event handler
-
+
+ @depreciated This method is depreciated. Use Signals or drawing API instead.
+ Signals do not cover all events but new Signals can be added when needed
+ consider also adding generic signal. However, more interesing and useful
+ is higher level API to create objects, graphics etc.
+
Call event.Skip() in handler to allow default processing in MapWindow.
If any error occures inside of handler, the handler is removed.
@@ -226,6 +230,8 @@
def UnregisterAllHandlers(self):
"""!Unregisters all registered handlers
+ @depreciated This method is depreciated. Use Signals or drawing API instead.
+
Before each handler is unregistered it is called with string
value "unregistered" of event parameter.
"""
@@ -242,7 +248,9 @@
def UnregisterMouseEventHandler(self, event, handler):
"""!Unbinds event handler for event
-
+
+ @depreciated This method is depreciated. Use Signals or drawing API instead.
+
Before handler is unregistered it is called with string value
"unregistered" of event parameter.
@@ -301,7 +309,7 @@
def GetLastEN(self):
"""!Returns last coordinates of mouse cursor.
- This method is depreciated.
+ @depreciated This method is depreciated. Use Signal with coordinates as parameters.
@see OnMotion
"""
Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-08-03 20:29:18 UTC (rev 57384)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-08-03 20:44:12 UTC (rev 57385)
@@ -67,8 +67,7 @@
@param style wx window style
@param kwargs keyword arguments passed to MapWindow and wx.Window
"""
- MapWindow.__init__(self, parent = parent, giface = giface, Map = Map,
- frame = frame, **kwargs)
+ MapWindow.__init__(self, parent=parent, giface=giface, Map=Map)
wx.Window.__init__(self, parent = parent, id = id, style = style, **kwargs)
self._properties = properties
Modified: grass/trunk/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/mapwindow.py 2013-08-03 20:29:18 UTC (rev 57384)
+++ grass/trunk/gui/wxpython/nviz/mapwindow.py 2013-08-03 20:44:12 UTC (rev 57385)
@@ -86,10 +86,8 @@
glcanvas.GLCanvas.__init__(self, parent, id, attribList=attribs)
else:
glcanvas.GLCanvas.__init__(self, parent, id)
-
-
- MapWindow.__init__(self, parent = parent, giface = giface, frame = frame,
- Map = Map)
+
+ MapWindow.__init__(self, parent=parent, giface=giface, Map=Map)
self.Hide()
self.init = False
More information about the grass-commit
mailing list