Beispiel #1
0
 def __init__(self,
              pattern=None,
              parent=None,
              allow_empty=False,
              allow_non_existing=False,
              allow_empty_dir=False):
     QValidator.__init__(self, parent)
     self.pattern = pattern
     self.allow_empty = allow_empty
     self.allow_non_existing = allow_non_existing
     self.allow_empty_dir = allow_empty_dir
 def __init__(self,
              pattern='*',
              is_executable=False,
              parent=None,
              allow_empty=False,
              allow_non_existing=False):
     QValidator.__init__(self, parent)
     self.pattern = pattern
     self.is_executable = is_executable
     self.allow_empty = allow_empty
     self.allow_non_existing = allow_non_existing
Beispiel #3
0
    def __init__(self, pattern='*', is_executable=False, parent=None, allow_empty=False, allow_non_existing=False):
        """
        Validates if a string is a valid filename, based on the provided parameters.

        :param pattern: A file glob pattern as recognized by ``fnmatch``, if a list if provided, the validator will try
                        to match every pattern in the list.
        :param is_executable: Only match executable files
        :param parent: The parent QObject
        :param allow_empty: Empty strings are valid
        :param allow_non_existing: Non existing files are valid
        """
        QValidator.__init__(self, parent)
        self.pattern = pattern
        self.is_executable = is_executable
        self.allow_empty = allow_empty
        self.allow_non_existing = allow_non_existing
Beispiel #4
0
 def __init__(self, parent=None):
     QValidator.__init__(self, parent)