4 @brief Georectification module - toolbars
7 - toolbars::GCPManToolbar
8 - toolbars::GCPDisplayToolbar
10 (C) 2007-2011 by the GRASS Development Team
12 This program is free software under the GNU General Public License
13 (>=v2). Read the file COPYING that comes with GRASS for details.
23 from core
import globalvar
25 from icon
import MetaIcon
28 """!Toolbar for managing ground control points
30 @param parent reference to GCP widget
33 BaseToolbar.__init__(self, parent)
40 def _toolbarData(self):
42 'gcpAdd' : MetaIcon(img =
'gcp-add',
43 label = _(
'Add new GCP to the list')),
44 'gcpDelete' : MetaIcon(img =
'gcp-delete',
45 label = _(
'Delete selected GCP')),
46 'gcpClear' : MetaIcon(img =
'gcp-remove',
47 label = _(
'Clear selected GCP')),
48 'gcpRms' : MetaIcon(img =
'gcp-rms',
49 label = _(
'Recalculate RMS error')),
50 'georectify' : MetaIcon(img =
'georectify',
51 label = _(
'Georectify')),
52 'gcpSave' : MetaIcon(img =
'gcp-save',
53 label = _(
'Save GCPs to POINTS file')),
54 'gcpReload' : MetaIcon(img =
'reload',
55 label = _(
'Reload GCPs from POINTS file')),
60 (
'gcpDelete', icons[
"gcpDelete"],
61 self.parent.DeleteGCP),
62 (
'gcpClear', icons[
"gcpClear"],
63 self.parent.ClearGCP),
65 (
'rms', icons[
"gcpRms"],
67 (
'georect', icons[
"georectify"],
68 self.parent.OnGeorect),
70 (
'gcpSave', icons[
"gcpSave"],
71 self.parent.SaveGCPs),
72 (
'gcpReload', icons[
"gcpReload"],
73 self.parent.ReloadGCPs))
82 GCP Display toolbar constructor
84 BaseToolbar.__init__(self, parent)
91 choices = [_(
'source'), _(
'target')])
95 self.SetToolShortHelp(self.
togglemapid,
'%s %s %s' % (_(
'Set map canvas for '),
96 BaseIcons[
"zoomBack"].GetLabel(),
104 'bind' : self.parent.OnPointer }
108 self.EnableTool(self.zoomback,
False)
110 def _toolbarData(self):
113 'gcpSet' : MetaIcon(img =
'gcp-create',
114 label = _(
'Update GCP coordinates'),
115 desc = _(
'Update GCP coordinates)')),
116 'quit' : BaseIcons[
'quit'].SetLabel(_(
'Quit georectification tool')),
117 'settings' : BaseIcons[
'settings'].SetLabel( _(
'Georectifier settings')),
118 'help' : BaseIcons[
'help'].SetLabel(_(
'Georectifier manual')),
123 (
"rendermap", BaseIcons[
"render"],
124 self.parent.OnRender),
125 (
"erase", BaseIcons[
"erase"],
126 self.parent.OnErase),
128 (
"gcpset", icons[
"gcpSet"],
129 self.parent.OnPointer,
131 (
"pan", BaseIcons[
"pan"],
134 (
"zoomin", BaseIcons[
"zoomIn"],
135 self.parent.OnZoomIn,
137 (
"zoomout", BaseIcons[
"zoomOut"],
138 self.parent.OnZoomOut,
140 (
"zoommenu", BaseIcons[
"zoomMenu"],
141 self.parent.OnZoomMenuGCP),
143 (
"zoomback", BaseIcons[
"zoomBack"],
144 self.parent.OnZoomBack),
145 (
"zoomtomap", BaseIcons[
"zoomExtent"],
146 self.parent.OnZoomToMap),
148 (
'settings', icons[
"settings"],
149 self.parent.OnSettings),
150 (
'help', icons[
"help"],
153 (
'quit', icons[
"quit"],