GRASS Programmer's Manual  6.4.2(2012)
icon.py
Go to the documentation of this file.
00001 """!
00002 @package icon
00003 
00004 @brief Icon themes
00005 
00006 @code
00007 from icons import Icons as Icons
00008 @endcode
00009 
00010 Classes:
00011  - MetaIcon
00012 
00013 (C) 2007-2008, 2010-2011 by the GRASS Development Team
00014 This program is free software under the GNU General Public
00015 License (>=v2). Read the file COPYING that comes with GRASS
00016 for details.
00017 
00018 @author Martin Landa <landa.martin gmail.com>
00019 @author Anna Kratochvilova <anna.kratochvilova fsv.cvut.cz>
00020 """
00021 
00022 import os
00023 import sys
00024 import types
00025 
00026 sys.path.append(os.path.join(os.getenv("GISBASE"), "etc", "wxpython", "gui_modules"))
00027 
00028 import wx
00029 
00030 from gui_modules.preferences import globalSettings as UserSettings
00031 
00032 import grass2_icons # default icon set
00033 iconPathDefault = grass2_icons.iconPath
00034 iconSetDefault  = grass2_icons.iconSet
00035 
00036 iconTheme = UserSettings.Get(group = 'appearance', key = 'iconTheme', subkey = 'type')
00037 if iconTheme == 'silk':
00038     import silk_icons
00039     iconPath = silk_icons.iconPath
00040     iconSet  = silk_icons.iconSet
00041 elif iconTheme == 'grass':
00042     import grass_icons
00043     iconPath = grass_icons.iconPath
00044     iconPathVDigit = grass_icons.iconPathVDigit
00045     iconSet  = grass_icons.iconSet
00046 else:
00047     iconPath = iconPathDefault
00048     iconSet  = iconSetDefault
00049 
00050 # merge icons dictionaries, join paths
00051 try:
00052     if iconPath and not os.path.exists(iconPath):
00053         raise OSError
00054     
00055     if iconTheme != 'grass':
00056         # use default icons if no icon is available
00057         for key, img in iconSet.iteritems():
00058             if key not in iconSet or \
00059                     iconSet[key] is None: # add key
00060                 iconSet[key] = img
00061             
00062             iconSet[key] = os.path.join(iconPath, iconSet[key])
00063     else:
00064         for key, img in iconSet.iteritems():
00065             if img and type(iconSet[key]) == types.StringType:
00066                 if key in ("point-create",
00067                            "line-create",
00068                            "boundary-create",
00069                            "centroid-create",
00070                            "polygon-create",
00071                            "vertex-create",
00072                            "vertex-move",
00073                            "vertex-delete",
00074                            "line-split",
00075                            "line-edit",
00076                            "line-move",
00077                            "line-delete",
00078                            "cats-copy",
00079                            "cats-display",
00080                            "attributes-display",
00081                            "undo",
00082                            "tools"):
00083                     iconSet[key] = os.path.join(iconPathVDigit, img)
00084                 else:
00085                     iconSet[key] = os.path.join(iconPath, img)
00086 except StandardError, e:
00087     sys.exit(_("Unable to load icon theme. Reason: %s") % e)
00088 
00089 class MetaIcon:
00090     """!Handle icon metadata (image path, tooltip, ...)
00091     """
00092     def __init__(self, img, label, desc = None):
00093         self.imagepath = img
00094         if not self.imagepath:
00095             self.type = 'unknown'
00096         else:
00097             if self.imagepath.find ('wxART_') > -1:
00098                 self.type = 'wx'
00099             else:
00100                 self.type = 'img'
00101         
00102         self.label = label
00103         
00104         if desc:
00105             self.description = desc
00106         else:
00107             self.description = ''
00108         
00109     def __str__(self):
00110         """!Debugging"""
00111         return "label=%s, img=%s, type=%s" % (self.label, self.imagepath, self.type)
00112 
00113     def GetBitmap(self, size = None):
00114         """!Get bitmap"""
00115         bmp = None
00116         
00117         if self.type == 'wx':
00118             bmp = wx.ArtProvider.GetBitmap(id = self.imagepath, client = wx.ART_TOOLBAR, size = size)
00119         elif self.type == 'img':
00120             if os.path.isfile(self.imagepath) and os.path.getsize(self.imagepath):
00121                 if size and len(size) == 2:
00122                     image = wx.Image(name = self.imagepath)
00123                     image.Rescale(size[0], size[1])
00124                     bmp = image.ConvertToBitmap()
00125                 elif self.imagepath:
00126                     bmp = wx.Bitmap(name = self.imagepath)
00127         
00128         return bmp
00129     
00130     def GetLabel(self):
00131         return self.label
00132     
00133     def GetDesc(self):
00134         return self.description
00135     
00136     def GetImageName(self):
00137         return os.path.basename(self.imagepath)
00138 
00139 #
00140 # create list of icon instances
00141 #
00142 Icons = {
00143     'displayWindow' : {
00144         'display'    : MetaIcon(img = iconSet.get('show', wx.ART_ERROR),
00145                                 label = _('Display map'),
00146                                 desc  =  _('Re-render modified map layers only')),
00147         'render'     : MetaIcon(img = iconSet.get('layer-redraw', wx.ART_ERROR),
00148                                 label = _('Render map'),
00149                                 desc = _('Force re-rendering all map layers')),
00150         'erase'      : MetaIcon(img = iconSet.get('erase', wx.ART_ERROR),
00151                                 label = _('Erase display'),
00152                                 desc = _('Erase display canvas with given background color')),
00153         'pointer'    : MetaIcon(img = iconSet.get('pointer', wx.ART_ERROR),
00154                                 label = _('Pointer')),
00155         'zoomIn'     : MetaIcon(img = iconSet.get('zoom-in', wx.ART_ERROR),
00156                                 label = _('Zoom in'),
00157                                 desc = _('Drag or click mouse to zoom')),
00158         'zoomOut'    : MetaIcon(img = iconSet.get('zoom-out', wx.ART_ERROR),
00159                                 label = _('Zoom out'),
00160                                 desc = _('Drag or click mouse to unzoom')),
00161         'pan'        : MetaIcon(img = iconSet.get('pan', wx.ART_ERROR),
00162                                 label = _('Pan'),
00163                                 desc = _('Drag with mouse to pan')),
00164         'query'      : MetaIcon(img = iconSet.get('info', wx.ART_ERROR),
00165                                 label = _('Query raster/vector map(s)'),
00166                                 desc = _('Query selected raster/vector map(s)')),
00167         'zoomBack'   : MetaIcon(img = iconSet.get('zoom-last', wx.ART_ERROR),
00168                                 label = _('Return to previous zoom')),
00169         'zoomMenu'   : MetaIcon(img = iconSet.get('zoom-more', wx.ART_ERROR),
00170                                 label = _('Various zoom options'),
00171                                 desc = _('Zoom to computational, default, saved region, ...')),
00172         'zoomExtent' : MetaIcon(img = iconSet.get('zoom-extent', wx.ART_ERROR),
00173                                 label = _('Zoom to selected map layer(s)')),
00174         'overlay'    : MetaIcon(img = iconSet.get('overlay-add', wx.ART_ERROR),
00175                                 label = _('Add map elements'),
00176                                 desc = _('Overlay elements like scale and legend onto map')),
00177         'addBarscale': MetaIcon(img = iconSet.get('scalebar-add', wx.ART_ERROR),
00178                                 label = _('Add scalebar and north arrow')),
00179         'addLegend'  : MetaIcon(img = iconSet.get('legend-add', wx.ART_ERROR),
00180                                 label = _('Add legend')),
00181         'saveFile'   : MetaIcon(img = iconSet.get('map-export', wx.ART_ERROR),
00182                                 label = _('Save display to graphic file')),
00183         'print'      : MetaIcon(img = iconSet.get('print', wx.ART_ERROR),
00184                                 label = _('Print display')),
00185         'analyze'    : MetaIcon(img = iconSet.get('layer-raster-analyze', wx.ART_ERROR),
00186                                 label = _('Analyze map'),
00187                                 desc = _('Measuring, profiling, histogramming, ...')),
00188         'measure'    : MetaIcon(img = iconSet.get('measure-length', wx.ART_ERROR),
00189                                 label = _('Measure distance')),
00190         'profile'    : MetaIcon(img = iconSet.get('layer-raster-profile', wx.ART_ERROR),
00191                                 label = _('Profile surface map')),
00192         'addText'    : MetaIcon(img = iconSet.get('text-add', wx.ART_ERROR),
00193                                 label = _('Add text layer')),
00194         'histogram'  : MetaIcon(img = iconSet.get('layer-raster-histogram', wx.ART_ERROR),
00195                                 label = _('Create histogram of raster map')),
00196         },
00197     'layerManager' : {
00198         'newdisplay'   : MetaIcon(img = iconSet.get('monitor-create', wx.ART_ERROR),
00199                                   label = _('Start new map display')),
00200         'workspaceNew'  : MetaIcon(img = iconSet.get('create', wx.ART_ERROR),
00201                                    label = _('Create new workspace (Ctrl+N)')),
00202         'workspaceOpen' : MetaIcon(img = iconSet.get('open', wx.ART_ERROR),
00203                                    label = _('Open existing workspace file (Ctrl+O)')),
00204         'workspaceSave' : MetaIcon(img = iconSet.get('save', wx.ART_ERROR),
00205                                    label = _('Save current workspace to file (Ctrl+S)')),
00206         'addMulti'      : MetaIcon(img = iconSet.get('layer-open', wx.ART_ERROR),
00207                                    label = _('Add multiple raster or vector map layers (Ctrl+Shift+L)')),
00208         'import'        : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
00209                                    label = _('Import/link raster or vector data')),
00210         'rastImport' : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
00211                                 label = _('Import raster data')),
00212         'rastLink'   : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
00213                                 label = _('Link external raster data')),
00214         'vectImport' : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
00215                                 label = _('Import vector data')),
00216         'vectLink'   : MetaIcon(img = iconSet.get('layer-import', wx.ART_ERROR),
00217                                 label = _('Link external vector data')),
00218         'addRast'    : MetaIcon(img = iconSet.get('layer-raster-add', wx.ART_ERROR),
00219                                 label = _('Add raster map layer (Ctrl+Shift+R)')),
00220         'rastMisc'   : MetaIcon(img = iconSet.get('layer-raster-more', wx.ART_ERROR),
00221                                 label = _('Add various raster map layers (RGB, HIS, shaded relief...)')),
00222         'addVect'    : MetaIcon(img = iconSet.get('layer-vector-add', wx.ART_ERROR),
00223                                 label = _('Add vector map layer (Ctrl+Shift+V)')),
00224         'vectMisc'   : MetaIcon(img = iconSet.get('layer-vector-more', wx.ART_ERROR),
00225                                 label = _('Add various vector map layers (thematic, chart...)')),
00226         'addCmd'     : MetaIcon(img = iconSet.get('layer-command-add', wx.ART_ERROR),
00227                                 label = _('Add command layer')),
00228         'addGroup'   : MetaIcon(img = iconSet.get('layer-group-add', wx.ART_ERROR),
00229                                 label = _('Add group')),
00230         'addOverlay' : MetaIcon(img = iconSet.get('layer-more', wx.ART_ERROR),
00231                                 label = _('Add grid or vector labels overlay')),
00232         'delCmd'     : MetaIcon(img = iconSet.get('layer-remove', wx.ART_ERROR),
00233                                 label = _('Delete selected map layer')),
00234         'quit'       : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00235                                 label = _('Quit')),
00236         'attrTable'  : MetaIcon(img = iconSet.get('table', wx.ART_ERROR),
00237                                 label = _('Show attribute table')),
00238         'vdigit'     : MetaIcon(img = iconSet.get('edit', wx.ART_ERROR),
00239                                 label = _('Edit vector maps')),
00240         'addRgb'     : MetaIcon(img = iconSet.get('layer-rgb-add', wx.ART_ERROR),
00241                                 label = _('Add RGB map layer')),
00242         'addHis'     : MetaIcon(img = iconSet.get('layer-his-add', wx.ART_ERROR),
00243                                 label = _('Add HIS map layer')),
00244         'addShaded'  : MetaIcon(img = iconSet.get('layer-shaded-relief-add', wx.ART_ERROR),
00245                                 label = _('Add shaded relief map layer')),
00246         'addRArrow'  : MetaIcon(img = iconSet.get('layer-aspect-arrow-add', wx.ART_ERROR),
00247                                 label = _('Add raster flow arrows')),
00248         'addRNum'    : MetaIcon(img = iconSet.get('layer-cell-cats-add', wx.ART_ERROR),
00249                                 label = _('Add raster cell numbers')),
00250         'addThematic': MetaIcon(img = iconSet.get('layer-vector-thematic-add', wx.ART_ERROR),
00251                                 label = _('Add thematic area (choropleth) map layer')),
00252         'addChart'   : MetaIcon(img = iconSet.get('layer-vector-chart-add', wx.ART_ERROR),
00253                                 label = _('Add thematic chart layer')),
00254         'addGrid'    : MetaIcon(img = iconSet.get('layer-grid-add', wx.ART_ERROR),
00255                                 label = _('Add grid layer')),
00256         'addGeodesic': MetaIcon(img = iconSet.get('shortest-distance', wx.ART_ERROR),
00257                                 label = _('Add geodesic line layer')),
00258         'addRhumb'   : MetaIcon(img = iconSet.get('shortest-distance', wx.ART_ERROR),
00259                                 label = _('Add rhumbline layer')),
00260         'addLabels'  : MetaIcon(img = iconSet.get('layer-label-add', wx.ART_ERROR),
00261                                 label = _('Add labels')),
00262         'addRast3d'  : MetaIcon(img = iconSet.get('layer-raster3d-add', wx.ART_ERROR),
00263                                 label = _('Add 3D raster map layer'),
00264                                 desc  =  _('Note that 3D raster data are rendered only in 3D view mode')),
00265         'settings'   : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
00266                                 label = _('Show GUI settings')),
00267         'modeler'    : MetaIcon(img = iconSet.get('modeler-main', wx.ART_ERROR),
00268                                 label = _('Graphical Modeler')),
00269         'layerOptions'  : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
00270                                    label = _('Set options')),
00271         'mapOutput'  : MetaIcon(img = iconSet.get('print-compose', wx.ART_ERROR),
00272                                 label = _('Cartographic Composer')),
00273         'mapcalc'    : MetaIcon(img = iconSet.get('calculator', wx.ART_ERROR),
00274                                 label = _('Raster Map Calculator')),
00275         },
00276     'vdigit' : {
00277         'addPoint'        : MetaIcon(img = iconSet.get('point-create', wx.ART_ERROR),
00278                                      label = _('Digitize new point'),
00279                                      desc = _('Left: new point')),
00280         'addLine'         : MetaIcon(img = iconSet.get('line-create', wx.ART_ERROR),
00281                                      label = _('Digitize new line'),
00282                                      desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
00283         'addBoundary'     : MetaIcon(img = iconSet.get('boundary-create', wx.ART_ERROR),
00284                                      label = _('Digitize new boundary'),
00285                                      desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
00286         'addCentroid'     : MetaIcon(img = iconSet.get('centroid-create', wx.ART_ERROR),
00287                                      label = _('Digitize new centroid'),
00288                                      desc = _('Left: new point')),
00289         'addArea'         : MetaIcon(img = iconSet.get('polygon-create', wx.ART_ERROR),
00290                                      label = _('Digitize new area (composition of boundaries without category and one centroid with category)'),
00291                                      desc = _('Left: new point')),
00292         'addVertex'       : MetaIcon(img = iconSet.get('vertex-create', wx.ART_ERROR),
00293                                      label = _('Add new vertex'),
00294                                      desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
00295         'deleteLine'      : MetaIcon(img = iconSet.get('line-delete', wx.ART_ERROR),
00296                                      label = _('Delete feature(s)'),
00297                                      desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
00298         'displayAttr'     : MetaIcon(img = iconSet.get('attributes-display', wx.ART_ERROR),
00299                                      label = _('Display/update attributes'),
00300                                      desc = _('Left: Select')),
00301         'displayCats'     : MetaIcon(img = iconSet.get('cats-display', wx.ART_ERROR),
00302                                      label = _('Display/update categories'),
00303                                      desc = _('Left: Select')),
00304         'editLine'        : MetaIcon(img = iconSet.get('line-edit', wx.ART_ERROR),
00305                                      label = _('Edit line/boundary'),
00306                                      desc = _('Left: new point; Ctrl+Left: undo last point; Right: close line')),
00307         'moveLine'        : MetaIcon(img = iconSet.get('line-move', wx.ART_ERROR),
00308                                      label = _('Move feature(s)'),
00309                                      desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
00310         'moveVertex'      : MetaIcon(img = iconSet.get('vertex-move', wx.ART_ERROR),
00311                                      label = _('Move vertex'),
00312                                      desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
00313         'removeVertex'    : MetaIcon(img = iconSet.get('vertex-delete', wx.ART_ERROR),
00314                                      label = _('Remove vertex'),
00315                                      desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
00316         'settings'        : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
00317                                      label = _('Digitization settings')),
00318         'quit'            : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00319                                      label = _('Quit digitizer'),
00320                                      desc = _('Quit digitizer and save changes')),
00321         'additionalTools' : MetaIcon(img = iconSet.get('tools', wx.ART_ERROR),
00322                                      label = _('Additional tools ' \
00323                                                    '(copy, flip, connect, etc.)'),
00324                                      desc = _('Left: Select; Ctrl+Left: Unselect; Right: Confirm')),
00325         'undo'             : MetaIcon(img = iconSet.get('undo', wx.ART_ERROR),
00326                                       label = _('Undo'),
00327                                       desc = _('Undo previous changes')),
00328         },
00329     'profile' : {
00330         'draw'         : MetaIcon(img = iconSet.get('show', wx.ART_ERROR),
00331                                   label = _('Draw/re-draw profile')),
00332         'transect'     : MetaIcon(img = iconSet.get('layer-raster-profile', wx.ART_ERROR),
00333                                   label = _('Draw transect in map display window to profile')),
00334         'options'      : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
00335                                   label = _('Profile options')),
00336         'save'         : MetaIcon(img = iconSet.get('save', wx.ART_ERROR),
00337                                   label = _('Save profile data to CSV file')),
00338         'quit'         : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00339                                   label = _('Quit Profile Analysis Tool'))
00340         },
00341     'georectify' : {
00342         'gcpSet'    : MetaIcon(img = iconSet.get('gcp-create', wx.ART_ERROR),
00343                                label = _('Set GCP'),
00344                                desc = _('Define GCP (Ground Control Points)')),
00345         'georectify': MetaIcon(img = iconSet.get('georectify', wx.ART_ERROR),
00346                                label = _('Georectify')),
00347         'gcpRms'    : MetaIcon(img = iconSet.get('gcp-rms', wx.ART_ERROR),
00348                                label = _('Recalculate RMS error')),
00349         'gcpSave'   : MetaIcon(img = iconSet.get('gcp-save', wx.ART_ERROR),
00350                                label = _('Save GCPs to POINTS file')),
00351         'gcpAdd'    : MetaIcon(img = iconSet.get('gcp-add', wx.ART_ERROR),
00352                                label = _('Add new GCP')),
00353         'gcpDelete' : MetaIcon(img = iconSet.get('gcp-delete', wx.ART_ERROR),
00354                                label = _('Delete selected GCP')),
00355         'gcpClear'  : MetaIcon(img = iconSet.get('gcp-remove', wx.ART_ERROR),
00356                                 label = _('Clear selected GCP')),
00357         'gcpReload' : MetaIcon(img = iconSet.get('reload', wx.ART_ERROR),
00358                                label = _('Reload GCPs from POINTS file')),
00359         'quit'      : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00360                                label = _('Quit georectification')),
00361         'settings'  : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
00362                                label = _('Settings'),
00363                                desc = _('Settings dialog for georectification tool')),
00364         },
00365     'nviz' : {
00366         'view'    : MetaIcon(img = iconSet.get('3d-view', wx.ART_ERROR),
00367                              label = _('Switch to view control page'),
00368                              desc = _('Change view settings')),
00369         'surface' : MetaIcon(img = iconSet.get('3d-raster', wx.ART_ERROR),
00370                              label = _('Switch to surface (raster) control page'),
00371                              desc = _('Change surface (loaded raster maps) settings')),
00372         'vector'  : MetaIcon(img = iconSet.get('3d-vector', wx.ART_ERROR),
00373                              label = _('Switch to vector (2D/3D) control page'),
00374                              desc = _('Change 2D/3D vector settings')),
00375         'volume'  : MetaIcon(img = iconSet.get('3d-volume', wx.ART_ERROR),
00376                              label = _('Switch to volume (3D raster) control page'),
00377                              desc = _('Change volume (loaded 3D raster maps) settings')),
00378         'light'   : MetaIcon(img = iconSet.get('3d-light', wx.ART_ERROR),
00379                              label = _('Switch to lighting control page'),
00380                              desc = _('Change lighting settings')),
00381         'fringe'  : MetaIcon(img = iconSet.get('3d-fringe', wx.ART_ERROR),
00382                              label = _('Switch to fringe control page'),
00383                              desc = _('Switch on/off fringes')),
00384         'settings': MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
00385                              label = _('3D view mode tools'),
00386                              desc = _('Show/hide 3D view mode settings dialog')),
00387         'quit'    : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00388                              label = _('Quit 3D view mode'),
00389                              desc = _('Switch back to 2D view mode')),
00390         },
00391     'modeler' : {
00392         'new'        : MetaIcon(img = iconSet.get('create', wx.ART_ERROR),
00393                                 label = _('Create new model (Ctrl+N)')),
00394         'open'       : MetaIcon(img = iconSet.get('open', wx.ART_ERROR),
00395                                 label = _('Load model from file (Ctrl+O)')),
00396         'save'       : MetaIcon(img = iconSet.get('save', wx.ART_ERROR),
00397                                 label = _('Save current model to file (Ctrl+S)')),
00398         'toImage'    : MetaIcon(img = iconSet.get('image-export', wx.ART_ERROR),
00399                                 label = _('Export model to image')),
00400         'toPython'   : MetaIcon(img = iconSet.get('python-export', wx.ART_ERROR),
00401                                 label = _('Export model to Python script')),
00402         'actionAdd'  : MetaIcon(img = iconSet.get('module-add', wx.ART_ERROR),
00403                                 label = _('Add action (GRASS module) to model')),
00404         'dataAdd'    : MetaIcon(img = iconSet.get('data-add', wx.ART_ERROR),
00405                                 label = _('Add data item to model')),
00406         'relation'   : MetaIcon(img = iconSet.get('relation-create', wx.ART_ERROR),
00407                                 label = _('Define relation between data and action items')),
00408         'run'        : MetaIcon(img = iconSet.get('execute', wx.ART_ERROR),
00409                                 label = _('Run model')),
00410         'validate'   : MetaIcon(img = iconSet.get('check', wx.ART_ERROR),
00411                                 label = _('Validate model')),
00412         'settings'   : MetaIcon(img = iconSet.get('settings', wx.ART_ERROR),
00413                                 label = _('Show modeler settings')),
00414         'properties' : MetaIcon(img = iconSet.get('options', wx.ART_ERROR),
00415                                 label = _('Show model properties')),
00416         'variables'  : MetaIcon(img = iconSet.get('modeler-variables', wx.ART_ERROR),
00417                                 label = _('Manage model variables')),
00418         'redraw'     : MetaIcon(img = iconSet.get('redraw', wx.ART_ERROR),
00419                                 label = _('Redraw model canvas')),
00420         'quit'    : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00421                              label = _('Quit Graphical Modeler')),
00422         },
00423     'misc' : {
00424         'font' : MetaIcon(img = iconSet.get('font', wx.ART_ERROR),
00425                           label = _('Select font')),
00426         'help' : MetaIcon(img = iconSet.get('help', wx.ART_ERROR),
00427                           label = _('Show manual')),
00428         'quit' : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00429                           label = _('Quit')),
00430         },
00431     'psMap' : {
00432         'scriptSave' : MetaIcon(img = iconSet.get('script-save', wx.ART_ERROR),
00433                                 label = _('Generate text file with mapping instructions')),
00434         'scriptLoad' : MetaIcon(img = iconSet.get('script-load', wx.ART_ERROR),
00435                                 label = _('Load text file with mapping instructions')),                           
00436         'psExport'   : MetaIcon(img = iconSet.get('ps-export', wx.ART_ERROR),
00437                                 label = _('Generate PostScript output')),
00438         'pdfExport'  : MetaIcon(img = iconSet.get('pdf-export', wx.ART_ERROR),
00439                                 label = _('Generate PDF output')),
00440         'pageSetup'  : MetaIcon(img = iconSet.get('page-settings', wx.ART_ERROR),
00441                                 label = _('Page setup'),
00442                                 desc = _('Specify paper size, margins and orientation')),
00443         'fullExtent' : MetaIcon(img = iconSet.get('zoom-extent', wx.ART_ERROR),
00444                                 label = _("Full extent"),
00445                                 desc = _("Zoom to full extent")),
00446         'addMap'     : MetaIcon(img = iconSet.get('layer-add', wx.ART_ERROR),
00447                                 label = _("Map frame"),
00448                                 desc = _("Click and drag to place map frame")),
00449         'addRast'    : MetaIcon(img = iconSet.get('layer-raster-add', wx.ART_ERROR),
00450                                 label = _("Raster map"),
00451                                 desc = _("Add raster map")),
00452         'addVect'    : MetaIcon(img = iconSet.get('layer-vector-add', wx.ART_ERROR),
00453                                 label = _("Vector map"),
00454                                 desc = _("Add vector map")),
00455         'deleteObj'  : MetaIcon(img = iconSet.get('layer-remove', wx.ART_ERROR),
00456                                 label = _("Delete selected object")),
00457         'preview'    : MetaIcon(img = iconSet.get('execute', wx.ART_ERROR),
00458                                 label = _("Show preview")),
00459         'quit'       : MetaIcon(img = iconSet.get('quit', wx.ART_ERROR),
00460                                 label = _('Quit Cartographic Composer')),
00461         'addText'    : MetaIcon(img = iconSet.get('text-add', wx.ART_ERROR),
00462                                 label = _('Add text')),
00463         'addMapinfo' : MetaIcon(img = iconSet.get('map-info', wx.ART_ERROR),
00464                                 label = _('Add map info')),
00465         'addLegend'  : MetaIcon(img = iconSet.get('legend-add', wx.ART_ERROR),
00466                                 label = _('Add legend')),
00467         'addScalebar' : MetaIcon(img = iconSet.get('scalebar-add', wx.ART_ERROR),
00468                                  label = _('Add scale bar')),
00469         }
00470     }
00471 
00472 # testing ...
00473 if __name__ == '__main__':
00474     for k, v in iconSet.iteritems():
00475         print v.GetImageName()
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines