2 @package gmodeler.toolbars
4 @brief wxGUI Graphical Modeler toolbars classes
7 - toolbars::ModelerToolbar
9 (C) 2010-2011 by the GRASS Development Team
11 This program is free software under the GNU General Public License
12 (>=v2). Read the file COPYING that comes with GRASS for details.
14 @author Martin Landa <landa.martin gmail.com>
22 from core
import globalvar
25 from icons.icon
import MetaIcon
28 """!Graphical modeler toolbaro (see gmodeler.py)
31 BaseToolbar.__init__(self, parent)
38 def _toolbarData(self):
41 'new' : MetaIcon(img =
'create',
42 label = _(
'Create new model (Ctrl+N)')),
43 'open' : MetaIcon(img =
'open',
44 label = _(
'Load model from file (Ctrl+O)')),
45 'save' : MetaIcon(img =
'save',
46 label = _(
'Save current model to file (Ctrl+S)')),
47 'toImage' : MetaIcon(img =
'image-export',
48 label = _(
'Export model to image')),
49 'toPython' : MetaIcon(img =
'python-export',
50 label = _(
'Export model to Python script')),
51 'actionAdd' : MetaIcon(img =
'module-add',
52 label = _(
'Add command (GRASS module) to model')),
53 'dataAdd' : MetaIcon(img =
'data-add',
54 label = _(
'Add data to model')),
55 'relation' : MetaIcon(img =
'relation-create',
56 label = _(
'Manually define relation between data and commands')),
57 'loop' : MetaIcon(img =
'loop-add',
58 label = _(
'Add loop/series')),
59 'run' : MetaIcon(img =
'execute',
60 label = _(
'Run model')),
61 'validate' : MetaIcon(img =
'check',
62 label = _(
'Validate model')),
63 'settings' : BaseIcons[
'settings'].SetLabel(_(
'Modeler settings')),
64 'properties' : MetaIcon(img =
'options',
65 label = _(
'Show model properties')),
66 'variables' : MetaIcon(img =
'modeler-variables',
67 label = _(
'Manage model variables')),
68 'redraw' : MetaIcon(img =
'redraw',
69 label = _(
'Redraw model canvas')),
70 'quit' : BaseIcons[
'quit'].SetLabel(_(
'Quit Graphical Modeler')),
74 self.parent.OnModelNew),
75 (
'open', icons[
'open'],
76 self.parent.OnModelOpen),
77 (
'save', icons[
'save'],
78 self.parent.OnModelSave),
79 (
'image', icons[
'toImage'],
80 self.parent.OnExportImage),
81 (
'python', icons[
'toPython'],
82 self.parent.OnExportPython),
84 (
'action', icons[
'actionAdd'],
85 self.parent.OnAddAction),
86 (
'data', icons[
'dataAdd'],
87 self.parent.OnAddData),
88 (
'relation', icons[
'relation'],
89 self.parent.OnDefineRelation),
90 (
'loop', icons[
'loop'],
91 self.parent.OnDefineLoop),
93 (
'redraw', icons[
'redraw'],
94 self.parent.OnCanvasRefresh),
95 (
'validate', icons[
'validate'],
96 self.parent.OnValidateModel),
98 self.parent.OnRunModel),
100 (
"variables", icons[
'variables'],
101 self.parent.OnVariables),
102 (
"settings", icons[
'settings'],
103 self.parent.OnPreferences),
104 (
"help", BaseIcons[
'help'],
107 (
'quit', icons[
'quit'],
108 self.parent.OnCloseWindow))