95 |
EVT_BUTTON(self, ID_PROJECTION_OK, self.OnProj4OK) |
EVT_BUTTON(self, ID_PROJECTION_OK, self.OnProj4OK) |
96 |
EVT_BUTTON(self, ID_PROJECTION_CANCEL, self.OnProj4Cancel) |
EVT_BUTTON(self, ID_PROJECTION_CANCEL, self.OnProj4Cancel) |
97 |
|
|
98 |
self.SetAutoLayout(true) |
self.SetAutoLayout(True) |
99 |
self.SetSizer(topBox) |
self.SetSizer(topBox) |
100 |
topBox.Fit(self) |
topBox.Fit(self) |
101 |
topBox.SetSizeHints(self) |
topBox.SetSizeHints(self) |
134 |
def launchUTMDialog(self, parent): |
def launchUTMDialog(self, parent): |
135 |
dlg = UTMDialog(parent, parent.projectionInfo ) |
dlg = UTMDialog(parent, parent.projectionInfo ) |
136 |
if dlg.ShowModal(): |
if dlg.ShowModal(): |
137 |
return true |
return True |
138 |
else: |
else: |
139 |
return false |
return False |
140 |
|
|
141 |
def GetParams(self): |
def GetParams(self): |
142 |
if len(self.projectionParams.keys()) > 0: |
if len(self.projectionParams.keys()) > 0: |
201 |
EVT_BUTTON(self, ID_UTM_DIALOG_OK, self.OnOK) |
EVT_BUTTON(self, ID_UTM_DIALOG_OK, self.OnOK) |
202 |
EVT_BUTTON(self, ID_UTM_DIALOG_CANCEL, self.OnCancel) |
EVT_BUTTON(self, ID_UTM_DIALOG_CANCEL, self.OnCancel) |
203 |
|
|
204 |
self.SetAutoLayout(true) |
self.SetAutoLayout(True) |
205 |
self.SetSizer(topBox) |
self.SetSizer(topBox) |
206 |
topBox.Fit(self) |
topBox.Fit(self) |
207 |
topBox.SetSizeHints(self) |
topBox.SetSizeHints(self) |
209 |
def OnProposeZone(self, event): |
def OnProposeZone(self, event): |
210 |
dlg = UTMProposeZoneDialog(self) |
dlg = UTMProposeZoneDialog(self) |
211 |
if dlg.ShowModal(): |
if dlg.ShowModal(): |
212 |
return true |
return True |
213 |
else: |
else: |
214 |
return false |
return False |
215 |
|
|
216 |
def OnOK(self, event): |
def OnOK(self, event): |
217 |
self.parent.projectionParams = {} |
self.parent.projectionParams = {} |
218 |
self.parent.projectionParams['zone'] = self.zone.GetStringSelection() |
self.parent.projectionParams['zone'] = self.zone.GetStringSelection() |
219 |
self.parent.projectionParams['ellps'] = self.ellps.GetStringSelection() |
self.parent.projectionParams['ellps'] = self.ellps.GetStringSelection() |
220 |
self.parent.projectionParams['proj'] = "utm" |
self.parent.projectionParams['proj'] = "utm" |
221 |
self.Close(true) |
self.Close(True) |
222 |
|
|
223 |
def OnCancel(self, event): |
def OnCancel(self, event): |
224 |
self.Close(false) |
self.Close(False) |
225 |
|
|
226 |
class UTMProposeZoneDialog(wxDialog): |
class UTMProposeZoneDialog(wxDialog): |
227 |
|
|
259 |
EVT_BUTTON(self, ID_UTM_PROPOSE_ZONE_DIALOG_TAKE, self.OnTake) |
EVT_BUTTON(self, ID_UTM_PROPOSE_ZONE_DIALOG_TAKE, self.OnTake) |
260 |
EVT_BUTTON(self, ID_UTM_PROPOSE_ZONE_DIALOG_CANCEL, self.OnCancel) |
EVT_BUTTON(self, ID_UTM_PROPOSE_ZONE_DIALOG_CANCEL, self.OnCancel) |
261 |
|
|
262 |
self.SetAutoLayout(true) |
self.SetAutoLayout(True) |
263 |
self.SetSizer(topBox) |
self.SetSizer(topBox) |
264 |
topBox.Fit(self) |
topBox.Fit(self) |
265 |
topBox.SetSizeHints(self) |
topBox.SetSizeHints(self) |
266 |
|
|
267 |
def OnTake(self, event): |
def OnTake(self, event): |
268 |
self.parent.zone.SetSelection(self.parent.zone.FindString(self.proposedZone)) |
self.parent.zone.SetSelection(self.parent.zone.FindString(self.proposedZone)) |
269 |
self.Close(true) |
self.Close(True) |
270 |
|
|
271 |
def OnCancel(self, event): |
def OnCancel(self, event): |
272 |
self.Close(false) |
self.Close(False) |