[GRASS-SVN] r53717 - grass/branches/develbranch_6/gui/wxpython/modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 7 01:28:58 PST 2012


Author: martinl
Date: 2012-11-07 01:28:57 -0800 (Wed, 07 Nov 2012)
New Revision: 53717

Modified:
   grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py
Log:
wxGUI/mapcalc: change layout


Modified: grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py	2012-11-07 00:04:25 UTC (rev 53716)
+++ grass/branches/develbranch_6/gui/wxpython/modules/mcalc_builder.py	2012-11-07 09:28:57 UTC (rev 53717)
@@ -6,7 +6,7 @@
 Classes:
  - mcalc_builder::MapCalcFrame
 
-(C) 2008, 2011 by the GRASS Development Team
+(C) 2008, 2011-2012 by 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.
@@ -19,13 +19,13 @@
 import os
 import sys
 
-if __name__ == "__main__":
-    sys.path.append(os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython'))
-from core import globalvar
 import wx
-
 import grass.script as grass
 
+if __name__ == "__main__":
+    sys.path.append(os.path.join(os.getenv('GISBASE'), 'etc', 'wxpython'))
+
+from core             import globalvar
 from core.gcmd        import GError, RunCommand
 from gui_core.gselect import Select
 from core.settings    import UserSettings
@@ -119,6 +119,8 @@
         
         self.operatorBox = wx.StaticBox(parent = self.panel, id = wx.ID_ANY,
                                         label=" %s " % _('Operators'))
+        self.outputBox = wx.StaticBox(parent = self.panel, id = wx.ID_ANY,
+                                      label=" %s " % _('Output'))
         self.operandBox = wx.StaticBox(parent = self.panel, id = wx.ID_ANY,
                                        label=" %s " % _('Operands'))
         self.expressBox = wx.StaticBox(parent = self.panel, id = wx.ID_ANY,
@@ -260,7 +262,8 @@
         
         controlSizer = wx.BoxSizer(wx.HORIZONTAL)
         operatorSizer = wx.StaticBoxSizer(self.operatorBox, wx.HORIZONTAL)
-
+        outOpeSizer = wx.BoxSizer(wx.VERTICAL)
+        
         buttonSizer1 = wx.GridBagSizer(5, 1)
         buttonSizer1.Add(item = self.btn['add'], pos = (0,0))
         buttonSizer1.Add(item = self.btn['minus'], pos = (0,1))
@@ -289,19 +292,21 @@
         buttonSizer2.Add(item = self.btn['compl'], pos = (5,1))
         buttonSizer2.Add(item = self.btn['not'], pos = (4,1))
 
+        outputSizer = wx.StaticBoxSizer(self.outputBox, wx.VERTICAL)
+        outputSizer.Add(item = self.newmaplabel,
+                        flag = wx.ALIGN_CENTER)
+        outputSizer.Add(item = self.newmaptxt,
+                        flag = wx.EXPAND)
+        
         operandSizer = wx.StaticBoxSizer(self.operandBox, wx.HORIZONTAL)
         buttonSizer3 = wx.GridBagSizer(7, 1)
-        buttonSizer3.Add(item = self.newmaplabel, pos = (0,0),
-                         span = (1, 2), flag = wx.ALIGN_CENTER)
-        buttonSizer3.Add(item = self.newmaptxt, pos = (1,0),
-                         span = (1, 2))
-        buttonSizer3.Add(item = self.functlabel, pos = (2,0),
+        buttonSizer3.Add(item = self.functlabel, pos = (0,0),
                          span = (1,2), flag = wx.ALIGN_CENTER)
-        buttonSizer3.Add(item = self.function, pos = (3,0),
+        buttonSizer3.Add(item = self.function, pos = (1,0),
                          span = (1,2))                         
-        buttonSizer3.Add(item = self.mapsellabel, pos = (4,0),
+        buttonSizer3.Add(item = self.mapsellabel, pos = (2,0),
                          span = (1,2), flag = wx.ALIGN_CENTER)
-        buttonSizer3.Add(item = self.mapselect, pos = (5,0),
+        buttonSizer3.Add(item = self.mapselect, pos = (3,0),
                          span = (1,2))
         threebutton = wx.GridBagSizer(1, 2)
         threebutton.Add(item = self.btn['parenl'], pos = (0,0),
@@ -310,7 +315,7 @@
                          span = (1,1), flag = wx.ALIGN_CENTER)
         threebutton.Add(item = self.btn_clear, pos = (0,2),
                          span = (1,1), flag = wx.ALIGN_RIGHT)
-        buttonSizer3.Add(item = threebutton, pos = (6,0),
+        buttonSizer3.Add(item = threebutton, pos = (4,0),
 	                 span = (1,1), flag = wx.ALIGN_CENTER)
 
         buttonSizer4 = wx.BoxSizer(wx.HORIZONTAL)
@@ -337,8 +342,12 @@
         
         controlSizer.Add(item = operatorSizer, proportion = 1,
                          flag = wx.RIGHT | wx.EXPAND, border = 5)
-        controlSizer.Add(item = operandSizer, proportion = 0,
+        outOpeSizer.Add(item = outputSizer, proportion = 0,
                          flag = wx.EXPAND)
+        outOpeSizer.Add(item = operandSizer, proportion = 1,
+                         flag = wx.EXPAND | wx.TOP, border = 5)
+        controlSizer.Add(item = outOpeSizer, proportion = 0,
+                         flag = wx.EXPAND)
 
         expressSizer = wx.StaticBoxSizer(self.expressBox, wx.HORIZONTAL)
         expressSizer.Add(item = self.text_mcalc, proportion = 1,



More information about the grass-commit mailing list