[GRASS-SVN] r47094 - grass-addons/grass7/gui/wxpython/wx.stream/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Jul 11 08:19:06 EDT 2011


Author: madi
Date: 2011-07-11 05:19:06 -0700 (Mon, 11 Jul 2011)
New Revision: 47094

Modified:
   grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream_panelOne.py
Log:
heading and minor changes

Modified: grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream_panelOne.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream_panelOne.py	2011-07-11 12:04:47 UTC (rev 47093)
+++ grass-addons/grass7/gui/wxpython/wx.stream/gui_modules/rstream_panelOne.py	2011-07-11 12:19:06 UTC (rev 47094)
@@ -1,20 +1,37 @@
 #!/usr/bin/python
 # -*- coding: utf-8 -*-
 
+"""!
+ at package rstream.py
+
+ at brief GUI for r.stream.* modules
+
+See http://grass.osgeo.org/wiki/Wx.stream_GSoC_2011
+
+Classes:
+ - RStreamFrame
+
+(C) 2011 by Margherita Di Leo, and the GRASS Development Team
+This program is free software under the GNU General Public License
+(>=v2). Read the file COPYING that comes with GRASS for details.
+
+ at author Margherita Di Leo (GSoC student 2011)
+"""
+
 import wx
 import gselect
 
 # First panel # Network extraction
 
 class TabPanelOne(wx.Panel):
+
     def __init__(self, parent):
-
         wx.Panel.__init__(self, parent, id = wx.ID_ANY)
        
         self.parent = parent
         
         # define the panel for select maps
-	self.panel = wx.Panel(self)                                  
+	self.panel = wx.Panel(self)                        
 
 	# create the layout
         self._layout()
@@ -44,17 +61,18 @@
         # Ask user for Flow accumulation
         text2 = wx.StaticText(parent = self.panel, id = wx.ID_ANY, label = "INPUT/OUTPUT : Flow accumulation (required)") 
         select.Add(item = text2, flag = wx.LEFT, pos = (3,0), span = wx.DefaultSpan)
+        
 
         # Flow accum can be either existent or to be calculated
         # Check box
         hbox1 = wx.BoxSizer(wx.HORIZONTAL)
 
-        cb1 = wx.CheckBox(parent = self.panel, label='Create by MFD algorithm')
-        hbox1.Add(item = cb1, flag = wx.LEFT, border=10)
-        cb2 = wx.CheckBox(parent = self.panel, label='Create by SFD algorithm')
-        hbox1.Add(item = cb2, flag = wx.LEFT, border=10)
-        cb3 = wx.CheckBox(parent = self.panel, label='Custom (select existing map)')
-        hbox1.Add(item = cb3, flag = wx.LEFT, border=10)
+        cb1 = wx.CheckBox(parent = self.panel, label = 'Create by MFD algorithm')
+        hbox1.Add(item = cb1, flag = wx.LEFT, border = 0)
+        cb2 = wx.CheckBox(parent = self.panel, label = 'Create by SFD algorithm')
+        hbox1.Add(item = cb2, flag = wx.LEFT, border = 0)
+        cb3 = wx.CheckBox(parent = self.panel, label = 'Custom (select existing map)')
+        hbox1.Add(item = cb3, flag = wx.LEFT, border = 0)
 
         select.Add(item = hbox1, pos = (4,0))
         
@@ -146,15 +164,22 @@
         sizer.Add(self.panel, 1, wx.EXPAND)
         sizer.Add(btnPanel, 0, wx.EXPAND)
         self.SetSizer(sizer)
-
+    
         
     def OnSelect(self, event):
-            """!Gets raster map or function selection and send it to
-            insertion method
-            """
-            item = event.GetString()
-            self._addSomething(item)        
+        """!Gets raster map or function selection and send it to
+        insertion method
+        """
+        item = event.GetString()
+        self._addSomething(item)  
+        import pdb; pdb.set_trace()
 
+    def _addSomething(self, what):
+        """!builds the list of variables 
+        """
+        pass 
+      
+
     def buttonData(self):
         return (("Update Preview", self.OnPreview),        
                 ("Run Analysis", self.OnRun))



More information about the grass-commit mailing list