[GRASS-SVN] r43054 - in grass/branches/develbranch_6/gui: icons/grass2 wxpython wxpython/gui_modules wxpython/icons

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 11 17:24:28 EDT 2010


Author: martinl
Date: 2010-08-11 21:24:28 +0000 (Wed, 11 Aug 2010)
New Revision: 43054

Added:
   grass/branches/develbranch_6/gui/icons/grass2/modeler-main.png
   grass/branches/develbranch_6/gui/icons/grass2/modeler-variables.png
Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
   grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py
   grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py
   grass/branches/develbranch_6/gui/wxpython/icons/icon.py
   grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py
   grass/branches/develbranch_6/gui/wxpython/wxgui.py
Log:
wxGUI: add new modeler icons (thanks to Robert Szczepanek)
(merge r43052 & r43053 from trunk)


Copied: grass/branches/develbranch_6/gui/icons/grass2/modeler-main.png (from rev 43052, grass/trunk/gui/icons/grass2/modeler-main.png)
===================================================================
(Binary files differ)


Property changes on: grass/branches/develbranch_6/gui/icons/grass2/modeler-main.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Copied: grass/branches/develbranch_6/gui/icons/grass2/modeler-variables.png (from rev 43052, grass/trunk/gui/icons/grass2/modeler-variables.png)
===================================================================
(Binary files differ)


Property changes on: grass/branches/develbranch_6/gui/icons/grass2/modeler-variables.png
___________________________________________________________________
Added: svn:mime-type
   + image/png

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-08-11 21:19:30 UTC (rev 43053)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gmodeler.py	2010-08-11 21:24:28 UTC (rev 43054)
@@ -615,6 +615,10 @@
         else:
             self.SetTitle(self.baseTitle)
         
+    def OnVariables(self, event):
+        """!Switch to variables page"""
+        self.notebook.SetSelection(2)
+        
     def OnRemoveItem(self, event):
         """!Remove shape
         """

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2010-08-11 21:19:30 UTC (rev 43053)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py	2010-08-11 21:24:28 UTC (rev 43054)
@@ -81,7 +81,6 @@
         if label:
             Debug.msg(3, "CreateTool(): tool=%d, label=%s bitmap=%s" % \
                   (tool, label, bitmap))
-            
             toolWin = self.AddLabelTool(tool, label, bitmap,
                                         bmpDisabled, kind,
                                         shortHelp, longHelp)
@@ -1483,6 +1482,9 @@
              wx.ITEM_NORMAL, Icons['modelRun'].GetLabel(), Icons['modelRun'].GetDesc(),
              self.parent.OnRunModel),
             ('', '', '', '', '', '', ''),
+            (self.variables, "variables", Icons["modelVariables"].GetBitmap(),
+             wx.ITEM_NORMAL, Icons["modelVariables"].GetLabel(), Icons["modelVariables"].GetDesc(),
+             self.parent.OnVariables),
             (self.settings, "settings", Icons["modelSettings"].GetBitmap(),
              wx.ITEM_NORMAL, Icons["modelSettings"].GetLabel(), Icons["modelSettings"].GetDesc(),
              self.parent.OnPreferences),
@@ -1549,7 +1551,7 @@
         
         # realize the toolbar
         self.Realize()
-        
+
     def ToolbarData(self):
         """!Toolbar data"""
         self.newdisplay = wx.NewId()
@@ -1567,6 +1569,7 @@
         self.delcmd = wx.NewId()
         self.attribute = wx.NewId()
         self.preferences = wx.NewId()
+        self.modeler = wx.NewId() 
         
         # tool, label, bitmap, kind, shortHelp, longHelp, handler
         return (
@@ -1616,6 +1619,9 @@
              wx.ITEM_NORMAL, Icons["attrtable"].GetLabel(), Icons["attrtable"].GetDesc(),
              self.parent.OnShowAttributeTable),
             ('', '', '', '', '', '', ''),
+            (self.modeler, 'modeler', Icons["modeler"].GetBitmap(),
+             wx.ITEM_NORMAL, Icons["modeler"].GetLabel(), Icons["modeler"].GetDesc(),
+             self.parent.OnGModeler),
             (self.preferences, 'preferences', Icons["settings"].GetBitmap(),
              wx.ITEM_NORMAL, Icons["settings"].GetLabel(), Icons["settings"].GetDesc(),
              self.parent.OnPreferences)

Modified: grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py	2010-08-11 21:19:30 UTC (rev 43053)
+++ grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py	2010-08-11 21:24:28 UTC (rev 43054)
@@ -86,6 +86,7 @@
     "addthematic": 'layer-vector-thematic-add.png',
     "addchart"   : 'layer-vector-chart-add.png',
     "layeropts"  : 'options.png',
+    "modeler"    : 'modeler-main.png',
     # profile analysis
     "transect"     : 'layer-raster-profile.png',
     "profiledraw"  : 'show.png',
@@ -107,6 +108,7 @@
     "imageSave"      : 'image-export.png',
     "pythonSave"     : 'python-export.png',
     "modelProperties" : 'options.png',
+    "modelVariables" : 'modeler-variables.png',
     # various
     "settings"       : 'settings.png',
     'redraw'         : 'redraw.png',

Modified: grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py	2010-08-11 21:19:30 UTC (rev 43053)
+++ grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py	2010-08-11 21:24:28 UTC (rev 43054)
@@ -79,6 +79,7 @@
     "addbarscale": 'module-d.barscale.gif',
     "addlegend"  : 'module-d.legend.gif',
     "quit"       : 'gui-exit.gif',
+    "modeler"    : wx.ART_ERROR,
     # analyze raster
     "analyze"    : 'gui-rastanalyze.gif',
     "measure"    : 'gui-measure.gif',
@@ -109,6 +110,7 @@
     "imageSave"      : wx.ART_ERROR,
     "pythonSave"     : wx.ART_ERROR,
     "modelProperties" : wx.ART_ERROR,
+    "modelVariables" : wx.ART_ERROR,
     # various
     "settings"       : 'edit-color.gif',
     "redraw"         : 'gui-display.gif',

Modified: grass/branches/develbranch_6/gui/wxpython/icons/icon.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/icon.py	2010-08-11 21:19:30 UTC (rev 43053)
+++ grass/branches/develbranch_6/gui/wxpython/icons/icon.py	2010-08-11 21:24:28 UTC (rev 43054)
@@ -81,10 +81,9 @@
     sys.exit(1)
 
 class MetaIcon:
+    """!Handle icon metadata (image path, tooltip, ...)
     """
-    Handle icon metadata (image path, tooltip, ...)
-    """
-    def __init__(self, img, label, desc=None):
+    def __init__(self, img, label, desc = None):
         self.imagepath = img
         if not self.imagepath:
             self.type = 'unknown'
@@ -93,41 +92,41 @@
                 self.type = 'wx'
             else:
                 self.type = 'img'
-
+        
         self.label = label
-
+        
         if desc:
             self.description = desc
         else:
             self.description = ''
-
+        
     def __str__(self):
         """!Debugging"""
         return "label=%s, img=%s, type=%s" % (self.label, self.imagepath, self.type)
 
-    def GetBitmap(self, size=None):
+    def GetBitmap(self, size = None):
         """!Get bitmap"""
         bmp = None
-
+        
         if self.type == 'wx':
-            bmp = wx.ArtProvider.GetBitmap(id=self.imagepath, client=wx.ART_TOOLBAR, size=size)
+            bmp = wx.ArtProvider.GetBitmap(id = self.imagepath, client = wx.ART_TOOLBAR, size = size)
         elif self.type == 'img':
             if os.path.isfile(self.imagepath) and os.path.getsize(self.imagepath):
                 if size and len(size) == 2:
-                    image = wx.Image (name=self.imagepath)
-                    image.Rescale (size[0], size[1])
+                    image = wx.Image(name = self.imagepath)
+                    image.Rescale(size[0], size[1])
                     bmp = image.ConvertToBitmap()
                 elif self.imagepath:
-                    bmp = wx.Bitmap (name=self.imagepath)
-
+                    bmp = wx.Bitmap(name = self.imagepath)
+        
         return bmp
-
+    
     def GetLabel(self):
         return self.label
-
+    
     def GetDesc(self):
         return self.description
-
+    
     def GetImageName(self):
         return os.path.basename(self.imagepath)
 
@@ -343,6 +342,8 @@
                           label=_("Quit 3D view mode"),
                           desc=_("Switch back to 2D view mode")),
     # modeler
+    "modeler" : MetaIcon (img=Icons["modeler"],
+                          label=_("Start Graphical Modeler")),
     "modelNew" : MetaIcon (img=Icons["fileNew"],
                            label=_("Create new model (Ctrl+N)")),
     "modelOpen" : MetaIcon (img=Icons["fileOpen"],
@@ -367,7 +368,7 @@
                                 label=_("Show modeler settings")),
     "modelProperties" : MetaIcon (img=Icons["modelProperties"],
                                   label=_("Show model properties")),
-    "modelVariables" : MetaIcon (img=Icons["modelProperties"],
+    "modelVariables" : MetaIcon (img=Icons["modelVariables"],
                                  label=_("Manage model variables")),
     "modelRedraw" : MetaIcon (img=Icons["redraw"],
                               label=_("Redraw model canvas")),

Modified: grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py	2010-08-11 21:19:30 UTC (rev 43053)
+++ grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py	2010-08-11 21:24:28 UTC (rev 43054)
@@ -89,6 +89,7 @@
     "addthematic": 'thematic.png',
     "addchart"   : 'chart_bar.png',
     "layeropts"  : 'map_edit.png',
+    "modeler"    : wx.ART_ERROR,
     # profile analysis
     "transect"   : 'image_edit.png',
     "profiledraw"  : 'arrow_refresh.png',
@@ -111,6 +112,7 @@
     "imageSave"      : wx.ART_ERROR,
     "pythonSave"     : wx.ART_ERROR,
     "modelProperties" : wx.ART_ERROR,
+    "modelVariables" : wx.ART_ERROR,
     # various
     "settings"     : 'color_swatch.png',
     "redraw"       : 'arrow_refresh.png',


Property changes on: grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py
___________________________________________________________________
Modified: svn:mergeinfo
   - /grass/branches/releasebranch_6_4/gui/wxpython/icons/silk_icons.py:42375
/grass/trunk/gui/wxpython/icons/silk_icons.py:41584,41586-41587,41590-41592,41594,41596,41598,41600,41806,41884,41888,42350,42372,42377,42498,42704,42777-42779
   + /grass/branches/releasebranch_6_4/gui/wxpython/icons/silk_icons.py:42375
/grass/trunk/gui/wxpython/icons/silk_icons.py:41584,41586-41587,41590-41592,41594,41596,41598,41600,41806,41884,41888,42350,42372,42377,42498,42704,42777-42779,43052-43053

Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-08-11 21:19:30 UTC (rev 43053)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py	2010-08-11 21:24:28 UTC (rev 43054)
@@ -98,7 +98,7 @@
     """
     def __init__(self, parent, id = wx.ID_ANY, title = _("GRASS GIS Layer Manager"),
                  workspace = None,
-                 size = (575, 450), style = wx.DEFAULT_FRAME_STYLE, **kwargs):
+                 size = (600, 450), style = wx.DEFAULT_FRAME_STYLE, **kwargs):
         self.parent    = parent
         self.baseTitle = title
         self.iconsize  = (16, 16)



More information about the grass-commit mailing list