Exemple #1
0
 def __init__(self, element, mapset, env, **kwargs):
     TextEntryDialog.__init__(self, **kwargs)
     self._element = element
     self._mapset = mapset
     self._env = env
     id_OK = self.GetAffirmativeId()
     self.Bind(wx.EVT_BUTTON, self.OnOK, self.FindWindowById(id_OK))
Exemple #2
0
 def __init__(self, element, mapset, env, **kwargs):
     TextEntryDialog.__init__(self, **kwargs)
     self._element = element
     self._mapset = mapset
     self._env = env
     id_OK = self.GetAffirmativeId()
     self.Bind(wx.EVT_BUTTON, self.OnOK, self.FindWindowById(id_OK))
Exemple #3
0
    def __init__(self, parent=None, default=None, message=None, caption=None,
                 database=None):
        self.database = database

        validator = GenericValidator(self._isLocationNameValid,
                                     self._showLocationNameInvalidReason)

        TextEntryDialog.__init__(
            self, parent=parent,
            message=message,
            caption=caption,
            defaultValue=default,
            validator=validator,
        )
Exemple #4
0
    def __init__(self,
                 parent=None,
                 default=None,
                 message=None,
                 caption=None,
                 database=None):
        self.database = database

        # list of tuples consisting of conditions and callbacks
        checks = [(gs.legal_name, self._nameValidationFailed),
                  (self._checkLocationNotExists, self._locationAlreadyExists)]
        validator = GenericMultiValidator(checks)

        TextEntryDialog.__init__(
            self,
            parent=parent,
            message=message,
            caption=caption,
            defaultValue=default,
            validator=validator,
        )
Exemple #5
0
 def __init__(self,
              parent=None,
              default=None,
              validation_failed_handler=None,
              help_hanlder=None):
     if help_hanlder:
         style = wx.OK | wx.CANCEL | wx.HELP
     else:
         style = wx.OK | wx.CANCEL
     if validation_failed_handler:
         validator = GenericValidator(gs.legal_name,
                                      validation_failed_handler)
     else:
         validator = None
     TextEntryDialog.__init__(self,
                              parent=parent,
                              message=_("Name for the new mapset:"),
                              caption=_("Create new mapset"),
                              defaultValue=default,
                              validator=validator,
                              style=style)
     if help_hanlder:
         help_button = self.FindWindowById(wx.ID_HELP)
         help_button.Bind(wx.EVT_BUTTON, help_hanlder)