[GRASS-SVN] r45493 - in grass/branches/develbranch_6/gui/wxpython:
. gui_modules icons
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Feb 28 16:50:21 EST 2011
Author: martinl
Date: 2011-02-28 13:50:21 -0800 (Mon, 28 Feb 2011)
New Revision: 45493
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.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: major icons clean up
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/gcpmapdisp.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -77,7 +77,7 @@
"""!Main frame for map display window. Drawing takes place in
child double buffered drawing window.
"""
- def __init__(self, parent=None, id=wx.ID_ANY, title=_("Manage Ground Control Points"),
+ def __init__(self, parent=None, id=wx.ID_ANY, title=_("GRASS GIS Manage Ground Control Points"),
style=wx.DEFAULT_FRAME_STYLE, toolbars=["gcpdisp"],
tree=None, notebook=None, lmgr=None, page=None,
Map=None, auimgr=None, **kwargs):
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/layertree.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -140,49 +140,50 @@
self.folder = il.Add(trart)
bmpsize = (16, 16)
- trgif = Icons["addrast"].GetBitmap(bmpsize)
+ icons = Icons['layerManager']
+ trgif = icons["addRast"].GetBitmap(bmpsize)
self.rast_icon = il.Add(trgif)
- trgif = Icons["addrast3d"].GetBitmap(bmpsize)
+ trgif = icons["addRast3d"].GetBitmap(bmpsize)
self.rast3d_icon = il.Add(trgif)
- trgif = Icons["addrgb"].GetBitmap(bmpsize)
+ trgif = icons["addRgb"].GetBitmap(bmpsize)
self.rgb_icon = il.Add(trgif)
- trgif = Icons["addhis"].GetBitmap(bmpsize)
+ trgif = icons["addHis"].GetBitmap(bmpsize)
self.his_icon = il.Add(trgif)
- trgif = Icons["addshaded"].GetBitmap(bmpsize)
+ trgif = icons["addShaded"].GetBitmap(bmpsize)
self.shaded_icon = il.Add(trgif)
- trgif = Icons["addrarrow"].GetBitmap(bmpsize)
+ trgif = icons["addRArrow"].GetBitmap(bmpsize)
self.rarrow_icon = il.Add(trgif)
- trgif = Icons["addrnum"].GetBitmap(bmpsize)
+ trgif = icons["addRNum"].GetBitmap(bmpsize)
self.rnum_icon = il.Add(trgif)
- trgif = Icons["addvect"].GetBitmap(bmpsize)
+ trgif = icons["addVect"].GetBitmap(bmpsize)
self.vect_icon = il.Add(trgif)
- trgif = Icons["addthematic"].GetBitmap(bmpsize)
+ trgif = icons["addThematic"].GetBitmap(bmpsize)
self.theme_icon = il.Add(trgif)
- trgif = Icons["addchart"].GetBitmap(bmpsize)
+ trgif = icons["addChart"].GetBitmap(bmpsize)
self.chart_icon = il.Add(trgif)
- trgif = Icons["addgrid"].GetBitmap(bmpsize)
+ trgif = icons["addGrid"].GetBitmap(bmpsize)
self.grid_icon = il.Add(trgif)
- trgif = Icons["addgeodesic"].GetBitmap(bmpsize)
+ trgif = icons["addGeodesic"].GetBitmap(bmpsize)
self.geodesic_icon = il.Add(trgif)
- trgif = Icons["addrhumb"].GetBitmap(bmpsize)
+ trgif = icons["addRhumb"].GetBitmap(bmpsize)
self.rhumb_icon = il.Add(trgif)
- trgif = Icons["addlabels"].GetBitmap(bmpsize)
+ trgif = icons["addLabels"].GetBitmap(bmpsize)
self.labels_icon = il.Add(trgif)
- trgif = Icons["addcmd"].GetBitmap(bmpsize)
+ trgif = icons["addCmd"].GetBitmap(bmpsize)
self.cmd_icon = il.Add(trgif)
self.AssignImageList(il)
@@ -708,7 +709,7 @@
grouptext = _('Layer group:') + str(self.groupnode)
self.groupnode += 1
else:
- btnbmp = Icons["layeropts"].GetBitmap((16,16))
+ btnbmp = Icons['layerManager']["layerOptions"].GetBitmap((16,16))
ctrl = buttons.GenBitmapButton(self, id = wx.ID_ANY, bitmap = btnbmp, size = (24,24))
ctrl.SetToolTipString(_("Click to edit layer settings"))
self.Bind(wx.EVT_BUTTON, self.OnLayerContextMenu, ctrl)
@@ -1263,7 +1264,7 @@
text = self.GetItemText(dragItem)
if self.GetPyData(dragItem)[0]['ctrl']:
# recreate data layer
- btnbmp = Icons["layeropts"].GetBitmap((16,16))
+ btnbmp = Icons['layerManager']["layerOptions"].GetBitmap((16,16))
newctrl = buttons.GenBitmapButton(self, id = wx.ID_ANY, bitmap = btnbmp, size = (24, 24))
newctrl.SetToolTipString(_("Click to edit layer settings"))
self.Bind(wx.EVT_BUTTON, self.OnLayerContextMenu, newctrl)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/mapdisp.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -1573,19 +1573,21 @@
"""
point = wx.GetMousePosition()
toolsmenu = wx.Menu()
+ icons = Icons['displayWindow']
+
# Add items to the menu
- measure = wx.MenuItem(toolsmenu, wx.ID_ANY, Icons["measure"].GetLabel())
- measure.SetBitmap(Icons["measure"].GetBitmap(self.iconsize))
+ measure = wx.MenuItem(toolsmenu, wx.ID_ANY, icons["measure"].GetLabel())
+ measure.SetBitmap(icons["measure"].GetBitmap(self.iconsize))
toolsmenu.AppendItem(measure)
self.Bind(wx.EVT_MENU, self.OnMeasure, measure)
-
- profile = wx.MenuItem(toolsmenu, wx.ID_ANY, Icons["profile"].GetLabel())
- profile.SetBitmap(Icons["profile"].GetBitmap(self.iconsize))
+
+ profile = wx.MenuItem(toolsmenu, wx.ID_ANY, icons["profile"].GetLabel())
+ profile.SetBitmap(icons["profile"].GetBitmap(self.iconsize))
toolsmenu.AppendItem(profile)
self.Bind(wx.EVT_MENU, self.Profile, profile)
- histogram = wx.MenuItem(toolsmenu, wx.ID_ANY, Icons["histogram"].GetLabel())
- histogram.SetBitmap(Icons["histogram"].GetBitmap(self.iconsize))
+ histogram = wx.MenuItem(toolsmenu, wx.ID_ANY, icons["histogram"].GetLabel())
+ histogram.SetBitmap(icons["histogram"].GetBitmap(self.iconsize))
toolsmenu.AppendItem(histogram)
self.Bind(wx.EVT_MENU, self.Histogram, histogram)
@@ -1744,27 +1746,29 @@
"""
point = wx.GetMousePosition()
decmenu = wx.Menu()
+ icons = Icons['displayWindow']
+
# Add items to the menu
- AddScale = wx.MenuItem(decmenu, wx.ID_ANY, Icons["addbarscale"].GetLabel())
- AddScale.SetBitmap(Icons["addbarscale"].GetBitmap(self.iconsize))
+ AddScale = wx.MenuItem(decmenu, wx.ID_ANY, icons["addBarscale"].GetLabel())
+ AddScale.SetBitmap(icons["addBarscale"].GetBitmap(self.iconsize))
decmenu.AppendItem(AddScale)
self.Bind(wx.EVT_MENU, self.OnAddBarscale, AddScale)
-
- AddLegend = wx.MenuItem(decmenu, wx.ID_ANY, Icons["addlegend"].GetLabel())
- AddLegend.SetBitmap(Icons["addlegend"].GetBitmap(self.iconsize))
+
+ AddLegend = wx.MenuItem(decmenu, wx.ID_ANY, icons["addLegend"].GetLabel())
+ AddLegend.SetBitmap(icons["addLegend"].GetBitmap(self.iconsize))
decmenu.AppendItem(AddLegend)
self.Bind(wx.EVT_MENU, self.OnAddLegend, AddLegend)
-
- AddText = wx.MenuItem(decmenu, wx.ID_ANY, Icons["addtext"].GetLabel())
- AddText.SetBitmap(Icons["addtext"].GetBitmap(self.iconsize))
+
+ AddText = wx.MenuItem(decmenu, wx.ID_ANY, icons["addText"].GetLabel())
+ AddText.SetBitmap(icons["addText"].GetBitmap(self.iconsize))
decmenu.AppendItem(AddText)
self.Bind(wx.EVT_MENU, self.OnAddText, AddText)
-
+
# Popup the menu. If an item is selected then its handler
# will be called before PopupMenu returns.
self.PopupMenu(decmenu)
decmenu.Destroy()
-
+
def OnAddBarscale(self, event):
"""!Handler for scale/arrow map decoration menu selection.
"""
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/profile.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -53,7 +53,7 @@
class ProfileFrame(wx.Frame):
"""!Mainframe for displaying profile of raster map. Uses wx.lib.plot.
"""
- def __init__(self, parent=None, id=wx.ID_ANY, title=_("Profile Analysis"),
+ def __init__(self, parent=None, id=wx.ID_ANY, title=_("GRASS Profile Analysis Tool"),
rasterList=[],
pos=wx.DefaultPosition, size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE):
Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/toolbars.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -6,8 +6,8 @@
Classes:
- AbstractToolbar
- MapToolbar
- - GRToolbar
- - GCPToolbar
+ - GCPMapToolbar
+ - GCPDisplayToolbar
- VDigitToolbar
- ProfileToolbar
- NvizToolbar
@@ -41,9 +41,8 @@
from nviz import haveNviz
from nviz_preferences import NvizPreferencesDialog
-gmpath = os.path.join(globalvar.ETCWXDIR, "icons")
-sys.path.append(gmpath)
-from icon import Icons as Icons
+sys.path.append(os.path.join(globalvar.ETCWXDIR, "icons"))
+from icon import Icons
class AbstractToolbar(wx.ToolBar):
"""!Abstract toolbar class"""
@@ -77,9 +76,10 @@
"""
bmpDisabled = wx.NullBitmap
- if label:
- Debug.msg(3, "CreateTool(): tool=%d, label=%s bitmap=%d" % \
- (tool, label, bitmap.GetWidth()))
+ 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)
@@ -163,6 +163,24 @@
self.EnableTool(id, enable)
+ def _getToolbarData(self, data):
+ """!Define tool
+ """
+ retData = list()
+ for args in data:
+ retData.append(self._defineTool(*args))
+
+ return retData
+
+ def _defineTool(self, key, name = None, icon = None, handler = None, item = wx.ITEM_NORMAL):
+ """!Define tool
+ """
+ if key:
+ return (key, name, icon.GetBitmap(),
+ wx.ITEM_NORMAL, icon.GetLabel(), icon.GetDesc(),
+ handler)
+ return ("", "", "", "", "", "", "") # separator
+
class MapToolbar(AbstractToolbar):
"""!Map Display toolbar
"""
@@ -180,7 +198,9 @@
# optional tools
choices = [ _('2D view'), ]
self.toolId = { '2d' : 0 }
- log = self.parent.GetLayerManager().GetLogWindow()
+ if self.parent.GetLayerManager():
+ log = self.parent.GetLayerManager().GetLogWindow()
+
if haveNviz:
choices.append(_('3D view'))
self.toolId['3d'] = 1
@@ -255,59 +275,48 @@
self.savefile = wx.NewId()
self.printmap = wx.NewId()
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.displaymap, "displaymap", Icons["displaymap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["displaymap"].GetLabel(), Icons["displaymap"].GetDesc(),
- self.parent.OnDraw),
- (self.rendermap, "rendermap", Icons["rendermap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["rendermap"].GetLabel(), Icons["rendermap"].GetDesc(),
- self.parent.OnRender),
- (self.erase, "erase", Icons["erase"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["erase"].GetLabel(), Icons["erase"].GetDesc(),
- self.parent.OnErase),
- ("", "", "", "", "", "", ""),
- (self.pointer, "pointer", Icons["pointer"].GetBitmap(),
- wx.ITEM_CHECK, Icons["pointer"].GetLabel(), Icons["pointer"].GetDesc(),
- self.parent.OnPointer),
- (self.query, "query", Icons["query"].GetBitmap(),
- wx.ITEM_CHECK, Icons["query"].GetLabel(), Icons["query"].GetDesc(),
- self.parent.OnQuery),
- (self.pan, "pan", Icons["pan"].GetBitmap(),
- wx.ITEM_CHECK, Icons["pan"].GetLabel(), Icons["pan"].GetDesc(),
- self.parent.OnPan),
- (self.zoomin, "zoom_in", Icons["zoom_in"].GetBitmap(),
- wx.ITEM_CHECK, Icons["zoom_in"].GetLabel(), Icons["zoom_in"].GetDesc(),
- self.parent.OnZoomIn),
- (self.zoomout, "zoom_out", Icons["zoom_out"].GetBitmap(),
- wx.ITEM_CHECK, Icons["zoom_out"].GetLabel(), Icons["zoom_out"].GetDesc(),
- self.parent.OnZoomOut),
- (self.zoomextent, "zoom_extent", Icons["zoom_extent"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["zoom_extent"].GetLabel(), Icons["zoom_extent"].GetDesc(),
- self.parent.OnZoomToMap),
- (self.zoomback, "zoom_back", Icons["zoom_back"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["zoom_back"].GetLabel(), Icons["zoom_back"].GetDesc(),
- self.parent.OnZoomBack),
- (self.zoommenu, "zoommenu", Icons["zoommenu"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["zoommenu"].GetLabel(), Icons["zoommenu"].GetDesc(),
- self.parent.OnZoomMenu),
- ("", "", "", "", "", "", ""),
- (self.analyze, "analyze", Icons["analyze"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["analyze"].GetLabel(), Icons["analyze"].GetDesc(),
- self.parent.OnAnalyze),
- ("", "", "", "", "", "", ""),
- (self.dec, "overlay", Icons["overlay"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["overlay"].GetLabel(), Icons["overlay"].GetDesc(),
- self.parent.OnDecoration),
- ("", "", "", "", "", "", ""),
- (self.savefile, "savefile", Icons["savefile"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["savefile"].GetLabel(), Icons["savefile"].GetDesc(),
- self.parent.SaveToFile),
- (self.printmap, "printmap", Icons["printmap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["printmap"].GetLabel(), Icons["printmap"].GetDesc(),
- self.parent.PrintMenu),
- ("", "", "", "", "", "", "")
- )
+ icons = Icons['displayWindow']
+ return self._getToolbarData(((self.displaymap, 'display', icons['display'],
+ self.parent.OnDraw),
+ (self.rendermap, 'render', icons['render'],
+ self.parent.OnRender),
+ (self.erase, 'erase', icons['erase'],
+ self.parent.OnErase),
+ (None, ),
+ (self.pointer, 'pointer', icons['pointer'],
+ self.parent.OnPointer,
+ wx.ITEM_CHECK),
+ (self.query, 'query', icons['query'],
+ self.parent.OnQuery,
+ wx.ITEM_CHECK),
+ (self.pan, 'pan', icons['pan'],
+ self.parent.OnPan,
+ wx.ITEM_CHECK),
+ (self.zoomin, 'zoomIn', icons['zoomIn'],
+ self.parent.OnZoomIn,
+ wx.ITEM_CHECK),
+ (self.zoomout, 'zoomOut', icons['zoomOut'],
+ self.parent.OnZoomOut,
+ wx.ITEM_CHECK),
+ (self.zoomextent, 'zoomExtent', icons['zoomExtent'],
+ self.parent.OnZoomToMap),
+ (self.zoomback, 'zoomBack', icons['zoomBack'],
+ self.parent.OnZoomBack),
+ (self.zoommenu, 'zoomMenu', icons['zoomMenu'],
+ self.parent.OnZoomMenu),
+ (None, ),
+ (self.analyze, 'analyze', icons['analyze'],
+ self.parent.OnAnalyze),
+ (None, ),
+ (self.dec, 'overlay', icons['overlay'],
+ self.parent.OnDecoration),
+ (None, ),
+ (self.savefile, 'saveFile', icons['saveFile'],
+ self.parent.SaveToFile),
+ (self.printmap, 'print', icons['print'],
+ self.parent.PrintMenu),
+ (None, ))
+ )
def OnSelectTool(self, event):
"""!Select / enable tool available in tools list
@@ -370,31 +379,24 @@
self.rms = wx.NewId()
self.georect = wx.NewId()
- return (
- (self.gcpSave, 'grGcpSave', Icons["grGcpSave"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpSave"].GetLabel(), Icons["grGcpSave"].GetDesc(),
- self.parent.SaveGCPs),
- (self.gcpReload, 'grGcpReload', Icons["grGcpReload"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpReload"].GetLabel(), Icons["grGcpReload"].GetDesc(),
- self.parent.ReloadGCPs),
- ("", "", "", "", "", "", ""),
- (self.gcpAdd, 'grGrGcpAdd', Icons["grGcpAdd"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpAdd"].GetLabel(), Icons["grGcpAdd"].GetDesc(),
- self.parent.AddGCP),
- (self.gcpDelete, 'grGrGcpDelete', Icons["grGcpDelete"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpDelete"].GetLabel(), Icons["grGcpDelete"].GetDesc(),
- self.parent.DeleteGCP),
- (self.gcpClear, 'grGcpClear', Icons["grGcpClear"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpClear"].GetLabel(), Icons["grGcpClear"].GetDesc(),
- self.parent.ClearGCP),
- ("", "", "", "", "", "", ""),
- (self.rms, 'grGcpRms', Icons["grGcpRms"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpRms"].GetLabel(), Icons["grGcpRms"].GetDesc(),
- self.parent.OnRMS),
- (self.georect, 'grGeorect', Icons["grGeorect"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGeorect"].GetLabel(), Icons["grGeorect"].GetDesc(),
- self.parent.OnGeorect),
- )
+ icons = Icons['georectify']
+ return self._getToolbarData(((self.gcpSave, 'gcpSave', icons["gcpSave"],
+ self.parent.SaveGCPs),
+ (self.gcpReload, 'gcpReload', icons["gcpReload"],
+ self.parent.ReloadGCPs),
+ (None, ),
+ (self.gcpAdd, 'gcpAdd', icons["gcpAdd"],
+ self.parent.AddGCP),
+ (self.gcpDelete, 'gcpDelete', icons["gcpDelete"],
+ self.parent.DeleteGCP),
+ (self.gcpClear, 'gcpClear', icons["gcpClear"],
+ self.parent.ClearGCP),
+ (None, ),
+ (self.rms, 'gcpRms', icons["gcpRms"],
+ self.parent.OnRMS),
+ (self.georect, 'georectify', icons["georectify"],
+ self.parent.OnGeorect))
+ )
class GCPDisplayToolbar(AbstractToolbar):
"""
@@ -417,7 +419,7 @@
self.InsertControl(10, self.togglemap)
self.SetToolShortHelp(self.togglemapid, '%s %s %s' % (_('Set map canvas for '),
- Icons["zoom_back"].GetLabel(),
+ Icons['displayWindow']["zoomBack"].GetLabel(),
_(' / Zoom to map')))
# realize the toolbar
@@ -447,188 +449,45 @@
self.helpid = wx.NewId()
self.quit = wx.NewId()
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.displaymap, "displaymap", Icons["displaymap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["displaymap"].GetLabel(), Icons["displaymap"].GetDesc(),
- self.parent.OnDraw),
- (self.rendermap, "rendermap", Icons["rendermap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["rendermap"].GetLabel(), Icons["rendermap"].GetDesc(),
- self.parent.OnRender),
- (self.erase, "erase", Icons["erase"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["erase"].GetLabel(), Icons["erase"].GetDesc(),
- self.parent.OnErase),
- ("", "", "", "", "", "", ""),
- (self.gcpset, "grGcpSet", Icons["grGcpSet"].GetBitmap(),
- wx.ITEM_RADIO, Icons["grGcpSet"].GetLabel(), Icons["grGcpSet"].GetDesc(),
- self.parent.OnPointer),
- (self.pan, "pan", Icons["pan"].GetBitmap(),
- wx.ITEM_RADIO, Icons["pan"].GetLabel(), Icons["pan"].GetDesc(),
- self.parent.OnPan),
- (self.zoomin, "zoom_in", Icons["zoom_in"].GetBitmap(),
- wx.ITEM_RADIO, Icons["zoom_in"].GetLabel(), Icons["zoom_in"].GetDesc(),
- self.parent.OnZoomIn),
- (self.zoomout, "zoom_out", Icons["zoom_out"].GetBitmap(),
- wx.ITEM_RADIO, Icons["zoom_out"].GetLabel(), Icons["zoom_out"].GetDesc(),
- self.parent.OnZoomOut),
- (self.zoommenu, "zoommenu", Icons["zoommenu"].GetBitmap(),
- wx.ITEM_NORMAL, _("Adjust display zoom"), Icons["zoommenu"].GetDesc(),
- self.parent.OnZoomMenuGCP),
- ("", "", "", "", "", "", ""),
- (self.zoomback, "zoom_back", Icons["zoom_back"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["zoom_back"].GetLabel(), Icons["zoom_back"].GetDesc(),
- self.parent.OnZoomBack),
- (self.zoomtomap, "zoomtomap", Icons["zoom_extent"].GetBitmap(),
- wx.ITEM_NORMAL, _("Zoom to map"), _("Zoom to displayed map"),
- self.parent.OnZoomToMap),
- ("", "", "", "", "", "", ""),
- (self.settings, 'grSettings', Icons["grSettings"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grSettings"].GetLabel(), Icons["grSettings"].GetDesc(),
- self.parent.OnSettings),
- (self.helpid, 'grHelp', wx.ArtProvider.GetBitmap(id=wx.ART_HELP, client=wx.ART_TOOLBAR, size=globalvar.toolbarSize),
- wx.ITEM_NORMAL, _('Show Help'), _('Show Help for GCP Manager'),
- self.parent.OnHelp),
- ("", "", "", "", "", "", ""),
- (self.quit, 'grGcpQuit', Icons["grGcpQuit"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpQuit"].GetLabel(), Icons["grGcpQuit"].GetDesc(),
- self.parent.OnQuit)
- )
+ icons = Icons['displayWindow']
+ return self._getToolbarData(((self.displaymap, "display", icons["display"],
+ self.parent.OnDraw),
+ (self.rendermap, "render", icons["render"],
+ self.parent.OnRender),
+ (self.erase, "erase", icons["erase"],
+ self.parent.OnErase),
+ (None, ),
+ (self.gcpset, "gcpSet", Icons["georectify"]["gcpSet"],
+ self.parent.OnPointer),
+ (self.pan, "pan", icons["pan"],
+ self.parent.OnPan),
+ (self.zoomin, "zoomIn", icons["zoomIn"],
+ self.parent.OnZoomIn),
+ (self.zoomout, "zoomOut", icons["zoomOut"],
+ self.parent.OnZoomOut),
+ (self.zoommenu, "zoomMenu", icons["zoomMenu"],
+ self.parent.OnZoomMenuGCP),
+ (None, ),
+ (self.zoomback, "zoomBack", icons["zoomBack"],
+ self.parent.OnZoomBack),
+ (self.zoomtomap, "zoomtomap", icons["zoomExtent"],
+ self.parent.OnZoomToMap),
+ (None, ),
+ (self.settings, 'settings', Icons["georectify"]["settings"],
+ self.parent.OnSettings),
+ (self.helpid, 'help', Icons["misc"]["help"],
+ self.parent.OnHelp),
+ (None, ),
+ (self.quit, 'gcpQuit', Icons["georectify"]["quit"],
+ self.parent.OnQuit))
+ )
-class GRToolbar(AbstractToolbar):
- """
- Georectification toolbar
- """
- def __init__(self, parent, mapcontent):
- """!
- Georectification toolbar constructor
-
- @param parent reference to MapFrame
- @param mapcontent reference to render.Map (registred by MapFrame)
- """
- self.mapcontent = mapcontent
- AbstractToolbar.__init__(self, parent)
-
- self.InitToolbar(self._toolbarData())
-
- # realize the toolbar
- self.Realize()
-
- self.action = { 'id' : self.gcpset }
- self.defaultAction = { 'id' : self.gcpset,
- 'bind' : self.parent.OnPointer }
-
- self.OnTool(None)
-
- self.EnableTool(self.zoomback, False)
-
- def _toolbarData(self):
- """!Toolbar data"""
- self.displaymap = wx.NewId()
- self.rendermap = wx.NewId()
- self.erase = wx.NewId()
- self.gcpset = wx.NewId()
- self.pan = wx.NewId()
- self.zoomin = wx.NewId()
- self.zoomout = wx.NewId()
- self.zoomback = wx.NewId()
- self.zoomtomap = wx.NewId()
-
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.displaymap, "displaymap", Icons["displaymap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["displaymap"].GetLabel(), Icons["displaymap"].GetDesc(),
- self.parent.OnDraw),
- (self.rendermap, "rendermap", Icons["rendermap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["rendermap"].GetLabel(), Icons["rendermap"].GetDesc(),
- self.parent.OnRender),
- (self.erase, "erase", Icons["erase"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["erase"].GetLabel(), Icons["erase"].GetDesc(),
- self.parent.OnErase),
- ("", "", "", "", "", "", ""),
- (self.gcpset, "grGcpSet", Icons["grGcpSet"].GetBitmap(),
- wx.ITEM_RADIO, Icons["grGcpSet"].GetLabel(), Icons["grGcpSet"].GetDesc(),
- self.parent.OnPointer),
- (self.pan, "pan", Icons["pan"].GetBitmap(),
- wx.ITEM_RADIO, Icons["pan"].GetLabel(), Icons["pan"].GetDesc(),
- self.parent.OnPan),
- (self.zoomin, "zoom_in", Icons["zoom_in"].GetBitmap(),
- wx.ITEM_RADIO, Icons["zoom_in"].GetLabel(), Icons["zoom_in"].GetDesc(),
- self.parent.OnZoomIn),
- (self.zoomout, "zoom_out", Icons["zoom_out"].GetBitmap(),
- wx.ITEM_RADIO, Icons["zoom_out"].GetLabel(), Icons["zoom_out"].GetDesc(),
- self.parent.OnZoomOut),
- (self.zoomback, "zoom_back", Icons["zoom_back"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["zoom_back"].GetLabel(), Icons["zoom_back"].GetDesc(),
- self.parent.OnZoomBack),
- (self.zoomtomap, "zoomtomap", Icons["zoommenu"].GetBitmap(),
- wx.ITEM_NORMAL, _("Zoom to map"), _("Zoom to displayed map"),
- self.OnZoomMap),
- )
-
def OnZoomMap(self, event):
"""!Zoom to selected map"""
self.parent.MapWindow.ZoomToMap(layers = self.mapcontent.GetListOfLayers())
if event:
event.Skip()
-class GCPToolbar(AbstractToolbar):
- """!
- Toolbar for managing ground control points during georectification
-
- @param parent reference to GCP widget
- """
- def __init__(self, parent):
- AbstractToolbar.__init__(self, parent)
-
- self.InitToolbar(self._toolbarData())
-
- # realize the toolbar
- self.Realize()
-
- def _toolbarData(self):
- self.gcpSave = wx.NewId()
- self.gcpAdd = wx.NewId()
- self.gcpDelete = wx.NewId()
- self.gcpClear = wx.NewId()
- self.gcpReload = wx.NewId()
- self.rms = wx.NewId()
- self.georect = wx.NewId()
- self.settings = wx.NewId()
- self.quit = wx.NewId()
-
- return (
- (self.gcpSave, 'grGcpSave', Icons["grGcpSave"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpSave"].GetLabel(), Icons["grGcpSave"].GetDesc(),
- self.parent.SaveGCPs),
- (self.gcpAdd, 'grGrGcpAdd', Icons["grGcpAdd"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpAdd"].GetLabel(), Icons["grGcpAdd"].GetDesc(),
- self.parent.AddGCP),
- (self.gcpDelete, 'grGrGcpDelete', Icons["grGcpDelete"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpDelete"].GetLabel(), Icons["grGcpDelete"].GetDesc(),
- self.parent.DeleteGCP),
- (self.gcpClear, 'grGcpClear', Icons["grGcpClear"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpClear"].GetLabel(), Icons["grGcpClear"].GetDesc(),
- self.parent.ClearGCP),
- (self.gcpReload, 'grGcpReload', Icons["grGcpReload"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpReload"].GetLabel(), Icons["grGcpReload"].GetDesc(),
- self.parent.ReloadGCPs),
-
- ("", "", "", "", "", "", ""),
- (self.rms, 'grGcpRms', Icons["grGcpRms"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpRms"].GetLabel(), Icons["grGcpRms"].GetDesc(),
- self.parent.OnRMS),
- (self.georect, 'grGeorect', Icons["grGeorect"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGeorect"].GetLabel(), Icons["grGeorect"].GetDesc(),
- self.parent.OnGeorect),
- ("", "", "", "", "", "", ""),
- (self.settings, 'grSettings', Icons["grSettings"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grSettings"].GetLabel(), Icons["grSettings"].GetDesc(),
- self.parent.OnSettings),
- (self.quit, 'grGcpQuit', Icons["grGcpQuit"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["grGcpQuit"].GetLabel(), Icons["grGcpQuit"].GetDesc(),
- self.parent.OnQuit)
- )
-
class VDigitToolbar(AbstractToolbar):
"""!Toolbar for digitization
"""
@@ -700,71 +559,63 @@
self.settings = wx.NewId()
self.exit = wx.NewId()
- data = [("", "", "", "", "", "", ""),
- (self.addPoint, "digAddPoint", Icons["digAddPoint"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digAddPoint"].GetLabel(), Icons["digAddPoint"].GetDesc(),
- self.OnAddPoint),
- (self.addLine, "digAddLine", Icons["digAddLine"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digAddLine"].GetLabel(), Icons["digAddLine"].GetDesc(),
- self.OnAddLine),
- (self.addBoundary, "digAddBoundary", Icons["digAddBoundary"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digAddBoundary"].GetLabel(), Icons["digAddBoundary"].GetDesc(),
- self.OnAddBoundary),
- (self.addCentroid, "digAddCentroid", Icons["digAddCentroid"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digAddCentroid"].GetLabel(), Icons["digAddCentroid"].GetDesc(),
- self.OnAddCentroid),
- (self.addArea, "digAddArea", Icons["digAddArea"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digAddArea"].GetLabel(), Icons["digAddArea"].GetDesc(),
- self.OnAddArea),
- (self.moveVertex, "digMoveVertex", Icons["digMoveVertex"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digMoveVertex"].GetLabel(), Icons["digMoveVertex"].GetDesc(),
- self.OnMoveVertex),
- (self.addVertex, "digAddVertex", Icons["digAddVertex"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digAddVertex"].GetLabel(), Icons["digAddVertex"].GetDesc(),
- self.OnAddVertex),
- (self.removeVertex, "digRemoveVertex", Icons["digRemoveVertex"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digRemoveVertex"].GetLabel(), Icons["digRemoveVertex"].GetDesc(),
- self.OnRemoveVertex),
- (self.splitLine, "digSplitLine", Icons["digSplitLine"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digSplitLine"].GetLabel(), Icons["digSplitLine"].GetDesc(),
- self.OnSplitLine),
- (self.editLine, "digEditLine", Icons["digEditLine"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digEditLine"].GetLabel(), Icons["digEditLine"].GetDesc(),
- self.OnEditLine),
- (self.moveLine, "digMoveLine", Icons["digMoveLine"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digMoveLine"].GetLabel(), Icons["digMoveLine"].GetDesc(),
- self.OnMoveLine),
- (self.deleteLine, "digDeleteLine", Icons["digDeleteLine"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digDeleteLine"].GetLabel(), Icons["digDeleteLine"].GetDesc(),
- self.OnDeleteLine),
- (self.displayCats, "digDispCats", Icons["digDispCats"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digDispCats"].GetLabel(), Icons["digDispCats"].GetDesc(),
- self.OnDisplayCats),
- (self.copyCats, "digCopyCats", Icons["digCopyCats"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digCopyCats"].GetLabel(), Icons["digCopyCats"].GetDesc(),
- self.OnCopyCA),
- (self.displayAttr, "digDispAttr", Icons["digDispAttr"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digDispAttr"].GetLabel(), Icons["digDispAttr"].GetDesc(),
- self.OnDisplayAttr),
- (self.additionalTools, "digAdditionalTools", Icons["digAdditionalTools"].GetBitmap(),
- wx.ITEM_CHECK, Icons["digAdditionalTools"].GetLabel(),
- Icons["digAdditionalTools"].GetDesc(),
- self.OnAdditionalToolMenu),
- ("", "", "", "", "", "", ""),
- (self.undo, "digUndo", Icons["digUndo"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["digUndo"].GetLabel(), Icons["digUndo"].GetDesc(),
- self.OnUndo),
- # data.append((self.undo, "digRedo", Icons["digRedo"].GetBitmap(),
- # wx.ITEM_NORMAL, Icons["digRedo"].GetLabel(), Icons["digRedo"].GetDesc(),
- # self.OnRedo))
- (self.settings, "digSettings", Icons["digSettings"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["digSettings"].GetLabel(), Icons["digSettings"].GetDesc(),
- self.OnSettings),
- (self.exit, "digExit", Icons["quit"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["digExit"].GetLabel(), Icons["digExit"].GetDesc(),
- self.OnExit)]
-
- return data
+ icons = Icons['vdigit']
+ return self._getToolbarData(((None, ),
+ (self.addPoint, "addPoint", icons["addPoint"],
+ self.OnAddPoint),
+ (self.addLine, "addLine", icons["addLine"],
+ self.OnAddLine,
+ wx.ITEM_CHECK),
+ (self.addBoundary, "addBoundary", icons["addBoundary"],
+ self.OnAddBoundary,
+ wx.ITEM_CHECK),
+ (self.addCentroid, "addCentroid", icons["addCentroid"],
+ self.OnAddCentroid,
+ wx.ITEM_CHECK),
+ (self.addArea, "addArea", icons["addArea"],
+ self.OnAddArea,
+ wx.ITEM_CHECK),
+ (self.moveVertex, "moveVertex", icons["moveVertex"],
+ self.OnMoveVertex,
+ wx.ITEM_CHECK),
+ (self.addVertex, "addVertex", icons["addVertex"],
+ self.OnAddVertex,
+ wx.ITEM_CHECK),
+ (self.removeVertex, "removeVertex", icons["removeVertex"],
+ self.OnRemoveVertex,
+ wx.ITEM_CHECK),
+ (self.splitLine, "splitLine", icons["splitLine"],
+ self.OnSplitLine,
+ wx.ITEM_CHECK),
+ (self.editLine, "editLine", icons["editLine"],
+ self.OnEditLine,
+ wx.ITEM_CHECK),
+ (self.moveLine, "moveLine", icons["moveLine"],
+ self.OnMoveLine,
+ wx.ITEM_CHECK),
+ (self.deleteLine, "deleteLine", icons["deleteLine"],
+ self.OnDeleteLine,
+ wx.ITEM_CHECK),
+ (self.displayCats, "displayCats", icons["displayCats"],
+ self.OnDisplayCats,
+ wx.ITEM_CHECK),
+ (self.copyCats, "copyCats", icons["copyCats"],
+ self.OnCopyCA,
+ wx.ITEM_CHECK),
+ (self.displayAttr, "displayAttr", icons["displayAttr"],
+ self.OnDisplayAttr,
+ wx.ITEM_CHECK),
+ (self.additionalTools, "additionalTools", icons["additionalTools"],
+ self.OnAdditionalToolMenu,
+ wx.ITEM_CHECK),
+ (None, ),
+ (self.undo, "undo", icons["undo"],
+ self.OnUndo),
+ (self.settings, "settings", icons["settings"],
+ self.OnSettings),
+ (self.exit, "quit", icons["quit"],
+ self.OnExit))
+ )
def OnTool(self, event):
"""!Tool selected -> disable selected tool in map toolbar"""
@@ -1467,48 +1318,35 @@
self.printer = wx.NewId()
self.quit = wx.NewId()
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.addraster, 'raster', Icons["addrast"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["addrast"].GetLabel(), Icons["addrast"].GetDesc(),
- self.parent.OnSelectRaster),
- (self.transect, 'transect', Icons["transect"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["transect"].GetLabel(), Icons["transect"].GetDesc(),
- self.parent.OnDrawTransect),
- ("", "", "", "", "", "", ""),
- (self.draw, 'profiledraw', Icons["profiledraw"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["profiledraw"].GetLabel(), Icons["profiledraw"].GetDesc(),
- self.parent.OnCreateProfile),
- (self.erase, 'erase', Icons["erase"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["erase"].GetLabel(), Icons["erase"].GetDesc(),
- self.parent.OnErase),
- (self.drag, 'drag', Icons['pan'].GetBitmap(),
- wx.ITEM_NORMAL, Icons["pan"].GetLabel(), Icons["pan"].GetDesc(),
- self.parent.OnDrag),
- (self.zoom, 'zoom', Icons['zoom_in'].GetBitmap(),
- wx.ITEM_NORMAL, Icons["zoom_in"].GetLabel(), Icons["zoom_in"].GetDesc(),
- self.parent.OnZoom),
- (self.unzoom, 'unzoom', Icons['zoom_back'].GetBitmap(),
- wx.ITEM_NORMAL, Icons["zoom_back"].GetLabel(), Icons["zoom_back"].GetDesc(),
- self.parent.OnRedraw),
- ("", "", "", "", "", "", ""),
- (self.datasave, 'save data', Icons["datasave"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["datasave"].GetLabel(), Icons["datasave"].GetDesc(),
- self.parent.SaveProfileToFile),
- (self.save, 'save image', Icons["savefile"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["savefile"].GetLabel(), Icons["savefile"].GetDesc(),
- self.parent.SaveToFile),
- (self.printer, 'print', Icons["printmap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["printmap"].GetLabel(), Icons["printmap"].GetDesc(),
- self.parent.PrintMenu),
- ("", "", "", "", "", "", ""),
- (self.options, 'options', Icons["profileopt"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["profileopt"].GetLabel(), Icons["profileopt"].GetDesc(),
- self.parent.ProfileOptionsMenu),
- (self.quit, 'quit', Icons["quit"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["quit"].GetLabel(), Icons["quit"].GetDesc(),
- self.parent.OnQuit),
- )
+ icons = Icons['profile']
+ return self._getToolbarData(((self.addraster, 'raster', Icons['layerManager']["addRast"],
+ self.parent.OnSelectRaster),
+ (self.transect, 'transect', icons["transect"],
+ self.parent.OnDrawTransect),
+ (None, ),
+ (self.draw, 'draw', icons["draw"],
+ self.parent.OnCreateProfile),
+ (self.erase, 'erase', Icons['displayWindow']["erase"],
+ self.parent.OnErase),
+ (self.drag, 'drag', Icons['displayWindow']['pan'],
+ self.parent.OnDrag),
+ (self.zoom, 'zoom', Icons['displayWindow']['zoomIn'],
+ self.parent.OnZoom),
+ (self.unzoom, 'unzoom', Icons['displayWindow']['zoomBack'],
+ self.parent.OnRedraw),
+ (None, ),
+ (self.datasave, 'save', icons["save"],
+ self.parent.SaveProfileToFile),
+ (self.save, 'image', Icons['displayWindow']["saveFile"],
+ self.parent.SaveToFile),
+ (self.printer, 'print', Icons['displayWindow']["print"],
+ self.parent.PrintMenu),
+ (None, ),
+ (self.options, 'options', icons["options"],
+ self.parent.ProfileOptionsMenu),
+ (self.quit, 'quit', icons["quit"],
+ self.parent.OnQuit),
+ ))
class NvizToolbar(AbstractToolbar):
"""!Nviz toolbar
@@ -1539,40 +1377,30 @@
self.help = wx.NewId()
self.quit = wx.NewId()
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.view, "view", Icons["nvizView"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizView"].GetLabel(), Icons["nvizView"].GetDesc(),
- self.OnShowPage),
- ("", "", "", "", "", "", ""),
- (self.surface, "surface", Icons["nvizSurface"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizSurface"].GetLabel(), Icons["nvizSurface"].GetDesc(),
- self.OnShowPage),
- (self.vector, "vector", Icons["nvizVector"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizVector"].GetLabel(), Icons["nvizVector"].GetDesc(),
- self.OnShowPage),
- (self.volume, "volume", Icons["nvizVolume"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizVolume"].GetLabel(), Icons["nvizVolume"].GetDesc(),
- self.OnShowPage),
- ("", "", "", "", "", "", ""),
- (self.light, "light", Icons["nvizLight"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizLight"].GetLabel(), Icons["nvizLight"].GetDesc(),
- self.OnShowPage),
- (self.fringe, "fringe", Icons["nvizFringe"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizFringe"].GetLabel(), Icons["nvizFringe"].GetDesc(),
- self.OnShowPage),
- ("", "", "", "", "", "", ""),
- (self.settings, "settings", Icons["nvizSettings"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizSettings"].GetLabel(), Icons["nvizSettings"].GetDesc(),
- self.OnSettings),
- (self.help, "help", Icons["nvizHelp"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizHelp"].GetLabel(), Icons["nvizHelp"].GetDesc(),
- self.OnHelp),
- ("", "", "", "", "", "", ""),
- (self.quit, 'quit', Icons["nvizQuit"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["nvizQuit"].GetLabel(), Icons["nvizQuit"].GetDesc(),
- self.OnExit),
- )
+ icons = Icons['nviz']
+ return self._getToolbarData(((self.view, "view", icons["view"],
+ self.OnShowPage),
+ (None, ),
+ (self.surface, "surface", icons["surface"],
+ self.OnShowPage),
+ (self.vector, "vector", icons["vector"],
+ self.OnShowPage),
+ (self.volume, "volume", icons["volume"],
+ self.OnShowPage),
+ (None, ),
+ (self.light, "light", icons["light"],
+ self.OnShowPage),
+ (self.fringe, "fringe", icons["fringe"],
+ self.OnShowPage),
+ (None, ),
+ (self.settings, "settings", icons["settings"],
+ self.OnSettings),
+ (self.help, "help", Icons['misc']["help"],
+ self.OnHelp),
+ (None, ),
+ (self.quit, 'quit', icons["quit"],
+ self.OnExit))
+ )
def OnShowPage(self, event):
"""!Go to the selected page"""
@@ -1657,58 +1485,42 @@
self.redraw = wx.NewId()
self.help = wx.NewId()
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.new, 'new', Icons['modelNew'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelNew'].GetLabel(), Icons['modelNew'].GetDesc(),
- self.parent.OnModelNew),
- (self.open, 'open', Icons['modelOpen'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelOpen'].GetLabel(), Icons['modelOpen'].GetDesc(),
- self.parent.OnModelOpen),
- (self.save, 'save', Icons['modelSave'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelSave'].GetLabel(), Icons['modelSave'].GetDesc(),
- self.parent.OnModelSave),
- (self.image, 'image', Icons['modelToImage'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelToImage'].GetLabel(), Icons['modelToImage'].GetDesc(),
- self.parent.OnExportImage),
- (self.python, 'python', Icons['modelToPython'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelToPython'].GetLabel(), Icons['modelToPython'].GetDesc(),
- self.parent.OnExportPython),
- ('', '', '', '', '', '', ''),
- (self.action, 'action', Icons['modelActionAdd'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelActionAdd'].GetLabel(), Icons['modelActionAdd'].GetDesc(),
- self.parent.OnAddAction),
- (self.data, 'data', Icons['modelDataAdd'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelDataAdd'].GetLabel(), Icons['modelDataAdd'].GetDesc(),
- self.parent.OnAddData),
- (self.relation, 'relation', Icons['modelRelation'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelRelation'].GetLabel(), Icons['modelRelation'].GetDesc(),
- self.parent.OnDefineRelation),
- ('', '', '', '', '', '', ''),
- (self.redraw, 'redraw', Icons['modelRedraw'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelRedraw'].GetLabel(), Icons['modelRedraw'].GetDesc(),
- self.parent.OnCanvasRefresh),
- (self.validate, 'validate', Icons['modelValidate'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['modelValidate'].GetLabel(), Icons['modelValidate'].GetDesc(),
- self.parent.OnValidateModel),
- (self.run, 'run', Icons['modelRun'].GetBitmap(),
- 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),
- (self.help, "help", Icons["modelHelp"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["modelHelp"].GetLabel(), Icons["modelHelp"].GetDesc(),
- self.parent.OnHelp),
- ('', '', '', '', '', '', ''),
- (self.quit, 'quit', Icons['quit'].GetBitmap(),
- wx.ITEM_NORMAL, Icons['quit'].GetLabel(), Icons['quit'].GetDesc(),
- self.parent.OnCloseWindow),
- )
+ icons = Icons['modeler']
+ return self._getToolbarData(((self.new, 'new', icons['new'],
+ self.parent.OnModelNew),
+ (self.open, 'open', icons['open'],
+ self.parent.OnModelOpen),
+ (self.save, 'save', icons['save'],
+ self.parent.OnModelSave),
+ (self.image, 'image', icons['toImage'],
+ self.parent.OnExportImage),
+ (self.python, 'python', icons['toPython'],
+ self.parent.OnExportPython),
+ (None, ),
+ (self.action, 'action', icons['actionAdd'],
+ self.parent.OnAddAction),
+ (self.data, 'data', icons['dataAdd'],
+ self.parent.OnAddData),
+ (self.relation, 'relation', icons['relation'],
+ self.parent.OnDefineRelation),
+ (None, ),
+ (self.redraw, 'redraw', icons['redraw'],
+ self.parent.OnCanvasRefresh),
+ (self.validate, 'validate', icons['validate'],
+ self.parent.OnValidateModel),
+ (self.run, 'run', icons['run'],
+ self.parent.OnRunModel),
+ (None, ),
+ (self.variables, "variables", icons['variables'],
+ self.parent.OnVariables),
+ (self.settings, "settings", icons['settings'],
+ self.parent.OnPreferences),
+ (self.help, "help", Icons['misc']['help'],
+ self.parent.OnHelp),
+ (None, ),
+ (self.quit, 'quit', icons['quit'],
+ self.parent.OnCloseWindow))
+ )
class HistogramToolbar(AbstractToolbar):
"""!Histogram toolbar (see histogram.py)
@@ -1731,32 +1543,24 @@
self.hprint = wx.NewId()
self.quit = wx.NewId()
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.histogram, 'histogram', Icons["histogram"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["histogram"].GetLabel(), Icons["histogram"].GetDesc(),
- self.parent.OnOptions),
- (self.rendermap, 'rendermap', Icons["displaymap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["displaymap"].GetLabel(), Icons["displaymap"].GetDesc(),
- self.parent.OnRender),
- (self.erase, 'erase', Icons["erase"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["erase"].GetLabel(), Icons["erase"].GetDesc(),
- self.parent.OnErase),
- (self.font, 'font', Icons["font"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["font"].GetLabel(), Icons["font"].GetDesc(),
- self.parent.SetHistFont),
- ('', '', '', '', '', '', ''),
- (self.save, 'save', Icons["savefile"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["savefile"].GetLabel(), Icons["savefile"].GetDesc(),
- self.parent.SaveToFile),
- (self.hprint, 'print', Icons["printmap"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["printmap"].GetLabel(), Icons["printmap"].GetDesc(),
- self.parent.PrintMenu),
- ('', '', '', '', '', '', ''),
- (self.quit, 'quit', Icons["quit"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["quit"].GetLabel(), Icons["quit"].GetDesc(),
- self.parent.OnQuit)
- )
+ icons = Icons['displayWindow']
+ return self._getToolbarData(((self.histogram, 'histogram', icons["histogram"],
+ self.parent.OnOptions),
+ (self.rendermap, 'render', icons["display"],
+ self.parent.OnRender),
+ (self.erase, 'erase', icons["erase"],
+ self.parent.OnErase),
+ (self.font, 'font', Icons['misc']["font"],
+ self.parent.SetHistFont),
+ (None, ),
+ (self.save, 'save', icons["saveFile"],
+ self.parent.SaveToFile),
+ (self.hprint, 'print', icons["print"],
+ self.parent.PrintMenu),
+ (None, ),
+ (self.quit, 'quit', Icons['misc']["quit"],
+ self.parent.OnQuit))
+ )
class LayerManagerToolbar(AbstractToolbar):
"""!Layer Manager toolbar (see wxgui.py)
@@ -1788,55 +1592,24 @@
self.preferences = wx.NewId()
self.modeler = wx.NewId()
- # tool, label, bitmap, kind, shortHelp, longHelp, handler
- return (
- (self.newdisplay, 'newdisplay', Icons["newdisplay"].GetBitmap(),
- wx.ITEM_NORMAL, _("Start new display / create new workspace"), '',
- self.parent.OnNewMenu),
- ('', '', '', '', '', '', ''),
- (self.workspaceLoad, 'workspaceLoad', Icons["workspaceLoad"].GetBitmap(),
- wx.ITEM_NORMAL, _("Load / import map layers into workspace"), '',
- self.parent.OnLoadMenu),
- (self.workspaceOpen, 'workspaceOpen', Icons["workspaceOpen"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["workspaceOpen"].GetLabel(), Icons["workspaceOpen"].GetDesc(),
- self.parent.OnWorkspaceOpen),
- (self.workspaceSave, 'workspaceSave', Icons["workspaceSave"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["workspaceSave"].GetLabel(), Icons["workspaceSave"].GetDesc(),
- self.parent.OnWorkspaceSave),
- ('', '', '', '', '', '', ''),
- (self.addrast, 'addrast', Icons["addrast"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["addrast"].GetLabel(), Icons["addrast"].GetDesc(),
- self.parent.OnAddRaster),
- (self.rastmisc, 'rastmisc', Icons["rastmisc"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["rastmisc"].GetLabel(), Icons["rastmisc"].GetDesc(),
- self.parent.OnAddRasterMisc),
- (self.addvect, 'addvect', Icons["addvect"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["addvect"].GetLabel(), Icons["addvect"].GetDesc(),
- self.parent.OnAddVector),
- (self.vectmisc, 'vectmisc', Icons["vectmisc"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["vectmisc"].GetLabel(), Icons["vectmisc"].GetDesc(),
- self.parent.OnAddVectorMisc),
- (self.addgrp, 'addgrp', Icons["addgrp"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["addgrp"].GetLabel(), Icons["addgrp"].GetDesc(),
- self.parent.OnAddGroup),
- (self.addovl, 'addovl', Icons["addovl"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["addovl"].GetLabel(), Icons["addovl"].GetDesc(),
- self.parent.OnAddOverlay),
- (self.delcmd, 'delcmd', Icons["delcmd"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["delcmd"].GetLabel(), Icons["delcmd"].GetDesc(),
- self.parent.OnDeleteLayer),
- ('', '', '', '', '', '', ''),
- (self.vdigit, 'vdigit', Icons["vdigit"].GetBitmap(),
- wx.ITEM_NORMAL, Icons["vdigit"].GetLabel(), Icons["vdigit"].GetDesc(),
- self.parent.OnVDigit),
- (self.attribute, 'attrtable', Icons["attrtable"].GetBitmap(),
- 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)
- )
+ icons = Icons['layerManager']
+ return self._getToolbarData(((self.newdisplay, 'newdisplay', icons["newdisplay"], self.parent.OnNewMenu),
+ (None, ),
+ (self.workspaceLoad, 'workspaceLoad', icons["workspaceLoad"], self.parent.OnLoadMenu),
+ (self.workspaceOpen, 'workspaceOpen', icons["workspaceOpen"], self.parent.OnWorkspaceOpen),
+ (self.workspaceSave, 'workspaceSave', icons["workspaceSave"], self.parent.OnWorkspaceSave),
+ (None, ),
+ (self.addrast, 'addRast', icons["addRast"], self.parent.OnAddRaster),
+ (self.rastmisc, 'rastMisc', icons["rastMisc"], self.parent.OnAddRasterMisc),
+ (self.addvect, 'addVect', icons["addVect"], self.parent.OnAddVector),
+ (self.vectmisc, 'vectMisc', icons["vectMisc"], self.parent.OnAddVectorMisc),
+ (self.addgrp, 'addGroup', icons["addGroup"], self.parent.OnAddGroup),
+ (self.addovl, 'addOverlay', icons["addOverlay"], self.parent.OnAddOverlay),
+ (self.delcmd, 'delCmd', icons["delCmd"], self.parent.OnDeleteLayer),
+ (None, ),
+ (self.vdigit, 'vdigit', icons["vdigit"], self.parent.OnVDigit),
+ (self.attribute, 'attrTable', icons["attrTable"], self.parent.OnShowAttributeTable),
+ (None, ),
+ (self.modeler, 'modeler', icons["modeler"], self.parent.OnGModeler),
+ (self.preferences, 'preferences', icons["settings"], self.parent.OnPreferences))
+ )
Modified: grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/icons/grass2_icons.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -9,122 +9,12 @@
import globalvar
-iconpath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass2")
+iconPath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass2")
-IconsGrass2 = {
- # map display
- "displaymap" : 'show.png',
- "rendermap" : 'layer-redraw.png',
- "erase" : 'erase.png',
- "pointer" : 'pointer.png',
- "query" : 'info.png',
- "savefile" : 'map-export.png',
- "printmap" : 'print.png',
- "pan" : 'pan.png',
- # zoom (mapdisplay)
- "zoom_in" : 'zoom-in.png',
- "zoom_out" : 'zoom-out.png',
- "zoom_back" : 'zoom-last.png',
- "zoommenu" : 'zoom-more.png',
- "zoom_extent" : 'zoom-extent.png',
- # analyze raster (mapdisplay)
- "analyze" : 'layer-raster-analyze.png',
- "measure" : 'measure-length.png',
- "profile" : 'layer-raster-profile.png',
- "histogram" : 'layer-raster-histogram.png',
- "font" : 'font.png',
- # overlay (mapdisplay)
- "overlay" : 'overlay-add.png',
- "addtext" : 'text-add.png',
- "addbarscale": 'scalebar-add.png',
- "addlegend" : 'legend-add.png',
- "quit" : 'quit.png',
- # digit
- ## add feature
- "digAddPoint": 'point-create.png',
- "digAddLine" : 'line-create.png',
- "digAddBoundary": 'boundary-create.png',
- "digAddCentroid": 'centroid-create.png',
- "digAddArea": 'polygon-create.png',
- ## vertex
- "digAddVertex" : 'vertex-create.png',
- "digMoveVertex" : 'vertex-move.png',
- "digRemoveVertex" : 'vertex-delete.png',
- "digSplitLine" : 'line-split.png',
- ## edit feature
- "digEditLine" : 'line-edit.png',
- "digMoveLine" : 'line-move.png',
- "digDeleteLine" : 'line-delete.png',
- ## cats
- "digDispCats" : 'cats-display.png',
- "digCopyCats" : 'cats-copy.png',
- ## attributes
- "digDispAttr" : 'attributes-display.png',
- ## general
- "digUndo" : 'undo.png',
- "digAdditionalTools" : 'tools.png',
- # layer manager
- "newdisplay" : 'monitor-create.png',
- "fileNew" : 'create.png',
- "fileLoad" : 'layer-open.png',
- "fileOpen" : 'open.png',
- "fileSave" : 'save.png',
- "fileImport" : 'layer-import.png',
- "addrast" : 'layer-raster-add.png',
- "rastmisc" : 'layer-raster-more.png',
- "addrast3d" : 'layer-raster3d-add.png',
- "addshaded" : 'layer-shaded-relief-add.png',
- "addrarrow" : 'layer-aspect-arrow-add.png',
- "addrnum" : 'layer-cell-cats-add.png',
- "addvect" : 'layer-vector-add.png',
- "vectmisc" : 'layer-vector-more.png',
- "addcmd" : 'layer-command-add.png',
- "addgrp" : 'layer-group-add.png',
- "addovl" : 'layer-more.png',
- "addgrid" : 'layer-grid-add.png',
- "addlabels" : 'layer-label-add.png',
- "delcmd" : 'layer-remove.png',
- "attrtable" : 'table.png',
- "vdigit" : 'edit.png',
- "addrgb" : 'layer-rgb-add.png',
- "addhis" : 'layer-his-add.png',
- "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',
- # georectify
- "grGcpSet" : 'gcp-create.png',
- 'grGcpClear' : 'gcp-remove.png',
- 'grGeorect' : 'georectify.png',
- 'grGcpRms' : 'gcp-rms.png',
- "grGcpSave" : 'gcp-save.png',
- "grGcpAdd" : 'gcp-add.png',
- "grGcpDelete" : 'gcp-delete.png',
- "grGcpReload" : 'reload.png',
- # modeler
- "modelActionAdd" : 'module-add.png',
- "modelDataAdd" : 'data-add.png',
- "modelRelation" : 'relation-create.png',
- "modelRun" : 'execute.png',
- "modelValidate" : 'check.png',
- "imageSave" : 'image-export.png',
- "pythonSave" : 'python-export.png',
- "modelProperties" : 'options.png',
- "modelVariables" : 'modeler-variables.png',
- # 3d view
- "nvizView" : '3d-view.png',
- "nvizSurface" : '3d-raster.png',
- "nvizVector" : '3d-vector.png',
- "nvizVolume" : '3d-volume.png',
- "nvizLight" : '3d-light.png',
- "nvizFringe" : '3d-fringe.png',
- # various
- "settings" : 'settings.png',
- "redraw" : 'redraw.png',
- "help" : 'help.png',
- "psScript" : 'ps-script.png',
- "psExport" : 'ps-export.png',
- }
+iconSet = dict()
+
+for icon in os.listdir(iconPath):
+ name, ext = os.path.splitext(icon)
+ if ext != '.png':
+ continue
+ iconSet[name] = icon
Modified: grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/icons/grass_icons.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -8,125 +8,125 @@
import globalvar
-iconpath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass")
-iconpath_vdigit = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass", "vdigit")
+iconPath = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass")
+iconPathVDigit = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass", "edit")
-IconsGrass = {
+iconSet = {
# map display
- "displaymap" : 'gui-display.gif',
- "rendermap" : 'gui-redraw.gif',
+ "show" : 'gui-display.gif',
+ "layer-redraw" : 'gui-redraw.gif',
"erase" : 'gui-erase.gif',
"pointer" : 'gui-pointer.gif',
- "zoom_in" : 'gui-zoom_in.gif',
- "zoom_out" : 'gui-zoom_out.gif',
+ "zoom-in" : 'gui-zoom_in.gif',
+ "zoom-out" : 'gui-zoom_out.gif',
"pan" : 'gui-pan.gif',
- "query" : 'gui-query.gif',
- "zoom_back" : 'gui-zoom_back.gif',
- "zoommenu" : 'gui-mapzoom.gif',
- "zoom_extent" : wx.ART_ERROR, # FIXME
- "savefile" : 'file-save.gif',
- "printmap" : 'file-print.gif',
- "overlay" : 'gui-overlay.gif',
+ "info" : 'gui-query.gif',
+ "zoom-last" : 'gui-zoom_back.gif',
+ "zoom-more" : 'gui-mapzoom.gif',
+ "zoom-extent" : wx.ART_ERROR, # FIXME
+ "map-export" : 'file-save.gif',
+ "print" : 'file-print.gif',
+ "overlay-add" : 'gui-overlay.gif',
# digit
## add feature
- "digAddPoint": 'new.point.gif',
- "digAddLine" : 'new.line.gif',
- "digAddBoundary": 'new.boundary.gif',
- "digAddCentroid": 'new.centroid.gif',
- "digAddArea": wx.ART_ERROR,
+ "point-create": 'new.point.gif',
+ "line-create" : 'new.line.gif',
+ "boundary-create": 'new.boundary.gif',
+ "centroid-create": 'new.centroid.gif',
+ "polygon-create": wx.ART_ERROR,
## vertex
- "digAddVertex" : 'add.vertex.gif',
- "digMoveVertex" : 'move.vertex.gif',
- "digRemoveVertex" : 'rm.vertex.gif',
- "digSplitLine" : 'split.line.gif',
+ "vertex-create" : 'add.vertex.gif',
+ "vertex-move" : 'move.vertex.gif',
+ "vertex-delete" : 'rm.vertex.gif',
+ "line-split" : 'split.line.gif',
## edit feature
- "digEditLine" : 'edit.line.gif',
- "digMoveLine" : 'move.line.gif',
- "digDeleteLine" : 'delete.line.gif',
+ "line-edit" : 'edit.line.gif',
+ "line-move" : 'move.line.gif',
+ "line-delete" : 'delete.line.gif',
## cats
- "digCopyCats" : 'copy.cats.gif',
- "digDispCats" : 'display.cats.gif',
+ "cats-copy" : 'copy.cats.gif',
+ "cats-display" : 'display.cats.gif',
## attributes
- "digDispAttr" : 'display.attributes.gif',
+ "attributes-display" : 'display.attributes.gif',
## general
- "digUndo" : wx.ART_ERROR, # FIXME
- "digAdditionalTools" : wx.ART_ERROR, # FIXME
+ "undo" : wx.ART_ERROR, # FIXME
+ "tools" : wx.ART_ERROR, # FIXME
# layer manager
- "newdisplay" : 'gui-startmon.gif',
- "fileNew" : 'file-new.gif',
- "fileLoad" : 'file-new.gif',
- "fileOpen" : 'file-open.gif',
- "fileSave" : 'file-save.gif',
- "fileImport" : 'file-new.gif',
- "addrast" : 'element-cell.gif',
- "rastmisc" : 'module-d.shadedmap.gif',
- "addrast3d" : 'element-grid3.gif',
- "addvect" : 'element-vector.gif',
- "vectmisc" : 'module-d.vect.thematic.gif',
- "addcmd" : 'gui-cmd.gif',
- "addgrp" : 'gui-group.gif',
- "addovl" : 'module-d.grid.gif',
- "delcmd" : 'edit-cut.gif',
- "attrtable" : 'db-values.gif',
- "vdigit" : wx.ART_ERROR,
- "addrgb" : 'module-d.rgb.gif',
- "addhis" : 'channel-his.gif',
- "addshaded" : 'module-d.shadedmap.gif',
- "addrarrow" : 'module-d.rast.arrow.gif',
- "addrnum" : 'module-d.rast.num.gif',
- "addthematic": 'module-d.vect.thematic.gif',
- "addchart" : 'module-d.vect.chart.gif',
- "addgrid" : 'module-d.grid.gif',
- "addgeodesic": 'module-d.geodesic.gif',
- "addrhumb" : 'module-d.rhumbline.gif',
- "addlabels" : 'module-d.labels.gif',
- "addtext" : 'module-d.text.gif',
- "addbarscale": 'module-d.barscale.gif',
- "addlegend" : 'module-d.legend.gif',
+ "monitor-create" : 'gui-startmon.gif',
+ "create" : 'file-new.gif',
+ "layer-open" : 'file-new.gif',
+ "open" : 'file-open.gif',
+ "save" : 'file-save.gif',
+ "layer-import" : 'file-new.gif',
+ "layer-raster-add" : 'element-cell.gif',
+ "layer-raster-more" : 'module-d.shadedmap.gif',
+ "layer-raster3d-add" : 'element-grid3.gif',
+ "layer-vector-add" : 'element-vector.gif',
+ "layer-vector-more" : 'module-d.vect.thematic.gif',
+ "layer-command-add" : 'gui-cmd.gif',
+ "layer-group-add" : 'gui-group.gif',
+ "layer-more" : 'module-d.grid.gif',
+ "layer-remove" : 'edit-cut.gif',
+ "table" : 'db-values.gif',
+ "edit" : wx.ART_ERROR,
+ "layer-rgb-add" : 'module-d.rgb.gif',
+ "layer-his-add" : 'channel-his.gif',
+ "layer-shaded-relief-add" : 'module-d.shadedmap.gif',
+ "layer-aspect-arrow-add" : 'module-d.rast.arrow.gif',
+ "layer-cell-cats-add" : 'module-d.rast.num.gif',
+ "layer-vector-thematic-add": 'module-d.vect.thematic.gif',
+ "layer-vector-chart-add" : 'module-d.vect.chart.gif',
+ "layer-grid-add" : 'module-d.grid.gif',
+ "options": 'module-d.geodesic.gif',
+ "options" : 'module-d.rhumbline.gif',
+ "layer-label-add" : 'module-d.labels.gif',
+ "text-add" : 'module-d.text.gif',
+ "scalebar-add": 'module-d.barscale.gif',
+ "legend-add" : 'module-d.legend.gif',
"quit" : 'gui-exit.gif',
- "modeler" : wx.ART_ERROR,
+ "modeler-main" : wx.ART_ERROR,
# analyze raster
- "analyze" : 'gui-rastanalyze.gif',
- "measure" : 'gui-measure.gif',
+ "layer-raster-analyze" : 'gui-rastanalyze.gif',
+ "measure-length" : 'gui-measure.gif',
"font" : 'gui-font.gif',
- "histogram" : 'module-d.histogram.gif',
+ "layer-raster-histogram" : 'module-d.histogram.gif',
"color" : 'edit-color.gif',
- "layeropts" : 'gui-layeroptions.gif',
+ "options" : 'gui-layeroptions.gif',
# profile
- "profile" : 'gui-profile.gif',
- "transect" : 'gui-profiledefine.gif',
- "profiledraw" : 'gui-display.gif',
+ "layer-raster-profile" : 'gui-profile.gif',
+ "layer-raster-profile" : 'gui-profiledefine.gif',
+ "show" : 'gui-display.gif',
"profileopt" : 'gui-profileopt.gif',
# georectify
- 'grGcpClear' : 'gui-gcperase.gif',
- 'grGcpSet' : 'gui-gcpset.gif',
- 'grGeorect' : 'gui-georect.gif',
- 'grGcpRms' : 'gui-rms.gif',
- "grGcpSave" : 'file-save.gif',
- "grGcpAdd" : wx.ART_NEW, # FIXME
- "grGcpDelete" : wx.ART_DELETE, # FIXME
- "grGcpReload" : 'gui-redraw.gif',
+ 'gcp-remove' : 'gui-gcperase.gif',
+ 'gcp-create' : 'gui-gcpset.gif',
+ 'georectify' : 'gui-georect.gif',
+ 'gcp-rms' : 'gui-rms.gif',
+ "gcp-save" : 'file-save.gif',
+ "gcp-add" : wx.ART_NEW, # FIXME
+ "gcp-delete" : wx.ART_DELETE, # FIXME
+ "reload" : 'gui-redraw.gif',
# modeler
- "modelActionAdd" : wx.ART_ERROR,
- "modelDataAdd" : wx.ART_ERROR,
- "modelRelation" : wx.ART_ERROR,
- "modelRun" : wx.ART_ERROR,
- "modelValidate" : wx.ART_ERROR,
- "imageSave" : wx.ART_ERROR,
- "pythonSave" : wx.ART_ERROR,
- "modelProperties" : wx.ART_ERROR,
- "modelVariables" : wx.ART_ERROR,
+ "module-add" : wx.ART_ERROR,
+ "data-add" : wx.ART_ERROR,
+ "relation-create" : wx.ART_ERROR,
+ "execute" : wx.ART_ERROR,
+ "check" : wx.ART_ERROR,
+ "image-export" : wx.ART_ERROR,
+ "python-export" : wx.ART_ERROR,
+ "options" : wx.ART_ERROR,
+ "modeler-variables" : wx.ART_ERROR,
# 3d view
- "nvizView" : wx.ART_ERROR,
- "nvizSurface" : wx.ART_ERROR,
- "nvizVector" : wx.ART_ERROR,
- "nvizVolume" : wx.ART_ERROR,
- "nvizLight" : wx.ART_ERROR,
- "nvizFringe" : wx.ART_ERROR,
+ "3d-view" : wx.ART_ERROR,
+ "3d-raster" : wx.ART_ERROR,
+ "3d-vector" : wx.ART_ERROR,
+ "3d-volume" : wx.ART_ERROR,
+ "3d-light" : wx.ART_ERROR,
+ "3d-fringe" : wx.ART_ERROR,
# various
"settings" : 'edit-color.gif',
"redraw" : 'gui-display.gif',
"help" : wx.ART_ERROR,
- "psScript" : wx.ART_ERROR,
- "psExport" : wx.ART_ERROR,
+ "ps-script" : wx.ART_ERROR,
+ "ps-export" : wx.ART_ERROR,
}
Modified: grass/branches/develbranch_6/gui/wxpython/icons/icon.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/icon.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/icons/icon.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -20,6 +20,7 @@
import os
import sys
+import types
sys.path.append(os.path.join(os.getenv("GISBASE"), "etc", "wxpython", "gui_modules"))
@@ -30,54 +31,63 @@
from preferences import globalSettings as UserSettings
-import grass_icons # default icon set
-iconpath_default = grass_icons.iconpath
-iconpath_vdigit = grass_icons.iconpath_vdigit
-Icons_default = grass_icons.IconsGrass
+import grass2_icons # default icon set
+iconPathDefault = grass2_icons.iconPath
+iconSetDefault = grass2_icons.iconSet
iconTheme = UserSettings.Get(group='advanced', key='iconTheme', subkey='type')
if iconTheme == 'silk':
import silk_icons
- iconpath = silk_icons.iconpath
- Icons = silk_icons.IconsSilk
-elif iconTheme == 'grass2':
- import grass2_icons
- iconpath = grass2_icons.iconpath
- Icons = grass2_icons.IconsGrass2
+ iconPath = silk_icons.iconPath
+ iconSet = silk_icons.iconSet
+elif iconTheme == 'grass':
+ import grass_icons
+ iconPath = grass_icons.iconPath
+ iconPathVDigit = grass_icons.iconPathVDigit
+ iconSet = grass_icons.iconSet
else:
- iconpath = iconpath_default
- Icons = grass_icons.IconsGrass
+ iconPath = iconPathDefault
+ iconSet = iconSetDefault
# merge icons dictionaries, join paths
try:
- if iconpath and not os.path.exists(iconpath):
+ if iconPath and not os.path.exists(iconPath):
raise OSError
if iconTheme != 'grass':
# use default icons if no icon is available
- for key, img in Icons_default.iteritems():
- if not Icons.has_key(key) or \
- Icons[key] is None: # add key
- Icons[key] = img
+ for key, img in iconSet.iteritems():
+ if not iconSet.has_key(key) or \
+ iconSet[key] is None: # add key
+ iconSet[key] = img
- if Icons[key] == img:
- if key[0:3] == 'dig':
- iconpath_tmp = iconpath_vdigit
- else:
- iconpath_tmp = iconpath_default
- else:
- iconpath_tmp = iconpath
-
- Icons[key] = os.path.join(iconpath_tmp, Icons[key])
+ iconSet[key] = os.path.join(iconPath, iconSet[key])
else:
- for key, img in Icons.iteritems():
- if img and type (Icons[key]) == type(''):
- if key[0:3] == 'dig':
- Icons[key] = os.path.join(iconpath_vdigit, img)
+ for key, img in iconSet.iteritems():
+ if img and type(iconSet[key]) == types.StringType:
+ if key in ("point-create",
+ "line-create",
+ "boundary-create",
+ "centroid-create",
+ "polygon-create",
+ "vertex-create",
+ "vertex-move",
+ "vertex-delete",
+ "line-split",
+ "line-edit",
+ "line-move",
+ "line-delete",
+ "cats-copy",
+ "cats-display",
+ "attributes-display",
+ "undo",
+ "tools"):
+ iconSet[key] = os.path.join(iconPathVDigit, img)
else:
- Icons[key] = os.path.join(iconpath_default, img)
-except:
- sys.exit(_("Unable to load icon theme..."))
+ iconSet[key] = os.path.join(iconPath, img)
+ print img, iconSet[key]
+except StandardError, e:
+ sys.exit(_("Unable to load icon theme. Reason: %s") % e)
class MetaIcon:
"""!Handle icon metadata (image path, tooltip, ...)
@@ -133,289 +143,303 @@
# create list of icon instances
#
Icons = {
- # map display
- "displaymap" : MetaIcon (img=Icons["displaymap"],
- label=_("Display map"),
- desc = _("Re-render modified map layers")),
- "rendermap" : MetaIcon (img=Icons["rendermap"],
- label=_("Re-render map"),
- desc=_("Force re-rendering all map layers")),
- "erase" : MetaIcon (img=Icons["erase"],
- label=_("Erase display")),
- "pointer" : MetaIcon (img=Icons["pointer"],
- label=_("Pointer")),
- "zoom_in" : MetaIcon (img=Icons["zoom_in"],
- label=_("Zoom in"),
- desc=_("Drag or click mouse to zoom")),
- "zoom_out" : MetaIcon (img=Icons["zoom_out"],
- label=_("Zoom out"),
- desc=_("Drag or click mouse to unzoom")),
- "pan" : MetaIcon (img=Icons["pan"],
- label=_("Pan"),
- desc=_("Drag with mouse to pan")),
- "query" : MetaIcon (img=Icons["query"],
- label=_("Query raster/vector map(s)"),
- desc=_("Query selected raster/vector map(s)")),
- "zoom_back" : MetaIcon (img=Icons["zoom_back"],
- label=_("Return to previous zoom")),
- "zoommenu" : MetaIcon (img=Icons["zoommenu"],
- label=_("Zoom options"),
- desc=_("Display zoom management")),
- "zoom_extent" : MetaIcon (img=Icons["zoom_extent"],
- label=_("Zoom to selected map layer(s)")),
- "overlay" : MetaIcon (img=Icons["overlay"],
- label=_("Add map elements"),
- desc=_("Overlay elements like scale and legend onto map")),
- "addbarscale": MetaIcon (img=Icons["addbarscale"],
- label=_("Add scalebar and north arrow")),
- "addlegend" : MetaIcon (img=Icons["addlegend"],
- label=_("Add legend")),
- "savefile" : MetaIcon (img=Icons["savefile"],
- label=_("Save display to graphic file")),
- "printmap" : MetaIcon (img=Icons["printmap"],
- label=_("Print display")),
- # layer manager
- "newdisplay" : MetaIcon (img=Icons["newdisplay"],
- label=_("Start new map display")),
- "workspaceNew" : MetaIcon (img=Icons["fileNew"],
- label=_("Create new workspace (Ctrl+N)")),
- "workspaceLoad" : MetaIcon (img=Icons["fileLoad"],
- label=_("Load map layers into workspace (Ctrl+L)")),
- "workspaceOpen" : MetaIcon (img=Icons["fileOpen"],
- label=_("Open existing workspace file (Ctrl+O)")),
- "workspaceSave" : MetaIcon (img=Icons["fileSave"],
- label=_("Save current workspace to file (Ctrl+S)")),
- "rastImport" : MetaIcon (img=Icons["fileImport"],
- label=_("Import raster data")),
- "vectImport" : MetaIcon (img=Icons["fileImport"],
- label=_("Import vector data")),
- "addrast" : MetaIcon (img=Icons["addrast"],
- label=_("Add raster map layer (Ctrl+R)")),
- "rastmisc" : MetaIcon (img=Icons["rastmisc"],
- label=_("Add various raster map layers (RGB, HIS, shaded relief...)")),
- "addvect" : MetaIcon (img=Icons["addvect"],
- label=_("Add vector map layer (Ctrl+V)")),
- "vectmisc" : MetaIcon (img=Icons["vectmisc"],
- label=_("Add various vector map layers (thematic, chart...)")),
- "addcmd" : MetaIcon (img=Icons["addcmd"],
- label=_("Add command layer")),
- "addgrp" : MetaIcon (img=Icons["addgrp"],
- label=_("Add group")),
- "addovl" : MetaIcon (img=Icons["addovl"],
- label=_("Add grid or vector labels overlay")),
- "delcmd" : MetaIcon (img=Icons["delcmd"],
- label=_("Delete selected map layer")),
- "quit" : MetaIcon (img=Icons["quit"],
- label=_("Quit")),
- "attrtable" : MetaIcon (img=Icons["attrtable"],
- label=_("Show attribute table")),
- "vdigit" : MetaIcon (img=Icons["vdigit"],
- label=_("Edit vector maps")),
- "addrgb" : MetaIcon (img=Icons["addrgb"],
- label=_("Add RGB map layer")),
- "addhis" : MetaIcon (img=Icons["addhis"],
- label=_("Add HIS map layer")),
- "addshaded" : MetaIcon (img=Icons["addshaded"],
- label=_("Add shaded relief map layer")),
- "addrarrow" : MetaIcon (img=Icons["addrarrow"],
- label=_("Add raster flow arrows")),
- "addrnum" : MetaIcon (img=Icons["addrnum"],
- label=_("Add raster cell numbers")),
- "addthematic": MetaIcon (img=Icons["addthematic"],
- label=_("Add thematic layer")),
- "addchart" : MetaIcon (img=Icons["addchart"],
- label=_("Add thematic chart layer")),
- "addgrid" : MetaIcon (img=Icons["addgrid"],
- label=_("Add grid layer")),
- "addgeodesic": MetaIcon (img=Icons["addgeodesic"],
- label=_("Add geodesic line layer")),
- "addrhumb" : MetaIcon (img=Icons["addrhumb"],
- label=_("Add rhumbline layer")),
- "addlabels" : MetaIcon (img=Icons["addlabels"],
- label=_("Add labels")),
- "addtext" : MetaIcon (img=Icons["addtext"],
- label=_("Add text layer")),
- "addrast3d" : MetaIcon (img=Icons["addrast3d"],
- label=_("Add 3D raster map layer"),
- desc = _("Note that 3D raster data are rendered only in 3D view mode")),
- "settings" : MetaIcon (img=Icons["settings"],
- label=_("Show GUI settings")),
- # digit
- "digAddPoint": MetaIcon (img=Icons["digAddPoint"],
- label=_("Digitize new point"),
- desc=_("Left: new point")),
- "digAddLine" : MetaIcon (img=Icons["digAddLine"],
- label=_("Digitize new line"),
- desc=_("Left: new point; Middle: undo last point; Right: close line")),
- "digAddBoundary": MetaIcon (img=Icons["digAddBoundary"],
- label=_("Digitize new boundary"),
- desc=_("Left: new point; Middle: undo last point; Right: close line")),
- "digAddCentroid": MetaIcon (img=Icons["digAddCentroid"],
- label=_("Digitize new centroid"),
- desc=_("Left: new point")),
- "digAddArea": MetaIcon (img=Icons["digAddArea"],
- label=_("Digitize new area (composition of bondaries without category and one centroid with category)"),
- desc=_("Left: new point")),
- "digAddVertex": MetaIcon (img=Icons["digAddVertex"],
- label=_("Add new vertex"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digCopyCats": MetaIcon (img=Icons["digCopyCats"],
- label=_("Copy categories"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digDeleteLine": MetaIcon (img=Icons["digDeleteLine"],
- label=_("Delete feature(s)"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digDispAttr": MetaIcon (img=Icons["digDispAttr"],
- label=_("Display/update attributes"),
- desc=_("Left: Select")),
- "digDispCats": MetaIcon (img=Icons["digDispCats"],
- label=_("Display/update categories"),
- desc=_("Left: Select")),
- "digEditLine": MetaIcon (img=Icons["digEditLine"],
- label=_("Edit line/boundary"),
- desc=_("Left: new point; Middle: undo last point; Right: close line")),
- "digMoveLine": MetaIcon (img=Icons["digMoveLine"],
- label=_("Move feature(s)"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digMoveVertex": MetaIcon (img=Icons["digMoveVertex"],
- label=_("Move vertex"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digRemoveVertex": MetaIcon (img=Icons["digRemoveVertex"],
- label=_("Remove vertex"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digSettings": MetaIcon (img=Icons["settings"],
- label=_("Settings"),
- desc=_("Settings dialog for digitization tool")),
- "digSplitLine": MetaIcon (img=Icons["digSplitLine"],
- label=_("Split line/boundary"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digExit" : MetaIcon (img=Icons["quit"],
- label=_("Quit digitizing tool")),
- "digAdditionalTools" : MetaIcon (img=Icons["digAdditionalTools"],
- label=_("Additional tools " \
- "(copy, flip, connect, etc.)"),
- desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
- "digUndo" : MetaIcon (img=Icons["digUndo"],
- label=_("Undo"),
- desc=_("Undo previous changes")),
- # analyze raster
- "analyze" : MetaIcon (img=Icons["analyze"],
- label=_("Analyze map")),
- "measure" : MetaIcon (img=Icons["measure"],
- label=_("Measure distance")),
- "transect" : MetaIcon (img=Icons["transect"],
- label=_("Draw transect in map display window to profile")),
- "profile" : MetaIcon (img=Icons["profile"],
- label=_("Profile surface map")),
- "profiledraw": MetaIcon (img=Icons["profiledraw"],
- label=_("Draw/re-draw profile")),
- "profileopt" : MetaIcon (img=Icons["settings"],
- label=_("Profile options")),
- "datasave" : MetaIcon (img=Icons["fileSave"],
- label=_("Save profile data to csv file")),
- "histogram" : MetaIcon (img=Icons["histogram"],
- label=_("Create histogram of image or raster file")),
- "font" : MetaIcon (img=Icons["font"],
- label=_("Select font")),
- "color" : MetaIcon (img=Icons["color"],
- label=_("Select color")),
- "layeropts" : MetaIcon (img=Icons["layeropts"],
- label=_("Set options")),
- "analyze" : MetaIcon (img=Icons["analyze"],
- label=_("Analyze")),
- # georectify
- 'grGcpSet' : MetaIcon (img=Icons["grGcpSet"],
- label=_("Set GCP"),
- desc=_("Define GCP (Ground Control Points)")),
- 'grGeorect' : MetaIcon (img=Icons["grGeorect"],
- label=_("Georectify")),
- 'grGcpRms' : MetaIcon (img=Icons["grGcpRms"],
- label=_("Recalculate RMS error")),
- 'grGcpSave' : MetaIcon (img=Icons["grGcpSave"],
- label=_("Save GCPs to POINTS file")),
- 'grGcpAdd' : MetaIcon (img=Icons["grGcpAdd"],
- label=_("Add new GCP")),
- 'grGcpDelete' : MetaIcon (img=Icons["grGcpDelete"],
- label=_("Delete selected GCP")),
- 'grGcpClear' : MetaIcon (img=Icons["grGcpClear"],
- label=_("Clear selected GCP")),
- 'grGcpReload' : MetaIcon (img=Icons["grGcpReload"],
- label=_("Reload GCPs from POINTS file")),
- 'grGcpQuit' : MetaIcon (img=Icons["quit"],
- label=_("Quit georectification module")),
- "grSettings": MetaIcon (img=Icons["settings"],
- label=_("Settings"),
- desc=_("Settings dialog for georectification tool")),
- # nviz
- "nvizView": MetaIcon (img=Icons["nvizView"],
- label=_("Switch to view control page"),
- desc=_("Change view settings")),
- "nvizSurface": MetaIcon (img=Icons["nvizSurface"],
- label=_("Switch to surface (raster) control page"),
- desc=_("Change surface (loaded raster maps) settings")),
- "nvizVector": MetaIcon (img=Icons["nvizVector"],
- label=_("Switch to vector (2D/3D) control page"),
- desc=_("Change 2D/3D vector settings")),
- "nvizVolume": MetaIcon (img=Icons["nvizVolume"],
- label=_("Switch to volume (3D raster) control page"),
- desc=_("Change volume (loaded 3D raster maps) settings")),
- "nvizLight": MetaIcon (img=Icons["nvizLight"],
- label=_("Switch to lighting control page"),
- desc=_("Change lighting settings")),
- "nvizFringe": MetaIcon (img=Icons["nvizFringe"],
- label=_("Switch to fringe control page"),
- desc=_("Switch on/off fringes")),
- "nvizSettings": MetaIcon (img=Icons["settings"],
- label=_("3D view mode tools"),
- desc=_("Show/hide 3D view mode settings dialog")),
- "nvizHelp" : MetaIcon (img=Icons["help"],
- label=_("Show help"),
- desc = _("Display 3D view mode manual page")),
- "nvizQuit": MetaIcon (img=Icons["quit"],
- 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"],
- label=_("Load model from file (Ctrl+O)")),
- "modelSave" : MetaIcon (img=Icons["fileSave"],
- label=_("Save current model to file (Ctrl+S)")),
- "modelToImage" : MetaIcon (img=Icons["imageSave"],
- label=_("Export model to image")),
- "modelToPython" : MetaIcon (img=Icons["pythonSave"],
- label=_("Export model to Python script")),
- "modelActionAdd" : MetaIcon (img=Icons["modelActionAdd"],
- label=_("Add action (GRASS module) to model")),
- "modelDataAdd" : MetaIcon (img=Icons["modelDataAdd"],
- label=_("Add data item to model")),
- "modelRelation" : MetaIcon (img=Icons["modelRelation"],
- label=_("Define relation between data and action items")),
- "modelRun" : MetaIcon (img=Icons["modelRun"],
- label=_("Run model")),
- "modelValidate" : MetaIcon (img=Icons["modelValidate"],
- label=_("Validate model")),
- "modelSettings" : MetaIcon (img=Icons["settings"],
- label=_("Show modeler settings")),
- "modelProperties" : MetaIcon (img=Icons["modelProperties"],
- label=_("Show model properties")),
- "modelVariables" : MetaIcon (img=Icons["modelVariables"],
- label=_("Manage model variables")),
- "modelRedraw" : MetaIcon (img=Icons["redraw"],
- label=_("Redraw model canvas")),
- "modelHelp" : MetaIcon (img=Icons["help"],
- label=_("Show help"),
- desc = _("Display Graphical Modeler manual page")),
- # ps.map
- "psScript" : MetaIcon (img=Icons["psScript"],
- label=_("Generate instruction file")),
- "psExport" : MetaIcon (img=Icons["psExport"],
- label=_("Generate PostScript output")),
+ 'displayWindow' : {
+ 'display' : MetaIcon(img = iconSet['show'],
+ label = _('Display map'),
+ desc = _('Re-render modified map layers only')),
+ 'render' : MetaIcon(img = iconSet['layer-redraw'],
+ label = _('Render map'),
+ desc = _('Force re-rendering all map layers')),
+ 'erase' : MetaIcon(img = iconSet['erase'],
+ label = _('Erase display'),
+ desc = _('Erase display canvas with given background color')),
+ 'pointer' : MetaIcon(img = iconSet['pointer'],
+ label = _('Pointer')),
+ 'zoomIn' : MetaIcon(img = iconSet['zoom-in'],
+ label = _('Zoom in'),
+ desc = _('Drag or click mouse to zoom')),
+ 'zoomOut' : MetaIcon(img = iconSet['zoom-out'],
+ label = _('Zoom out'),
+ desc = _('Drag or click mouse to unzoom')),
+ 'pan' : MetaIcon(img = iconSet['pan'],
+ label = _('Pan'),
+ desc = _('Drag with mouse to pan')),
+ 'query' : MetaIcon(img = iconSet['info'],
+ label = _('Query raster/vector map(s)'),
+ desc = _('Query selected raster/vector map(s)')),
+ 'zoomBack' : MetaIcon(img = iconSet['zoom-last'],
+ label = _('Return to previous zoom')),
+ 'zoomMenu' : MetaIcon(img = iconSet['zoom-more'],
+ label = _('Various zoom options'),
+ desc = _('Zoom to computational, default, saved region, ...')),
+ 'zoomExtent' : MetaIcon(img = iconSet['zoom-extent'],
+ label = _('Zoom to selected map layer(s)')),
+ 'overlay' : MetaIcon(img = iconSet['overlay-add'],
+ label = _('Add map elements'),
+ desc = _('Overlay elements like scale and legend onto map')),
+ 'addBarscale': MetaIcon(img = iconSet['scalebar-add'],
+ label = _('Add scalebar and north arrow')),
+ 'addLegend' : MetaIcon(img = iconSet['legend-add'],
+ label = _('Add legend')),
+ 'saveFile' : MetaIcon(img = iconSet['map-export'],
+ label = _('Save display to graphic file')),
+ 'print' : MetaIcon(img = iconSet['print'],
+ label = _('Print display')),
+ 'analyze' : MetaIcon(img = iconSet['layer-raster-analyze'],
+ label = _('Analyze map'),
+ desc = _('Measuring, profiling, histogramming, ...')),
+ 'measure' : MetaIcon(img = iconSet['measure-length'],
+ label = _('Measure distance')),
+ 'profile' : MetaIcon(img = iconSet['layer-raster-profile'],
+ label = _('Profile surface map')),
+ 'addText' : MetaIcon(img = iconSet['text-add'],
+ label = _('Add text layer')),
+ 'histogram' : MetaIcon(img = iconSet['layer-raster-histogram'],
+ label = _('Create histogram of image or raster file')),
+ },
+ 'layerManager' : {
+ 'newdisplay' : MetaIcon(img = iconSet['monitor-create'],
+ label = _('Start new map display')),
+ 'workspaceNew' : MetaIcon(img = iconSet['create'],
+ label = _('Create new workspace (Ctrl+N)')),
+ 'workspaceLoad' : MetaIcon(img = iconSet['layer-open'],
+ label = _('Load map layers into workspace (Ctrl+L)')),
+ 'workspaceOpen' : MetaIcon(img = iconSet['open'],
+ label = _('Open existing workspace file (Ctrl+O)')),
+ 'workspaceSave' : MetaIcon(img = iconSet['save'],
+ label = _('Save current workspace to file (Ctrl+S)')),
+ 'rastImport' : MetaIcon(img = iconSet['layer-import'],
+ label = _('Import raster data')),
+ 'rastLink' : MetaIcon(img = iconSet['layer-import'],
+ label = _('Link external raster data')),
+ 'vectImport' : MetaIcon(img = iconSet['layer-import'],
+ label = _('Import vector data')),
+ 'vectLink' : MetaIcon(img = iconSet['layer-import'],
+ label = _('Link external vector data')),
+ 'addRast' : MetaIcon(img = iconSet['layer-raster-add'],
+ label = _('Add raster map layer (Ctrl+R)')),
+ 'rastMisc' : MetaIcon(img = iconSet['layer-raster-more'],
+ label = _('Add various raster map layers (RGB, HIS, shaded relief...)')),
+ 'addVect' : MetaIcon(img = iconSet['layer-vector-add'],
+ label = _('Add vector map layer (Ctrl+V)')),
+ 'vectMisc' : MetaIcon(img = iconSet['layer-vector-more'],
+ label = _('Add various vector map layers (thematic, chart...)')),
+ 'addCmd' : MetaIcon(img = iconSet['layer-command-add'],
+ label = _('Add command layer')),
+ 'addGroup' : MetaIcon(img = iconSet['layer-group-add'],
+ label = _('Add group')),
+ 'addOverlay' : MetaIcon(img = iconSet['layer-more'],
+ label = _('Add grid or vector labels overlay')),
+ 'delCmd' : MetaIcon(img = iconSet['layer-remove'],
+ label = _('Delete selected map layer')),
+ 'quit' : MetaIcon(img = iconSet['quit'],
+ label = _('Quit')),
+ 'attrTable' : MetaIcon(img = iconSet['table'],
+ label = _('Show attribute table')),
+ 'vdigit' : MetaIcon(img = iconSet['edit'],
+ label = _('Edit vector maps')),
+ 'addRgb' : MetaIcon(img = iconSet['layer-rgb-add'],
+ label = _('Add RGB map layer')),
+ 'addHis' : MetaIcon(img = iconSet['layer-his-add'],
+ label = _('Add HIS map layer')),
+ 'addShaded' : MetaIcon(img = iconSet['layer-shaded-relief-add'],
+ label = _('Add shaded relief map layer')),
+ 'addRArrow' : MetaIcon(img = iconSet['layer-aspect-arrow-add'],
+ label = _('Add raster flow arrows')),
+ 'addRNum' : MetaIcon(img = iconSet['layer-cell-cats-add'],
+ label = _('Add raster cell numbers')),
+ 'addThematic': MetaIcon(img = iconSet['layer-vector-thematic-add'],
+ label = _('Add thematic area (choropleth) map layer')),
+ 'addChart' : MetaIcon(img = iconSet['layer-vector-chart-add'],
+ label = _('Add thematic chart layer')),
+ 'addGrid' : MetaIcon(img = iconSet['layer-grid-add'],
+ label = _('Add grid layer')),
+ 'addGeodesic': MetaIcon(img = iconSet['options'],
+ label = _('Add geodesic line layer')),
+ 'addRhumb' : MetaIcon(img = iconSet['options'],
+ label = _('Add rhumbline layer')),
+ 'addLabels' : MetaIcon(img = iconSet['layer-label-add'],
+ label = _('Add labels')),
+ 'addRast3d' : MetaIcon(img = iconSet['layer-raster3d-add'],
+ label = _('Add 3D raster map layer'),
+ desc = _('Note that 3D raster data are rendered only in 3D view mode')),
+ 'settings' : MetaIcon(img = iconSet['settings'],
+ label = _('Show GUI settings')),
+ 'modeler' : MetaIcon(img = iconSet['modeler-main'],
+ label = _('Start Graphical Modeler')),
+ "layerOptions" : MetaIcon(img = iconSet['options'],
+ label = _('Set options')),
+ },
+ 'vdigit' : {
+ 'addPoint' : MetaIcon(img = iconSet['point-create'],
+ label = _('Digitize new point'),
+ desc = _('Left: new point')),
+ 'addLine' : MetaIcon(img = iconSet['line-create'],
+ label = _('Digitize new line'),
+ desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
+ 'addBoundary' : MetaIcon(img = iconSet['boundary-create'],
+ label = _('Digitize new boundary'),
+ desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
+ 'addCentroid' : MetaIcon(img = iconSet['centroid-create'],
+ label = _('Digitize new centroid'),
+ desc = _('Left: new point')),
+ 'addArea' : MetaIcon(img = iconSet['polygon-create'],
+ label = _('Digitize new area (composition of bondaries without category and one centroid with category)'),
+ desc = _('Left: new point')),
+ 'addVertex' : MetaIcon(img = iconSet['vertex-create'],
+ label = _('Add new vertex'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'copyCats' : MetaIcon(img = iconSet['cats-copy'],
+ label = _('Copy categories'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'deleteLine' : MetaIcon(img = iconSet['line-delete'],
+ label = _('Delete feature(s)'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'displayAttr' : MetaIcon(img = iconSet['attributes-display'],
+ label = _('Display/update attributes'),
+ desc = _('Left: Select')),
+ 'displayCats' : MetaIcon(img = iconSet['cats-display'],
+ label = _('Display/update categories'),
+ desc = _('Left: Select')),
+ 'editLine' : MetaIcon(img = iconSet['line-edit'],
+ label = _('Edit line/boundary'),
+ desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
+ 'moveLine' : MetaIcon(img = iconSet['line-move'],
+ label = _('Move feature(s)'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'moveVertex' : MetaIcon(img = iconSet['vertex-move'],
+ label = _('Move vertex'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'removeVertex' : MetaIcon(img = iconSet['vertex-delete'],
+ label = _('Remove vertex'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'settings' : MetaIcon(img = iconSet['settings'],
+ label = _('Digitization settings')),
+ 'splitLine' : MetaIcon(img = iconSet['line-split'],
+ label = _('Split line/boundary'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'quit' : MetaIcon(img = iconSet['quit'],
+ label = _('Quit digitizer'),
+ desc = _('Quit digitizer and save changes')),
+ 'additionalTools' : MetaIcon(img = iconSet['tools'],
+ label = _('Additional tools ' \
+ '(copy, flip, connect, etc.)'),
+ desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
+ 'undo' : MetaIcon(img = iconSet['undo'],
+ label = _('Undo'),
+ desc = _('Undo previous changes')),
+ },
+ 'profile' : {
+ 'draw' : MetaIcon(img = iconSet['show'],
+ label = _('Draw/re-draw profile')),
+ 'transect' : MetaIcon(img = iconSet['layer-raster-profile'],
+ label = _('Draw transect in map display window to profile')),
+ 'options' : MetaIcon(img = iconSet['settings'],
+ label = _('Profile options')),
+ 'save' : MetaIcon(img = iconSet['save'],
+ label = _('Save profile data to CSV file')),
+ 'quit' : MetaIcon(img = iconSet['quit'],
+ label = _('Quit Profile Analysis Tool'))
+ },
+ 'georectify' : {
+ 'gcpSet' : MetaIcon(img = iconSet['gcp-create'],
+ label = _('Set GCP'),
+ desc = _('Define GCP (Ground Control Points)')),
+ 'georectify': MetaIcon(img = iconSet['georectify'],
+ label = _('Georectify')),
+ 'gcpRms' : MetaIcon(img = iconSet['gcp-rms'],
+ label = _('Recalculate RMS error')),
+ 'gcpSave' : MetaIcon(img = iconSet['gcp-save'],
+ label = _('Save GCPs to POINTS file')),
+ 'gcpAdd' : MetaIcon(img = iconSet['gcp-add'],
+ label = _('Add new GCP')),
+ 'gcpDelete' : MetaIcon(img = iconSet['gcp-delete'],
+ label = _('Delete selected GCP')),
+ 'gcpClear' : MetaIcon(img = iconSet['gcp-remove'],
+ label = _('Clear selected GCP')),
+ 'gcpReload' : MetaIcon(img = iconSet['reload'],
+ label = _('Reload GCPs from POINTS file')),
+ 'quit' : MetaIcon(img = iconSet['quit'],
+ label = _('Quit georectification')),
+ 'settings' : MetaIcon(img = iconSet['settings'],
+ label = _('Settings'),
+ desc = _('Settings dialog for georectification tool')),
+ },
+ 'nviz' : {
+ 'view' : MetaIcon(img = iconSet['3d-view'],
+ label = _('Switch to view control page'),
+ desc = _('Change view settings')),
+ 'surface' : MetaIcon(img = iconSet['3d-raster'],
+ label = _('Switch to surface (raster) control page'),
+ desc = _('Change surface (loaded raster maps) settings')),
+ 'vector' : MetaIcon(img = iconSet['3d-vector'],
+ label = _('Switch to vector (2D/3D) control page'),
+ desc = _('Change 2D/3D vector settings')),
+ 'volume' : MetaIcon(img = iconSet['3d-volume'],
+ label = _('Switch to volume (3D raster) control page'),
+ desc = _('Change volume (loaded 3D raster maps) settings')),
+ 'light' : MetaIcon(img = iconSet['3d-light'],
+ label = _('Switch to lighting control page'),
+ desc = _('Change lighting settings')),
+ 'fringe' : MetaIcon(img = iconSet['3d-fringe'],
+ label = _('Switch to fringe control page'),
+ desc = _('Switch on/off fringes')),
+ 'settings': MetaIcon(img = iconSet['settings'],
+ label = _('3D view mode tools'),
+ desc = _('Show/hide 3D view mode settings dialog')),
+ 'quit' : MetaIcon(img = iconSet['quit'],
+ label = _('Quit 3D view mode'),
+ desc = _('Switch back to 2D view mode')),
+ },
+ 'modeler' : {
+ 'new' : MetaIcon(img = iconSet['create'],
+ label = _('Create new model (Ctrl+N)')),
+ 'open' : MetaIcon(img = iconSet['open'],
+ label = _('Load model from file (Ctrl+O)')),
+ 'save' : MetaIcon(img = iconSet['save'],
+ label = _('Save current model to file (Ctrl+S)')),
+ 'toImage' : MetaIcon(img = iconSet['image-export'],
+ label = _('Export model to image')),
+ 'toPython' : MetaIcon(img = iconSet['python-export'],
+ label = _('Export model to Python script')),
+ 'actionAdd' : MetaIcon(img = iconSet['module-add'],
+ label = _('Add action (GRASS module) to model')),
+ 'dataAdd' : MetaIcon(img = iconSet['data-add'],
+ label = _('Add data item to model')),
+ 'relation' : MetaIcon(img = iconSet['relation-create'],
+ label = _('Define relation between data and action items')),
+ 'run' : MetaIcon(img = iconSet['execute'],
+ label = _('Run model')),
+ 'validate' : MetaIcon(img = iconSet['check'],
+ label = _('Validate model')),
+ 'settings' : MetaIcon(img = iconSet['settings'],
+ label = _('Show modeler settings')),
+ 'properties' : MetaIcon(img = iconSet['options'],
+ label = _('Show model properties')),
+ 'variables' : MetaIcon(img = iconSet['modeler-variables'],
+ label = _('Manage model variables')),
+ 'redraw' : MetaIcon(img = iconSet['redraw'],
+ label = _('Redraw model canvas')),
+ 'quit' : MetaIcon(img = iconSet['quit'],
+ label = _('Quit Graphical Modeler')),
+ },
+ 'psMap' : {
+ 'script' : MetaIcon(img = iconSet['ps-script'],
+ label = _('Generate instruction file')),
+ 'export' : MetaIcon(img = iconSet['ps-export'],
+ label = _('Generate PostScript output')),
+ },
+ 'misc' : {
+ 'font' : MetaIcon(img = iconSet['font'],
+ label = _('Select font')),
+ 'help' : MetaIcon(img = iconSet['help'],
+ label = _('Show help page')),
+ 'quit' : MetaIcon(img = iconSet['quit'],
+ label = _('Quit')),
+ }
}
# testing ...
-if __name__ == "__main__":
- for k, v in Icons.iteritems():
+if __name__ == '__main__':
+ for k, v in iconSet.iteritems():
print v.GetImageName()
Modified: grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/icons/silk_icons.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -12,123 +12,123 @@
import globalvar
-iconpath = os.path.join(globalvar.ETCDIR, "gui", "icons", "silk")
+iconPath = os.path.join(globalvar.ETCDIR, "gui", "icons", "silk")
-IconsSilk = {
+iconSet = {
# map display
- "displaymap" : 'map_go.png',
- "rendermap" : 'arrow_refresh.png',
+ "show" : 'map_go.png',
+ "layer-redraw" : 'arrow_refresh.png',
"erase" : 'cross.png',
"pointer" : 'cursor.png',
- "query" : 'information.png',
- "savefile" : 'picture_save.png',
- "printmap" : 'printer.png',
+ "info" : 'information.png',
+ "map-export" : 'picture_save.png',
+ "print" : 'printer.png',
"pan" : 'arrow_out.png',
# zoom (mapdisplay)
- "zoom_in" : 'zoom_in.png',
- "zoom_out" : 'zoom_out.png',
- "zoom_back" : 'zoom_back.png',
- "zoommenu" : 'zoom.png',
- "zoom_extent" : 'zoom_extent.png',
- # analyze raster (mapdisplay)
- "analyze" : 'application_lightning.png',
- "measure" : 'sum.png',
- "profile" : 'wand.png',
- "histogram" : 'chart_bar.png',
+ "zoom-in" : 'zoom_in.png',
+ "zoom-out" : 'zoom_out.png',
+ "zoom-last" : 'zoom_back.png',
+ "zoom-more" : 'zoom.png',
+ "zoom-extent" : 'zoom_extent.png',
+ # layer-raster-analyze raster (mapdisplay)
+ "layer-raster-analyze" : 'application_lightning.png',
+ "measure-length" : 'sum.png',
+ "layer-raster-profile" : 'wand.png',
+ "layer-raster-histogram" : 'chart_bar.png',
"font" : 'font.png',
- # overlay (mapdisplay)
- "overlay" : 'overlays.png',
- "addtext" : 'textfield_add.png',
- "addbarscale": 'page_white_picture.png',
- "addlegend" : 'page_green.png',
+ # overlay-add (mapdisplay)
+ "overlay-add" : 'overlays.png',
+ "text-add" : 'textfield_add.png',
+ "scalebar-add": 'page_white_picture.png',
+ "legend-add" : 'page_green.png',
"quit" : 'door_in.png',
# digit
## add feature
- "digAddPoint": 'bullet_add.png',
- "digAddLine" : 'vector_add.png',
- "digAddBoundary": 'shape_handles.png',
- "digAddCentroid": 'shape_square_add.png',
- "digAddArea": wx.ART_ERROR,
+ "point-create": 'bullet_add.png',
+ "line-create" : 'vector_add.png',
+ "boundary-create": 'shape_handles.png',
+ "centroid-create": 'shape_square_add.png',
+ "polygon-create": wx.ART_ERROR,
## vertex
- "digAddVertex" : 'chart_line_add.png',
- "digMoveVertex" : 'chart_line.png',
- "digRemoveVertex" : 'chart_line_delete.png',
- "digSplitLine" : 'chart_line_link.png',
+ "vertex-create" : 'chart_line_add.png',
+ "vertex-move" : 'chart_line.png',
+ "vertex-delete" : 'chart_line_delete.png',
+ "line-split" : 'chart_line_link.png',
## edit feature
- "digEditLine" : 'chart_line_edit.png',
- "digMoveLine" : 'bullet_go.png',
- "digDeleteLine" : 'vector_delete.png',
+ "line-edit" : 'chart_line_edit.png',
+ "line-move" : 'bullet_go.png',
+ "line-delete" : 'vector_delete.png',
## cats
- "digDispCats" : 'chart_organisation.png',
- "digCopyCats" : 'chart_organisation_add.png',
+ "cats-display" : 'chart_organisation.png',
+ "cats-copy" : 'chart_organisation_add.png',
## attributes
- "digDispAttr" : 'table.png',
+ "attributes-display" : 'table.png',
## general
- "digUndo" : 'arrow_undo.png',
- "digAdditionalTools" : 'plugin.png',
+ "undo" : 'arrow_undo.png',
+ "tools" : 'plugin.png',
# layer manager
- "newdisplay" : 'application_add.png',
- "fileNew" : 'page_white.png',
- "fileLoad" : 'page_white_get.png',
- "fileOpen" : 'folder.png',
- "fileSave" : 'page_save.png',
- "fileImport" : 'page_white_get.png',
- "addrast" : 'image_add.png',
- "rastmisc" : 'picture_empty.png',
- "addrast3d" : 'bricks.png',
- "addshaded" : 'picture_empty.png',
- "addrarrow" : 'arrow_inout.png',
- "addrnum" : 'color_swatch.png',
- "addvect" : 'map_add.png',
- "vectmisc" : 'thematic.png',
- "addcmd" : 'cog_add.png',
- "addgrp" : 'folder_add.png',
- "addovl" : 'images.png',
- "addgrid" : 'application_view_icons.png',
- "addlabels" : 'tag_blue_add.png',
- "delcmd" : 'bin_closed.png',
- "attrtable" : 'application_view_columns.png',
- "vdigit" : wx.ART_ERROR,
- "addrgb" : 'rgb.png',
- "addhis" : 'his.png',
- "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',
- "profileopt" : 'color_swatch.png',
+ "monitor-create" : 'application_add.png',
+ "create" : 'page_white.png',
+ "layer-open" : 'page_white_get.png',
+ "open" : 'folder.png',
+ "save" : 'page_save.png',
+ "layer-import" : 'page_white_get.png',
+ "layer-raster-add" : 'image_add.png',
+ "layer-raster-more" : 'picture_empty.png',
+ "layer-raster3d-add" : 'bricks.png',
+ "layer-shaded-relief-add" : 'picture_empty.png',
+ "layer-aspect-arrow-add" : 'arrow_inout.png',
+ "layer-cell-cats-add" : 'color_swatch.png',
+ "layer-vector-add" : 'map_add.png',
+ "layer-vector-more" : 'thematic.png',
+ "layer-command-add" : 'cog_add.png',
+ "layer-group-add" : 'folder_add.png',
+ "layer-more" : 'images.png',
+ "layer-grid-add" : 'application_view_icons.png',
+ "layer-label-add" : 'tag_blue_add.png',
+ "layer-remove" : 'bin_closed.png',
+ "table" : 'application_view_columns.png',
+ "edit" : wx.ART_ERROR,
+ "layer-rgb-add" : 'rgb.png',
+ "layer-his-add" : 'his.png',
+ "layer-vector-thematic-add": 'thematic.png',
+ "layer-vector-chart-add" : 'chart_bar.png',
+ "options" : 'map_edit.png',
+ "modeler-main" : wx.ART_ERROR,
+ # layer-raster-profile analysis
+ "layer-raster-profile" : 'image_edit.png',
+ "layer-raster-show" : 'arrow_refresh.png',
+ "layer-raster-profileopt" : 'color_swatch.png',
# georectify
- "grGcpSet" : 'bullet_add.png',
- 'grGcpClear' : 'cross.png',
- 'grGeorect' : 'application_lightning.png',
- 'grGcpRms' : 'error.png',
- "grGcpSave" : 'picture_save.png',
- "grGcpAdd" : 'bullet_add.png',
- "grGcpDelete" : 'bullet_delete.png',
- "grGcpReload" : 'arrow_refresh.png',
- # modeler
- "modelActionAdd" : wx.ART_ERROR,
- "modelDataAdd" : wx.ART_ERROR,
- "modelRelation" : wx.ART_ERROR,
- "modelRun" : wx.ART_ERROR,
- "modelValidate" : wx.ART_ERROR,
- "imageSave" : wx.ART_ERROR,
- "pythonSave" : wx.ART_ERROR,
- "modelProperties" : wx.ART_ERROR,
- "modelVariables" : wx.ART_ERROR,
+ "gcp-create" : 'bullet_add.png',
+ 'gcp-remove' : 'cross.png',
+ 'georectify' : 'application_lightning.png',
+ 'gcp-rms' : 'error.png',
+ "gcp-save" : 'picture_save.png',
+ "gcp-add" : 'bullet_add.png',
+ "gcp-delete" : 'bullet_delete.png',
+ "reload" : 'arrow_refresh.png',
+ # modeler-main
+ "module-add" : wx.ART_ERROR,
+ "data-add" : wx.ART_ERROR,
+ "relation-create" : wx.ART_ERROR,
+ "execute" : wx.ART_ERROR,
+ "check" : wx.ART_ERROR,
+ "image-export" : wx.ART_ERROR,
+ "python-export" : wx.ART_ERROR,
+ "options" : wx.ART_ERROR,
+ "modeler-variables" : wx.ART_ERROR,
# 3d view
- "nvizView" : wx.ART_ERROR,
- "nvizSurface" : wx.ART_ERROR,
- "nvizVector" : wx.ART_ERROR,
- "nvizVolume" : wx.ART_ERROR,
- "nvizLight" : wx.ART_ERROR,
- "nvizFringe" : wx.ART_ERROR,
+ "3d-view" : wx.ART_ERROR,
+ "3d-raster" : wx.ART_ERROR,
+ "3d-vector" : wx.ART_ERROR,
+ "3d-volume" : wx.ART_ERROR,
+ "3d-light" : wx.ART_ERROR,
+ "3d-fringe" : wx.ART_ERROR,
# various
"settings" : 'color_swatch.png',
"redraw" : 'arrow_refresh.png',
"help" : wx.ART_ERROR,
- "psScript" : wx.ART_ERROR,
- "psExport" : wx.ART_ERROR,
+ "ps-script" : wx.ART_ERROR,
+ "ps-export" : wx.ART_ERROR,
}
Modified: grass/branches/develbranch_6/gui/wxpython/wxgui.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/wxgui.py 2011-02-28 21:45:31 UTC (rev 45492)
+++ grass/branches/develbranch_6/gui/wxpython/wxgui.py 2011-02-28 21:50:21 UTC (rev 45493)
@@ -563,8 +563,8 @@
if key is None:
menu.AppendSeparator()
continue
- item = wx.MenuItem(menu, wx.ID_ANY, Icons[key].GetLabel())
- item.SetBitmap(Icons[key].GetBitmap(self.iconsize))
+ item = wx.MenuItem(menu, wx.ID_ANY, Icons['layerManager'][key].GetLabel())
+ item.SetBitmap(Icons['layerManager'][key].GetBitmap(self.iconsize))
menu.AppendItem(item)
self.Bind(wx.EVT_MENU, handler, item)
@@ -1244,15 +1244,15 @@
if not self.curr_page:
self.NewDisplay(show = True)
- self._popupMenu((('addrast3d', self.OnAddRaster3D),
+ self._popupMenu((('addRast3d', self.OnAddRaster3D),
(None, None),
- ('addrgb', self.OnAddRasterRGB),
- ('addhis', self.OnAddRasterHIS),
+ ('addRgb', self.OnAddRasterRGB),
+ ('addHis', self.OnAddRasterHIS),
(None, None),
- ('addshaded', self.OnAddRasterShaded),
+ ('addShaded', self.OnAddRasterShaded),
(None, None),
- ('addrarrow', self.OnAddRasterArrow),
- ('addrnum', self.OnAddRasterNum)))
+ ('addRArrow', self.OnAddRasterArrow),
+ ('addRNum', self.OnAddRasterNum)))
# show map display
self.curr_page.maptree.mapdisplay.Show()
@@ -1272,8 +1272,8 @@
if not self.curr_page:
self.NewDisplay(show = True)
- self._popupMenu((('addthematic', self.OnAddVectorTheme),
- ('addchart', self.OnAddVectorChart)))
+ self._popupMenu((('addThematic', self.OnAddVectorTheme),
+ ('addChart', self.OnAddVectorChart)))
# show map display
self.curr_page.maptree.mapdisplay.Show()
@@ -1294,12 +1294,12 @@
if not self.curr_page:
self.NewDisplay(show = True)
- self._popupMenu((('addgrid', self.OnAddGrid),
- ('addlabels', self.OnAddLabels),
- ('addgeodesic', self.OnAddGeodesic),
- ('addrhumb', self.OnAddRhumb),
+ self._popupMenu((('addGrid', self.OnAddGrid),
+ ('addLabels', self.OnAddLabels),
+ ('addGeodesic', self.OnAddGeodesic),
+ ('addRhumb', self.OnAddRhumb),
(None, None),
- ('addcmd', self.OnAddCommand)))
+ ('addCmd', self.OnAddCommand)))
# show map display
self.curr_page.maptree.mapdisplay.Show()
More information about the grass-commit
mailing list