GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
icon.py
Go to the documentation of this file.
1 """!
2 @package icon
3 
4 @brief Icon themes
5 
6 @code
7 from icons import Icons as Icons
8 @endcode
9 
10 Classes:
11  - MetaIcon
12 
13 (C) 2007-2008, 2010-2011 by the GRASS Development Team
14 This program is free software under the GNU General Public
15 License (>=v2). Read the file COPYING that comes with GRASS
16 for details.
17 
18 @author Martin Landa <landa.martin gmail.com>
19 @author Anna Kratochvilova <anna.kratochvilova fsv.cvut.cz>
20 """
21 
22 import os
23 import sys
24 import types
25 
26 sys.path.append(os.path.join(os.getenv("GISBASE"), "etc", "wxpython", "gui_modules"))
27 
28 import wx
29 
30 from gui_modules.preferences import globalSettings as UserSettings
31 
32 import grass2_icons # default icon set
33 iconPathDefault = grass2_icons.iconPath
34 iconSetDefault = grass2_icons.iconSet
35 
36 iconTheme = UserSettings.Get(group = 'appearance', key = 'iconTheme', subkey = 'type')
37 if iconTheme == 'silk':
38  import silk_icons
39  iconPath = silk_icons.iconPath
40  iconSet = silk_icons.iconSet
41 elif iconTheme == 'grass':
42  import grass_icons
43  iconPath = grass_icons.iconPath
44  iconPathVDigit = grass_icons.iconPathVDigit
45  iconSet = grass_icons.iconSet
46 else:
47  iconPath = iconPathDefault
48  iconSet = iconSetDefault
49 
50 # merge icons dictionaries, join paths
51 try:
52  if iconPath and not os.path.exists(iconPath):
53  raise OSError
54 
55  if iconTheme != 'grass':
56  # use default icons if no icon is available
57  for key, img in iconSet.iteritems():
58  if key not in iconSet or \
59  iconSet[key] is None: # add key
60  iconSet[key] = img
61 
62  iconSet[key] = os.path.join(iconPath, iconSet[key])
63  else:
64  for key, img in iconSet.iteritems():
65  if img and type(iconSet[key]) == types.StringType:
66  if key in ("point-create",
67  "line-create",
68  "boundary-create",
69  "centroid-create",
70  "polygon-create",
71  "vertex-create",
72  "vertex-move",
73  "vertex-delete",
74  "line-split",
75  "line-edit",
76  "line-move",
77  "line-delete",
78  "cats-copy",
79  "cats-display",
80  "attributes-display",
81  "undo",
82  "tools"):
83  iconSet[key] = os.path.join(iconPathVDigit, img)
84  else:
85  iconSet[key] = os.path.join(iconPath, img)
86 except StandardError, e:
87  sys.exit(_("Unable to load icon theme. Reason: %s") % e)
88 
89 class MetaIcon:
90  """!Handle icon metadata (image path, tooltip, ...)
91  """
92  def __init__(self, img, label, desc = None):
93  self.imagepath = img
94  if not self.imagepath:
95  self.type = 'unknown'
96  else:
97  if self.imagepath.find ('wxART_') > -1:
98  self.type = 'wx'
99  else:
100  self.type = 'img'
101 
102  self.label = label
103 
104  if desc:
105  self.description = desc
106  else:
107  self.description = ''
108 
109  def __str__(self):
110  """!Debugging"""
111  return "label=%s, img=%s, type=%s" % (self.label, self.imagepath, self.type)
112 
113  def GetBitmap(self, size = None):
114  """!Get bitmap"""
115  bmp = None
116 
117  if self.type == 'wx':
118  bmp = wx.ArtProvider.GetBitmap(id = self.imagepath, client = wx.ART_TOOLBAR, size = size)
119  elif self.type == 'img':
120  if os.path.isfile(self.imagepath) and os.path.getsize(self.imagepath):
121  if size and len(size) == 2:
122  image = wx.Image(name = self.imagepath)
123  image.Rescale(size[0], size[1])
124  bmp = image.ConvertToBitmap()
125  elif self.imagepath:
126  bmp = wx.Bitmap(name = self.imagepath)
127 
128  return bmp
129 
130  def GetLabel(self):
131  return self.label
132 
133  def GetDesc(self):
134  return self.description
135 
136  def GetImageName(self):
137  return os.path.basename(self.imagepath)
138 
139 #
140 # create list of icon instances
141 #
142 Icons = {
143  'displayWindow' : {
144  'display' : MetaIcon(img = iconSet.get('show', wx.ART_ERROR),
145  label = _('Display map'),
146  desc = _('Re-render modified map layers only')),
147  'render' : MetaIcon(img = iconSet.get('layer-redraw', wx.ART_ERROR),
148  label = _('Render map'),
149  desc = _('Force re-rendering all map layers')),
150  'erase' : MetaIcon(img = iconSet.get('erase', wx.ART_ERROR),
151  label = _('Erase display'),
152  desc = _('Erase display canvas with given background color')),
153  'pointer' : MetaIcon(img = iconSet.get('pointer', wx.ART_ERROR),
154  label = _('Pointer')),
155  'zoomIn' : MetaIcon(img = iconSet.get('zoom-in', wx.ART_ERROR),
156  label = _('Zoom in'),
157  desc = _('Drag or click mouse to zoom')),
158  'zoomOut' : MetaIcon(img = iconSet.get('zoom-out', wx.ART_ERROR),
159  label = _('Zoom out'),
160  desc = _('Drag or click mouse to unzoom')),
161  'pan' : MetaIcon(img = iconSet.get('pan', wx.ART_ERROR),
162  label = _('Pan'),
163  desc = _('Drag with mouse to pan')),
164  'query' : MetaIcon(img = iconSet.get('info', wx.ART_ERROR),
165  label = _('Query raster/vector map(s)'),
166  desc = _('Query selected raster/vector map(s)')),
167  'zoomBack' : MetaIcon(img = iconSet.get('zoom-last', wx.ART_ERROR),
168  label = _('Return to previous zoom')),
169  'zoomMenu' : MetaIcon(img = iconSet.get('zoom-more', wx.ART_ERROR),
170  label = _('Various zoom options'),
171  desc = _('Zoom to computational, default, saved region, ...')),
172  'zoomExtent' : MetaIcon(img = iconSet.get('zoom-extent', wx.ART_ERROR),
173  label = _('Zoom to selected map layer(s)')),
174  'overlay' : MetaIcon(img = iconSet.get('overlay-add', wx.ART_ERROR),
175  label = _('Add map elements'),
176  desc = _('Overlay elements like scale and legend onto map')),
177  'addBarscale': MetaIcon(img = iconSet.get('scalebar-add', wx.ART_ERROR),
178  label = _('Add scalebar and north arrow')),
179  'addLegend' : MetaIcon(img = iconSet.get('legend-add', wx.ART_ERROR),
180  label = _('Add legend')),
181  'saveFile' : MetaIcon(img = iconSet.get('map-export', wx.ART_ERROR),
182  label = _('Save display to graphic file')),
183  'print' : MetaIcon(img = iconSet.get('print', wx.ART_ERROR),
184  label = _('Print display')),
185  'analyze' : MetaIcon(img = iconSet.get('layer-raster-analyze', wx.ART_ERROR),
186  label = _('Analyze map'),
187  desc = _('Measuring, profiling, histogramming, ...')),
188  'measure' : MetaIcon(img = iconSet.get('measure-length', wx.ART_ERROR),
189  label = _('Measure distance')),
190  'profile' : MetaIcon(img = iconSet.get('layer-raster-profile', wx.ART_ERROR),
191  label = _('Profile surface map')),
192  'addText' : MetaIcon(img = iconSet.get('text-add', wx.ART_ERROR),
193  label = _('Add text layer')),
194  'histogram' : MetaIcon(img = iconSet.get('layer-raster-histogram', wx.ART_ERROR),
195  label = _('Create histogram of raster map')),
196  },
197  'layerManager' : {
198  'newdisplay' : MetaIcon(img = iconSet.get('monitor-create', wx.ART_ERROR),
199  label = _('Start new map display')),
200  'workspaceNew' : MetaIcon(img = iconSet.get('create', wx.ART_ERROR),
201  label = _('Create new workspace (Ctrl+N)')),
202  'workspaceOpen' : MetaIcon(img = iconSet.get('open', wx.ART_ERROR),
203  label = _('Open existing workspace file (Ctrl+O)')),
204  'workspaceSave' : MetaIcon(img = iconSet.get('save', wx.ART_ERROR),
205  label = _('Save current workspace to file (Ctrl+S)')),
206  'addMulti' : MetaIcon(img = iconSet.get('layer-open', wx.ART_ERROR),
207  label = _('Add multiple raster or vector map layers (Ctrl+Shift+L)')),
208  'import' : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
209  label = _('Import/link raster or vector data')),
210  'rastImport' : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
211  label = _('Import raster data')),
212  'rastLink' : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
213  label = _('Link external raster data')),
214  'vectImport' : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
215  label = _('Import vector data')),
216  'vectLink' : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
217  label = _('Link external vector data')),
218  'addRast' : MetaIcon(img = iconSet.get('layer-raster-add', wx.ART_ERROR),
219  label = _('Add raster map layer (Ctrl+Shift+R)')),
220  'rastMisc' : MetaIcon(img = iconSet.get('layer-raster-more', wx.ART_ERROR),
221  label = _('Add various raster map layers (RGB, HIS, shaded relief...)')),
222  'addVect' : MetaIcon(img = iconSet.get('layer-vector-add', wx.ART_ERROR),
223  label = _('Add vector map layer (Ctrl+Shift+V)')),
224  'vectMisc' : MetaIcon(img = iconSet.get('layer-vector-more', wx.ART_ERROR),
225  label = _('Add various vector map layers (thematic, chart...)')),
226  'addCmd' : MetaIcon(img = iconSet.get('layer-command-add', wx.ART_ERROR),
227  label = _('Add command layer')),
228  'addGroup' : MetaIcon(img = iconSet.get('layer-group-add', wx.ART_ERROR),
229  label = _('Add group')),
230  'addOverlay' : MetaIcon(img = iconSet.get('layer-more', wx.ART_ERROR),
231  label = _('Add grid or vector labels overlay')),
232  'delCmd' : MetaIcon(img = iconSet.get('layer-remove', wx.ART_ERROR),
233  label = _('Delete selected map layer')),
234  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
235  label = _('Quit')),
236  'attrTable' : MetaIcon(img = iconSet.get('table', wx.ART_ERROR),
237  label = _('Show attribute table')),
238  'vdigit' : MetaIcon(img = iconSet.get('edit', wx.ART_ERROR),
239  label = _('Edit vector maps')),
240  'addRgb' : MetaIcon(img = iconSet.get('layer-rgb-add', wx.ART_ERROR),
241  label = _('Add RGB map layer')),
242  'addHis' : MetaIcon(img = iconSet.get('layer-his-add', wx.ART_ERROR),
243  label = _('Add HIS map layer')),
244  'addShaded' : MetaIcon(img = iconSet.get('layer-shaded-relief-add', wx.ART_ERROR),
245  label = _('Add shaded relief map layer')),
246  'addRArrow' : MetaIcon(img = iconSet.get('layer-aspect-arrow-add', wx.ART_ERROR),
247  label = _('Add raster flow arrows')),
248  'addRNum' : MetaIcon(img = iconSet.get('layer-cell-cats-add', wx.ART_ERROR),
249  label = _('Add raster cell numbers')),
250  'addThematic': MetaIcon(img = iconSet.get('layer-vector-thematic-add', wx.ART_ERROR),
251  label = _('Add thematic area (choropleth) map layer')),
252  'addChart' : MetaIcon(img = iconSet.get('layer-vector-chart-add', wx.ART_ERROR),
253  label = _('Add thematic chart layer')),
254  'addGrid' : MetaIcon(img = iconSet.get('layer-grid-add', wx.ART_ERROR),
255  label = _('Add grid layer')),
256  'addGeodesic': MetaIcon(img = iconSet.get('shortest-distance', wx.ART_ERROR),
257  label = _('Add geodesic line layer')),
258  'addRhumb' : MetaIcon(img = iconSet.get('shortest-distance', wx.ART_ERROR),
259  label = _('Add rhumbline layer')),
260  'addLabels' : MetaIcon(img = iconSet.get('layer-label-add', wx.ART_ERROR),
261  label = _('Add labels')),
262  'addRast3d' : MetaIcon(img = iconSet.get('layer-raster3d-add', wx.ART_ERROR),
263  label = _('Add 3D raster map layer'),
264  desc = _('Note that 3D raster data are rendered only in 3D view mode')),
265  'settings' : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
266  label = _('Show GUI settings')),
267  'modeler' : MetaIcon(img = iconSet.get('modeler-main', wx.ART_ERROR),
268  label = _('Graphical Modeler')),
269  'layerOptions' : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
270  label = _('Set options')),
271  'mapOutput' : MetaIcon(img = iconSet.get('print-compose', wx.ART_ERROR),
272  label = _('Cartographic Composer')),
273  'mapcalc' : MetaIcon(img = iconSet.get('calculator', wx.ART_ERROR),
274  label = _('Raster Map Calculator')),
275  },
276  'vdigit' : {
277  'addPoint' : MetaIcon(img = iconSet.get('point-create', wx.ART_ERROR),
278  label = _('Digitize new point'),
279  desc = _('Left: new point')),
280  'addLine' : MetaIcon(img = iconSet.get('line-create', wx.ART_ERROR),
281  label = _('Digitize new line'),
282  desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
283  'addBoundary' : MetaIcon(img = iconSet.get('boundary-create', wx.ART_ERROR),
284  label = _('Digitize new boundary'),
285  desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
286  'addCentroid' : MetaIcon(img = iconSet.get('centroid-create', wx.ART_ERROR),
287  label = _('Digitize new centroid'),
288  desc = _('Left: new point')),
289  'addArea' : MetaIcon(img = iconSet.get('polygon-create', wx.ART_ERROR),
290  label = _('Digitize new area (composition of boundaries without category and one centroid with category)'),
291  desc = _('Left: new point')),
292  'addVertex' : MetaIcon(img = iconSet.get('vertex-create', wx.ART_ERROR),
293  label = _('Add new vertex'),
294  desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
295  'deleteLine' : MetaIcon(img = iconSet.get('line-delete', wx.ART_ERROR),
296  label = _('Delete feature(s)'),
297  desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
298  'displayAttr' : MetaIcon(img = iconSet.get('attributes-display', wx.ART_ERROR),
299  label = _('Display/update attributes'),
300  desc = _('Left: Select')),
301  'displayCats' : MetaIcon(img = iconSet.get('cats-display', wx.ART_ERROR),
302  label = _('Display/update categories'),
303  desc = _('Left: Select')),
304  'editLine' : MetaIcon(img = iconSet.get('line-edit', wx.ART_ERROR),
305  label = _('Edit line/boundary'),
306  desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
307  'moveLine' : MetaIcon(img = iconSet.get('line-move', wx.ART_ERROR),
308  label = _('Move feature(s)'),
309  desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
310  'moveVertex' : MetaIcon(img = iconSet.get('vertex-move', wx.ART_ERROR),
311  label = _('Move vertex'),
312  desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
313  'removeVertex' : MetaIcon(img = iconSet.get('vertex-delete', wx.ART_ERROR),
314  label = _('Remove vertex'),
315  desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
316  'settings' : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
317  label = _('Digitization settings')),
318  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
319  label = _('Quit digitizer'),
320  desc = _('Quit digitizer and save changes')),
321  'additionalTools' : MetaIcon(img = iconSet.get('tools', wx.ART_ERROR),
322  label = _('Additional tools ' \
323  '(copy, flip, connect, etc.)'),
324  desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
325  'undo' : MetaIcon(img = iconSet.get('undo', wx.ART_ERROR),
326  label = _('Undo'),
327  desc = _('Undo previous changes')),
328  },
329  'profile' : {
330  'draw' : MetaIcon(img = iconSet.get('show', wx.ART_ERROR),
331  label = _('Draw/re-draw profile')),
332  'transect' : MetaIcon(img = iconSet.get('layer-raster-profile', wx.ART_ERROR),
333  label = _('Draw transect in map display window to profile')),
334  'options' : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
335  label = _('Profile options')),
336  'save' : MetaIcon(img = iconSet.get('save', wx.ART_ERROR),
337  label = _('Save profile data to CSV file')),
338  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
339  label = _('Quit Profile Analysis Tool'))
340  },
341  'georectify' : {
342  'gcpSet' : MetaIcon(img = iconSet.get('gcp-create', wx.ART_ERROR),
343  label = _('Set GCP'),
344  desc = _('Define GCP (Ground Control Points)')),
345  'georectify': MetaIcon(img = iconSet.get('georectify', wx.ART_ERROR),
346  label = _('Georectify')),
347  'gcpRms' : MetaIcon(img = iconSet.get('gcp-rms', wx.ART_ERROR),
348  label = _('Recalculate RMS error')),
349  'gcpSave' : MetaIcon(img = iconSet.get('gcp-save', wx.ART_ERROR),
350  label = _('Save GCPs to POINTS file')),
351  'gcpAdd' : MetaIcon(img = iconSet.get('gcp-add', wx.ART_ERROR),
352  label = _('Add new GCP')),
353  'gcpDelete' : MetaIcon(img = iconSet.get('gcp-delete', wx.ART_ERROR),
354  label = _('Delete selected GCP')),
355  'gcpClear' : MetaIcon(img = iconSet.get('gcp-remove', wx.ART_ERROR),
356  label = _('Clear selected GCP')),
357  'gcpReload' : MetaIcon(img = iconSet.get('reload', wx.ART_ERROR),
358  label = _('Reload GCPs from POINTS file')),
359  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
360  label = _('Quit georectification')),
361  'settings' : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
362  label = _('Settings'),
363  desc = _('Settings dialog for georectification tool')),
364  },
365  'nviz' : {
366  'view' : MetaIcon(img = iconSet.get('3d-view', wx.ART_ERROR),
367  label = _('Switch to view control page'),
368  desc = _('Change view settings')),
369  'surface' : MetaIcon(img = iconSet.get('3d-raster', wx.ART_ERROR),
370  label = _('Switch to surface (raster) control page'),
371  desc = _('Change surface (loaded raster maps) settings')),
372  'vector' : MetaIcon(img = iconSet.get('3d-vector', wx.ART_ERROR),
373  label = _('Switch to vector (2D/3D) control page'),
374  desc = _('Change 2D/3D vector settings')),
375  'volume' : MetaIcon(img = iconSet.get('3d-volume', wx.ART_ERROR),
376  label = _('Switch to volume (3D raster) control page'),
377  desc = _('Change volume (loaded 3D raster maps) settings')),
378  'light' : MetaIcon(img = iconSet.get('3d-light', wx.ART_ERROR),
379  label = _('Switch to lighting control page'),
380  desc = _('Change lighting settings')),
381  'fringe' : MetaIcon(img = iconSet.get('3d-fringe', wx.ART_ERROR),
382  label = _('Switch to fringe control page'),
383  desc = _('Switch on/off fringes')),
384  'settings': MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
385  label = _('3D view mode tools'),
386  desc = _('Show/hide 3D view mode settings dialog')),
387  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
388  label = _('Quit 3D view mode'),
389  desc = _('Switch back to 2D view mode')),
390  },
391  'modeler' : {
392  'new' : MetaIcon(img = iconSet.get('create', wx.ART_ERROR),
393  label = _('Create new model (Ctrl+N)')),
394  'open' : MetaIcon(img = iconSet.get('open', wx.ART_ERROR),
395  label = _('Load model from file (Ctrl+O)')),
396  'save' : MetaIcon(img = iconSet.get('save', wx.ART_ERROR),
397  label = _('Save current model to file (Ctrl+S)')),
398  'toImage' : MetaIcon(img = iconSet.get('image-export', wx.ART_ERROR),
399  label = _('Export model to image')),
400  'toPython' : MetaIcon(img = iconSet.get('python-export', wx.ART_ERROR),
401  label = _('Export model to Python script')),
402  'actionAdd' : MetaIcon(img = iconSet.get('module-add', wx.ART_ERROR),
403  label = _('Add action (GRASS module) to model')),
404  'dataAdd' : MetaIcon(img = iconSet.get('data-add', wx.ART_ERROR),
405  label = _('Add data item to model')),
406  'relation' : MetaIcon(img = iconSet.get('relation-create', wx.ART_ERROR),
407  label = _('Define relation between data and action items')),
408  'run' : MetaIcon(img = iconSet.get('execute', wx.ART_ERROR),
409  label = _('Run model')),
410  'validate' : MetaIcon(img = iconSet.get('check', wx.ART_ERROR),
411  label = _('Validate model')),
412  'settings' : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
413  label = _('Show modeler settings')),
414  'properties' : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
415  label = _('Show model properties')),
416  'variables' : MetaIcon(img = iconSet.get('modeler-variables', wx.ART_ERROR),
417  label = _('Manage model variables')),
418  'redraw' : MetaIcon(img = iconSet.get('redraw', wx.ART_ERROR),
419  label = _('Redraw model canvas')),
420  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
421  label = _('Quit Graphical Modeler')),
422  },
423  'misc' : {
424  'font' : MetaIcon(img = iconSet.get('font', wx.ART_ERROR),
425  label = _('Select font')),
426  'help' : MetaIcon(img = iconSet.get('help', wx.ART_ERROR),
427  label = _('Show manual')),
428  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
429  label = _('Quit')),
430  },
431  'psMap' : {
432  'scriptSave' : MetaIcon(img = iconSet.get('script-save', wx.ART_ERROR),
433  label = _('Generate text file with mapping instructions')),
434  'scriptLoad' : MetaIcon(img = iconSet.get('script-load', wx.ART_ERROR),
435  label = _('Load text file with mapping instructions')),
436  'psExport' : MetaIcon(img = iconSet.get('ps-export', wx.ART_ERROR),
437  label = _('Generate PostScript output')),
438  'pdfExport' : MetaIcon(img = iconSet.get('pdf-export', wx.ART_ERROR),
439  label = _('Generate PDF output')),
440  'pageSetup' : MetaIcon(img = iconSet.get('page-settings', wx.ART_ERROR),
441  label = _('Page setup'),
442  desc = _('Specify paper size, margins and orientation')),
443  'fullExtent' : MetaIcon(img = iconSet.get('zoom-extent', wx.ART_ERROR),
444  label = _("Full extent"),
445  desc = _("Zoom to full extent")),
446  'addMap' : MetaIcon(img = iconSet.get('layer-add', wx.ART_ERROR),
447  label = _("Map frame"),
448  desc = _("Click and drag to place map frame")),
449  'addRast' : MetaIcon(img = iconSet.get('layer-raster-add', wx.ART_ERROR),
450  label = _("Raster map"),
451  desc = _("Add raster map")),
452  'addVect' : MetaIcon(img = iconSet.get('layer-vector-add', wx.ART_ERROR),
453  label = _("Vector map"),
454  desc = _("Add vector map")),
455  'deleteObj' : MetaIcon(img = iconSet.get('layer-remove', wx.ART_ERROR),
456  label = _("Delete selected object")),
457  'preview' : MetaIcon(img = iconSet.get('execute', wx.ART_ERROR),
458  label = _("Show preview")),
459  'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
460  label = _('Quit Cartographic Composer')),
461  'addText' : MetaIcon(img = iconSet.get('text-add', wx.ART_ERROR),
462  label = _('Add text')),
463  'addMapinfo' : MetaIcon(img = iconSet.get('map-info', wx.ART_ERROR),
464  label = _('Add map info')),
465  'addLegend' : MetaIcon(img = iconSet.get('legend-add', wx.ART_ERROR),
466  label = _('Add legend')),
467  'addScalebar' : MetaIcon(img = iconSet.get('scalebar-add', wx.ART_ERROR),
468  label = _('Add scale bar')),
469  }
470  }
471 
472 # testing ...
473 if __name__ == '__main__':
474  for k, v in iconSet.iteritems():
475  print v.GetImageName()