|
@@ -21,6 +21,8 @@ for details.
|
|
|
import os
|
|
|
import sys
|
|
|
|
|
|
+import wxversion
|
|
|
+wxversion.select('2.8')
|
|
|
import wx
|
|
|
|
|
|
gmPath = os.path.join(os.getenv("GISBASE"), "etc", "wxpython", "gui_modules")
|
|
@@ -29,143 +31,55 @@ sys.path.append(gmPath)
|
|
|
import globalvar
|
|
|
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
|
|
|
+
|
|
|
iconTheme = UserSettings.Get(group='advanced', key='iconTheme', subkey='type')
|
|
|
-if iconTheme and iconTheme == 'silk':
|
|
|
- iconpath = os.path.join(globalvar.ETCDIR, "gui", "icons", "silk")
|
|
|
+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
|
|
|
else:
|
|
|
- iconpath = None
|
|
|
-
|
|
|
-iconpath_default = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass")
|
|
|
-iconpath_vdigit = os.path.join(globalvar.ETCDIR, "gui", "icons", "grass", "vdigit")
|
|
|
-
|
|
|
-icons_default = {
|
|
|
- # map display
|
|
|
- "displaymap" : 'gui-display.gif',
|
|
|
- "rendermap" : 'gui-redraw.gif',
|
|
|
- "erase" : 'gui-erase.gif',
|
|
|
- "pointer" : 'gui-pointer.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',
|
|
|
- "savefile" : 'file-save.gif',
|
|
|
- "printmap" : 'file-print.gif',
|
|
|
- "overlay" : 'gui-overlay.gif',
|
|
|
- # digit
|
|
|
- ## add feature
|
|
|
- "digAddPoint": 'new.point.gif',
|
|
|
- "digAddLine" : 'new.line.gif',
|
|
|
- "digAddBoundary": 'new.boundary.gif',
|
|
|
- "digAddCentroid": 'new.centroid.gif',
|
|
|
- ## vertex
|
|
|
- "digAddVertex" : 'add.vertex.gif',
|
|
|
- "digMoveVertex" : 'move.vertex.gif',
|
|
|
- "digRemoveVertex" : 'rm.vertex.gif',
|
|
|
- "digSplitLine" : 'split.line.gif',
|
|
|
- ## edit feature
|
|
|
- "digEditLine" : 'edit.line.gif',
|
|
|
- "digMoveLine" : 'move.line.gif',
|
|
|
- "digDeleteLine" : 'delete.line.gif',
|
|
|
- ## cats
|
|
|
- "digCopyCats" : 'copy.cats.gif',
|
|
|
- "digDispCats" : 'display.cats.gif',
|
|
|
- ## attributes
|
|
|
- "digDispAttr" : 'display.attributes.gif',
|
|
|
- ## general
|
|
|
- "digUndo" : wx.ART_ERROR, # FIXME
|
|
|
- "digSettings" : 'settings.gif',
|
|
|
- "digAdditionalTools" : wx.ART_ERROR, # FIXME
|
|
|
- # layer manager
|
|
|
- "newdisplay" : 'gui-startmon.gif',
|
|
|
- "workspaceNew" : 'file-new.gif',
|
|
|
- "workspaceLoad" : 'file-new.gif', # change the icon if possible
|
|
|
- "workspaceOpen" : 'file-open.gif',
|
|
|
- "workspaceSave" : 'file-save.gif',
|
|
|
- "addrast" : 'element-cell.gif',
|
|
|
- "addrast3d" : 'element-grid3.gif',
|
|
|
- "addvect" : 'element-vector.gif',
|
|
|
- "addcmd" : 'gui-cmd.gif',
|
|
|
- "addgrp" : 'gui-group.gif',
|
|
|
- "addovl" : 'module-d.grid.gif',
|
|
|
- "delcmd" : 'edit-cut.gif',
|
|
|
- "attrtable" : 'db-values.gif',
|
|
|
- "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',
|
|
|
- "quit" : 'gui-exit.gif',
|
|
|
- # analyze raster
|
|
|
- "analyze" : 'gui-rastanalyze.gif',
|
|
|
- "measure" : 'gui-measure.gif',
|
|
|
- "font" : 'gui-font.gif',
|
|
|
- "histogram" : 'module-d.histogram.gif',
|
|
|
- "color" : 'edit-color.gif',
|
|
|
- "layeropts" : 'gui-layeroptions.gif',
|
|
|
- # profile
|
|
|
- "profile" : 'gui-profile.gif',
|
|
|
- "transect" : 'gui-profiledefine.gif',
|
|
|
- # "profiledraw": 'gui-profiledraw.gif',
|
|
|
- "profiledraw" : 'gui-redraw.gif',
|
|
|
- "profileopt" : 'gui-profileopt.gif',
|
|
|
- # georectify
|
|
|
- 'grGcpClear' : 'gui-gcperase.gif',
|
|
|
- 'grGcpSet' : 'gui-gcpset.gif',
|
|
|
- 'grGeorect' : 'gui-georect.gif',
|
|
|
- 'grGcpRms' : 'gui-rms.gif',
|
|
|
- 'grGcpRefresh' : 'gui-display.gif',
|
|
|
- "grGcpSave" : 'file-save.gif',
|
|
|
- "grGcpAdd" : wx.ART_NEW, # FIXME
|
|
|
- "grGcpDelete" : wx.ART_DELETE, # FIXME
|
|
|
- "grGcpReload" : 'gui-redraw.gif',
|
|
|
- "grSettings" : 'edit-color.gif',
|
|
|
- # nviz
|
|
|
- "nvizSettings" : 'edit-color.gif',
|
|
|
- }
|
|
|
+ iconpath = iconpath_default
|
|
|
+ Icons = grass_icons.IconsGrass
|
|
|
|
|
|
# merge icons dictionaries, join paths
|
|
|
try:
|
|
|
if iconpath and not os.path.exists(iconpath):
|
|
|
raise OSError
|
|
|
- if iconpath is not None and iconpath.find('silk') > -1: # silk icon theme
|
|
|
- from silk import IconsSilk as icons_img
|
|
|
- # use default icons if needed
|
|
|
- for key, img in icons_default.iteritems():
|
|
|
- if not icons_img.has_key(key): # add key
|
|
|
- icons_img[key] = img
|
|
|
+
|
|
|
+ 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
|
|
|
+
|
|
|
+ if Icons[key] == img:
|
|
|
if key[0:3] == 'dig':
|
|
|
iconpath_tmp = iconpath_vdigit
|
|
|
else:
|
|
|
iconpath_tmp = iconpath_default
|
|
|
else:
|
|
|
iconpath_tmp = iconpath
|
|
|
-
|
|
|
- if icons_img[key]: # join paths
|
|
|
- if type (icons_img[key]) == type(''):
|
|
|
- icons_img[key] = os.path.join(iconpath_tmp, icons_img[key])
|
|
|
+
|
|
|
+ Icons[key] = os.path.join(iconpath_tmp, Icons[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)
|
|
|
+ else:
|
|
|
+ Icons[key] = os.path.join(iconpath_default, img)
|
|
|
except:
|
|
|
- print >> sys.stderr, _("Unable to load icon theme, using default icon theme...")
|
|
|
- iconpath = None
|
|
|
-
|
|
|
-if iconpath is None: # default icons
|
|
|
- icons_img = icons_default
|
|
|
- for key, img in icons_img.iteritems():
|
|
|
- if img and type (icons_img[key]) == type(''):
|
|
|
- if key[0:3] == 'dig':
|
|
|
- icons_img[key] = os.path.join(iconpath_vdigit, img)
|
|
|
- else:
|
|
|
- icons_img[key] = os.path.join(iconpath_default, img)
|
|
|
+ print >> sys.stderr, _("Unable to load icon theme...")
|
|
|
+ sys.exit(1)
|
|
|
|
|
|
class MetaIcon:
|
|
|
"""
|
|
@@ -192,7 +106,7 @@ class MetaIcon:
|
|
|
"""Debugging"""
|
|
|
return "label=%s, img=%s, type=%s" % (self.label, self.imagepath, self.type)
|
|
|
|
|
|
- def GetBitmap (self, size=None):
|
|
|
+ def GetBitmap(self, size=None):
|
|
|
"""Get bitmap"""
|
|
|
bmp = None
|
|
|
|
|
@@ -209,219 +123,222 @@ class MetaIcon:
|
|
|
|
|
|
return bmp
|
|
|
|
|
|
- def GetLabel (self):
|
|
|
+ def GetLabel(self):
|
|
|
return self.label
|
|
|
|
|
|
- def GetDesc (self):
|
|
|
+ def GetDesc(self):
|
|
|
return self.description
|
|
|
|
|
|
+ def GetImageName(self):
|
|
|
+ return os.path.basename(self.imagepath)
|
|
|
+
|
|
|
#
|
|
|
# create list of icon instances
|
|
|
#
|
|
|
Icons = {
|
|
|
# map display
|
|
|
- "displaymap" : MetaIcon (img=icons_img["displaymap"],
|
|
|
+ "displaymap" : MetaIcon (img=Icons["displaymap"],
|
|
|
label=_("Display map")),
|
|
|
- "rendermap" : MetaIcon (img=icons_img["rendermap"],
|
|
|
+ "rendermap" : MetaIcon (img=Icons["rendermap"],
|
|
|
label=_("Re-render map"),
|
|
|
desc=_("Force re-rendering of all layers")),
|
|
|
- "erase" : MetaIcon (img=icons_img["erase"],
|
|
|
+ "erase" : MetaIcon (img=Icons["erase"],
|
|
|
label=_("Erase display")),
|
|
|
- "pointer" : MetaIcon (img=icons_img["pointer"],
|
|
|
+ "pointer" : MetaIcon (img=Icons["pointer"],
|
|
|
label=_("Pointer")),
|
|
|
- "zoom_in" : MetaIcon (img=icons_img["zoom_in"],
|
|
|
+ "zoom_in" : MetaIcon (img=Icons["zoom_in"],
|
|
|
label=_("Zoom in"),
|
|
|
desc=_("Drag or click mouse to zoom")),
|
|
|
- "zoom_out" : MetaIcon (img=icons_img["zoom_out"],
|
|
|
+ "zoom_out" : MetaIcon (img=Icons["zoom_out"],
|
|
|
label=_("Zoom out"),
|
|
|
desc=_("Drag or click mouse to unzoom")),
|
|
|
- "pan" : MetaIcon (img=icons_img["pan"],
|
|
|
+ "pan" : MetaIcon (img=Icons["pan"],
|
|
|
label=_("Pan"),
|
|
|
desc=_("Drag with mouse to pan")),
|
|
|
- "query" : MetaIcon (img=icons_img["query"],
|
|
|
+ "query" : MetaIcon (img=Icons["query"],
|
|
|
label=_("Query raster/vector map(s)"),
|
|
|
desc=_("Query selected raster/vector map(s)")),
|
|
|
- "zoom_back" : MetaIcon (img=icons_img["zoom_back"],
|
|
|
+ "zoom_back" : MetaIcon (img=Icons["zoom_back"],
|
|
|
label=_("Return to previous zoom")),
|
|
|
- "zoommenu" : MetaIcon (img=icons_img["zoommenu"],
|
|
|
+ "zoommenu" : MetaIcon (img=Icons["zoommenu"],
|
|
|
label=_("Zoom options"),
|
|
|
desc=_("Display zoom management")),
|
|
|
- "overlay" : MetaIcon (img=icons_img["overlay"],
|
|
|
+ "overlay" : MetaIcon (img=Icons["overlay"],
|
|
|
label=_("Add overlay"),
|
|
|
desc=_("Add graphic overlays to map")),
|
|
|
- "addbarscale": MetaIcon (img=icons_img["addbarscale"],
|
|
|
+ "addbarscale": MetaIcon (img=Icons["addbarscale"],
|
|
|
label=_("Add scalebar and north arrow")),
|
|
|
- "addlegend" : MetaIcon (img=icons_img["addlegend"],
|
|
|
+ "addlegend" : MetaIcon (img=Icons["addlegend"],
|
|
|
label=_("Add legend")),
|
|
|
- "savefile" : MetaIcon (img=icons_img["savefile"],
|
|
|
+ "savefile" : MetaIcon (img=Icons["savefile"],
|
|
|
label=_("Save display to PNG file")),
|
|
|
- "printmap" : MetaIcon (img=icons_img["printmap"],
|
|
|
+ "printmap" : MetaIcon (img=Icons["printmap"],
|
|
|
label=_("Print display")),
|
|
|
# gis manager
|
|
|
- "newdisplay" : MetaIcon (img=icons_img["newdisplay"],
|
|
|
+ "newdisplay" : MetaIcon (img=Icons["newdisplay"],
|
|
|
label=_("Start new display")),
|
|
|
- "workspaceNew" : MetaIcon (img=icons_img["workspaceNew"],
|
|
|
+ "workspaceNew" : MetaIcon (img=Icons["workspaceNew"],
|
|
|
label=_("Create new workspace file")),
|
|
|
- "workspaceLoad" : MetaIcon (img=icons_img["workspaceLoad"],
|
|
|
+ "workspaceLoad" : MetaIcon (img=Icons["workspaceLoad"],
|
|
|
label=_("Load map layers into workspace")),
|
|
|
- "workspaceOpen" : MetaIcon (img=icons_img["workspaceOpen"],
|
|
|
+ "workspaceOpen" : MetaIcon (img=Icons["workspaceOpen"],
|
|
|
label=_("Open existing workspace file")),
|
|
|
- "workspaceSave" : MetaIcon (img=icons_img["workspaceSave"],
|
|
|
+ "workspaceSave" : MetaIcon (img=Icons["workspaceSave"],
|
|
|
label=_("Save current workspace to file")),
|
|
|
# TODO: "layer" is not conformant with GRASS vocabulary (vector layer: 1..x) !
|
|
|
- "addrast" : MetaIcon (img=icons_img["addrast"],
|
|
|
+ "addrast" : MetaIcon (img=Icons["addrast"],
|
|
|
label=_("Add raster map layer")),
|
|
|
- "addvect" : MetaIcon (img=icons_img["addvect"],
|
|
|
+ "addvect" : MetaIcon (img=Icons["addvect"],
|
|
|
label=_("Add vector map layer")),
|
|
|
- "addcmd" : MetaIcon (img=icons_img["addcmd"],
|
|
|
+ "addcmd" : MetaIcon (img=Icons["addcmd"],
|
|
|
label=_("Add command layer")),
|
|
|
- "addgrp" : MetaIcon (img=icons_img["addgrp"],
|
|
|
+ "addgrp" : MetaIcon (img=Icons["addgrp"],
|
|
|
label=_("Add layer group")),
|
|
|
- "addovl" : MetaIcon (img=icons_img["addovl"],
|
|
|
+ "addovl" : MetaIcon (img=Icons["addovl"],
|
|
|
label=_("Add grid or vector labels overlay")),
|
|
|
- "delcmd" : MetaIcon (img=icons_img["delcmd"],
|
|
|
+ "delcmd" : MetaIcon (img=Icons["delcmd"],
|
|
|
label=_("Delete selected layer")),
|
|
|
- "quit" : MetaIcon (img=icons_img["quit"],
|
|
|
+ "quit" : MetaIcon (img=Icons["quit"],
|
|
|
label=_("Quit")),
|
|
|
- "attrtable" : MetaIcon (img=icons_img["attrtable"],
|
|
|
+ "attrtable" : MetaIcon (img=Icons["attrtable"],
|
|
|
label=_("Show attribute table")),
|
|
|
- "addrgb" : MetaIcon (img=icons_img["addrgb"],
|
|
|
+ "addrgb" : MetaIcon (img=Icons["addrgb"],
|
|
|
label=_("Add RGB layer")),
|
|
|
- "addhis" : MetaIcon (img=icons_img["addhis"],
|
|
|
+ "addhis" : MetaIcon (img=Icons["addhis"],
|
|
|
label=_("Add HIS layer")),
|
|
|
- "addshaded" : MetaIcon (img=icons_img["addshaded"],
|
|
|
+ "addshaded" : MetaIcon (img=Icons["addshaded"],
|
|
|
label=_("Add shaded relief map layer")),
|
|
|
- "addrarrow" : MetaIcon (img=icons_img["addrarrow"],
|
|
|
+ "addrarrow" : MetaIcon (img=Icons["addrarrow"],
|
|
|
label=_("Add raster flow arrows")),
|
|
|
- "addrnum" : MetaIcon (img=icons_img["addrnum"],
|
|
|
+ "addrnum" : MetaIcon (img=Icons["addrnum"],
|
|
|
label=_("Add raster cell numbers")),
|
|
|
- "addthematic": MetaIcon (img=icons_img["addthematic"],
|
|
|
+ "addthematic": MetaIcon (img=Icons["addthematic"],
|
|
|
label=_("Add thematic layer")),
|
|
|
- "addchart" : MetaIcon (img=icons_img["addchart"],
|
|
|
+ "addchart" : MetaIcon (img=Icons["addchart"],
|
|
|
label=_("Add thematic chart layer")),
|
|
|
- "addgrid" : MetaIcon (img=icons_img["addgrid"],
|
|
|
+ "addgrid" : MetaIcon (img=Icons["addgrid"],
|
|
|
label=_("Add grid layer")),
|
|
|
- "addgeodesic": MetaIcon (img=icons_img["addgeodesic"],
|
|
|
+ "addgeodesic": MetaIcon (img=Icons["addgeodesic"],
|
|
|
label=_("Add geodesic line layer")),
|
|
|
- "addrhumb" : MetaIcon (img=icons_img["addrhumb"],
|
|
|
+ "addrhumb" : MetaIcon (img=Icons["addrhumb"],
|
|
|
label=_("Add rhumbline layer")),
|
|
|
- "addlabels" : MetaIcon (img=icons_img["addlabels"],
|
|
|
+ "addlabels" : MetaIcon (img=Icons["addlabels"],
|
|
|
label=_("Add labels")),
|
|
|
- "addtext" : MetaIcon (img=icons_img["addtext"],
|
|
|
+ "addtext" : MetaIcon (img=Icons["addtext"],
|
|
|
label=_("Add text layer")),
|
|
|
- "addrast3d" : MetaIcon (img=icons_img["addrast3d"],
|
|
|
+ "addrast3d" : MetaIcon (img=Icons["addrast3d"],
|
|
|
label=_("Add 3D raster map")),
|
|
|
# digit
|
|
|
- "digAddPoint": MetaIcon (img=icons_img["digAddPoint"],
|
|
|
+ "digAddPoint": MetaIcon (img=Icons["digAddPoint"],
|
|
|
label=_("Digitize new point"),
|
|
|
desc=_("Left: new point")),
|
|
|
- "digAddLine" : MetaIcon (img=icons_img["digAddLine"],
|
|
|
+ "digAddLine" : MetaIcon (img=Icons["digAddLine"],
|
|
|
label=_("Digitize new line"),
|
|
|
desc=_("Left: new point; Middle: undo last point; Right: close line")),
|
|
|
- "digAddBoundary": MetaIcon (img=icons_img["digAddBoundary"],
|
|
|
+ "digAddBoundary": MetaIcon (img=Icons["digAddBoundary"],
|
|
|
label=_("Digitize new boundary"),
|
|
|
desc=_("Left: new point; Middle: undo last point; Right: close line")),
|
|
|
- "digAddCentroid": MetaIcon (img=icons_img["digAddCentroid"],
|
|
|
+ "digAddCentroid": MetaIcon (img=Icons["digAddCentroid"],
|
|
|
label=_("Digitize new centroid"),
|
|
|
desc=_("Left: new point")),
|
|
|
- "digAddVertex": MetaIcon (img=icons_img["digAddVertex"],
|
|
|
+ "digAddVertex": MetaIcon (img=Icons["digAddVertex"],
|
|
|
label=_("Add new vertex"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digCopyCats": MetaIcon (img=icons_img["digCopyCats"],
|
|
|
+ "digCopyCats": MetaIcon (img=Icons["digCopyCats"],
|
|
|
label=_("Copy categories"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digDeleteLine": MetaIcon (img=icons_img["digDeleteLine"],
|
|
|
+ "digDeleteLine": MetaIcon (img=Icons["digDeleteLine"],
|
|
|
label=_("Delete feature(s)"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digDispAttr": MetaIcon (img=icons_img["digDispAttr"],
|
|
|
+ "digDispAttr": MetaIcon (img=Icons["digDispAttr"],
|
|
|
label=_("Display/update attributes"),
|
|
|
desc=_("Left: Select")),
|
|
|
- "digDispCats": MetaIcon (img=icons_img["digDispCats"],
|
|
|
+ "digDispCats": MetaIcon (img=Icons["digDispCats"],
|
|
|
label=_("Display/update categories"),
|
|
|
desc=_("Left: Select")),
|
|
|
- "digEditLine": MetaIcon (img=icons_img["digEditLine"],
|
|
|
+ "digEditLine": MetaIcon (img=Icons["digEditLine"],
|
|
|
label=_("Edit line/boundary"),
|
|
|
desc=_("Left: new point; Middle: undo last point; Right: close line")),
|
|
|
- "digMoveLine": MetaIcon (img=icons_img["digMoveLine"],
|
|
|
+ "digMoveLine": MetaIcon (img=Icons["digMoveLine"],
|
|
|
label=_("Move feature(s)"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digMoveVertex": MetaIcon (img=icons_img["digMoveVertex"],
|
|
|
+ "digMoveVertex": MetaIcon (img=Icons["digMoveVertex"],
|
|
|
label=_("Move vertex"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digRemoveVertex": MetaIcon (img=icons_img["digRemoveVertex"],
|
|
|
+ "digRemoveVertex": MetaIcon (img=Icons["digRemoveVertex"],
|
|
|
label=_("Remove vertex"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digSettings": MetaIcon (img=icons_img["digSettings"],
|
|
|
+ "digSettings": MetaIcon (img=Icons["digSettings"],
|
|
|
label=_("Settings"),
|
|
|
desc=_("Settings dialog for digitization tool")),
|
|
|
- "digSplitLine": MetaIcon (img=icons_img["digSplitLine"],
|
|
|
+ "digSplitLine": MetaIcon (img=Icons["digSplitLine"],
|
|
|
label=_("Split line/boundary"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digExit" : MetaIcon (img=icons_img["quit"],
|
|
|
+ "digExit" : MetaIcon (img=Icons["quit"],
|
|
|
label=_("Quit digitizing tool")),
|
|
|
- "digAdditionalTools" : MetaIcon (img=icons_img["digAdditionalTools"],
|
|
|
+ "digAdditionalTools" : MetaIcon (img=Icons["digAdditionalTools"],
|
|
|
label=_("Additional tools " \
|
|
|
"(copy, flip, connect, etc.)"),
|
|
|
desc=_("Left: Select; Middle: Unselect; Right: Confirm")),
|
|
|
- "digUndo" : MetaIcon (img=icons_img["digUndo"],
|
|
|
+ "digUndo" : MetaIcon (img=Icons["digUndo"],
|
|
|
label=_("Undo"),
|
|
|
desc=_("Undo previous changes")),
|
|
|
# analyze raster
|
|
|
- "analyze" : MetaIcon (img=icons_img["analyze"],
|
|
|
+ "analyze" : MetaIcon (img=Icons["analyze"],
|
|
|
label=_("Analyze map")),
|
|
|
- "measure" : MetaIcon (img=icons_img["measure"],
|
|
|
+ "measure" : MetaIcon (img=Icons["measure"],
|
|
|
label=_("Measure distance")),
|
|
|
- "transect" : MetaIcon (img=icons_img["transect"],
|
|
|
+ "transect" : MetaIcon (img=Icons["transect"],
|
|
|
label=_("Draw transect in map display window to profile")),
|
|
|
- "profile" : MetaIcon (img=icons_img["profile"],
|
|
|
+ "profile" : MetaIcon (img=Icons["profile"],
|
|
|
label=_("Profile surface map")),
|
|
|
- "profiledraw": MetaIcon (img=icons_img["profiledraw"],
|
|
|
+ "profiledraw": MetaIcon (img=Icons["profiledraw"],
|
|
|
label=_("Draw/re-draw profile")),
|
|
|
- "profileopt" : MetaIcon (img=icons_img["profileopt"],
|
|
|
+ "profileopt" : MetaIcon (img=Icons["profileopt"],
|
|
|
label=_("Profile options")),
|
|
|
- "histogram" : MetaIcon (img=icons_img["histogram"],
|
|
|
+ "histogram" : MetaIcon (img=Icons["histogram"],
|
|
|
label=_("Create histogram of image or raster file")),
|
|
|
- "font" : MetaIcon (img=icons_img["font"],
|
|
|
+ "font" : MetaIcon (img=Icons["font"],
|
|
|
label=_("Select font")),
|
|
|
- "color" : MetaIcon (img=icons_img["color"],
|
|
|
+ "color" : MetaIcon (img=Icons["color"],
|
|
|
label=_("Select color")),
|
|
|
- "layeropts" : MetaIcon (img=icons_img["layeropts"],
|
|
|
+ "layeropts" : MetaIcon (img=Icons["layeropts"],
|
|
|
label=_("Set options")),
|
|
|
- "analyze" : MetaIcon (img=icons_img["analyze"],
|
|
|
+ "analyze" : MetaIcon (img=Icons["analyze"],
|
|
|
label=_("Analyze")),
|
|
|
# georectify
|
|
|
- 'grGcpSet' : MetaIcon (img=icons_img["grGcpSet"],
|
|
|
+ 'grGcpSet' : MetaIcon (img=Icons["grGcpSet"],
|
|
|
label=_("Set GCP"),
|
|
|
desc=_("Define GCP (Ground Control Points)")),
|
|
|
- 'grGeorect' : MetaIcon (img=icons_img["grGeorect"],
|
|
|
+ 'grGeorect' : MetaIcon (img=Icons["grGeorect"],
|
|
|
label=_("Georectify")),
|
|
|
- 'grGcpRms' : MetaIcon (img=icons_img["grGcpRms"],
|
|
|
+ 'grGcpRms' : MetaIcon (img=Icons["grGcpRms"],
|
|
|
label=_("Recalculate RMS error")),
|
|
|
- 'grGcpRefresh' : MetaIcon (img=icons_img["grGcpRefresh"],
|
|
|
+ 'grGcpRefresh' : MetaIcon (img=Icons["grGcpRefresh"],
|
|
|
label=_("Redraw GCP markers in map displays")),
|
|
|
- 'grGcpSave' : MetaIcon (img=icons_img["grGcpSave"],
|
|
|
+ 'grGcpSave' : MetaIcon (img=Icons["grGcpSave"],
|
|
|
label=_("Save GCPs to POINTS file")),
|
|
|
- 'grGcpAdd' : MetaIcon (img=icons_img["grGcpAdd"],
|
|
|
+ 'grGcpAdd' : MetaIcon (img=Icons["grGcpAdd"],
|
|
|
label=_("Add new GCP")),
|
|
|
- 'grGcpDelete' : MetaIcon (img=icons_img["grGcpDelete"],
|
|
|
+ 'grGcpDelete' : MetaIcon (img=Icons["grGcpDelete"],
|
|
|
label=_("Delete selected GCP")),
|
|
|
- 'grGcpClear' : MetaIcon (img=icons_img["grGcpClear"],
|
|
|
+ 'grGcpClear' : MetaIcon (img=Icons["grGcpClear"],
|
|
|
label=_("Clear selected GCP")),
|
|
|
- 'grGcpReload' : MetaIcon (img=icons_img["grGcpReload"],
|
|
|
+ 'grGcpReload' : MetaIcon (img=Icons["grGcpReload"],
|
|
|
label=_("Reload GCPs from selected POINTS file")),
|
|
|
- 'grGcpQuit' : MetaIcon (img=icons_img["quit"],
|
|
|
+ 'grGcpQuit' : MetaIcon (img=Icons["quit"],
|
|
|
label=_("Quit georectification module")),
|
|
|
- "grSettings": MetaIcon (img=icons_img["grSettings"],
|
|
|
+ "grSettings": MetaIcon (img=Icons["grSettings"],
|
|
|
label=_("Settings"),
|
|
|
desc=_("Settings dialog for georectification tool")),
|
|
|
# nviz
|
|
|
- "nvizSettings": MetaIcon (img=icons_img["nvizSettings"],
|
|
|
+ "nvizSettings": MetaIcon (img=Icons["nvizSettings"],
|
|
|
label=_("Settings"),
|
|
|
desc=_("Show Nviz settings dialog")),
|
|
|
}
|
|
|
|
|
|
# testing ...
|
|
|
if __name__ == "__main__":
|
|
|
- for k,v in Icons.iteritems():
|
|
|
- print k, "/", v
|
|
|
+ for k, v in Icons.iteritems():
|
|
|
+ print v.GetImageName()
|
|
|
|