[GRASS-SVN] r57285 - grass/trunk/gui/wxpython/iclass
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jul 26 17:06:19 PDT 2013
Author: turek
Date: 2013-07-26 17:06:18 -0700 (Fri, 26 Jul 2013)
New Revision: 57285
Modified:
grass/trunk/gui/wxpython/iclass/frame.py
grass/trunk/gui/wxpython/iclass/toolbars.py
Log:
wx.iclass: added button for scatter plot
Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py 2013-07-27 00:04:35 UTC (rev 57284)
+++ grass/trunk/gui/wxpython/iclass/frame.py 2013-07-27 00:06:18 UTC (rev 57285)
@@ -1123,7 +1123,27 @@
toolbar.action['id'] = -1
toolbar.OnTool(None)
+ def OnScatterplot(self, event):
+ """!Init interactive scatterplot tools
+ """
+ if self.dialogs['scatt_plot']:
+ self.dialogs['scatt_plot'].Raise()
+ return
+ try:
+ from scatt_plot.dialogs import ScattPlotMainDialog
+ except:
+ GError(parent = self, message = _("The Scatter Plot Tool is not installed."))
+ return
+
+ self.dialogs['scatt_plot'] = ScattPlotMainDialog(parent=self, giface=self._giface, iclass_mapwin = self.GetFirstWindow())
+
+ scatt_mgr = self.dialogs['scatt_plot'].GetScattMgr()
+ scatt_mgr.DigitDataChanged(self.toolbars['vdigit'].mapLayer.GetName(), self.GetFirstWindow().digit)
+
+ self.dialogs['scatt_plot'].CenterOnScreen()
+ self.dialogs['scatt_plot'].Show()
+
class MapManager:
"""! Class for managing map renderer.
Modified: grass/trunk/gui/wxpython/iclass/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/toolbars.py 2013-07-27 00:04:35 UTC (rev 57284)
+++ grass/trunk/gui/wxpython/iclass/toolbars.py 2013-07-27 00:06:18 UTC (rev 57285)
@@ -47,6 +47,8 @@
label = _('Import training areas from vector map')),
'addRgb' : MetaIcon(img = 'layer-rgb-add',
label = _('Add RGB map layer')),
+ 'scatt_plot' : MetaIcon(img = 'layer-raster-analyze',
+ label = _('Open Scatter Plot Tool (EXPERIMENTAL GSoC 2013)')),
}
class IClassMapToolbar(BaseToolbar):
@@ -119,6 +121,9 @@
self.parent.OnZoomBack),
("zoomToMap", icons["zoomExtent"],
self.parent.OnZoomToMap),
+ (None, ),
+ ("scatt_plot", iClassIcons["scatt_plot"],
+ self.parent.OnScatterplot)
))
class IClassToolbar(BaseToolbar):
"""!IClass toolbar
More information about the grass-commit
mailing list