You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.1 KiB

  1. from gooey.gui import formatters
  2. from gooey.gui.components.widgets import core
  3. from gooey.gui.components.widgets.bases import TextContainer, BaseChooser
  4. __ALL__ = [
  5. 'FileChooser',
  6. 'MultiFileChooser',
  7. 'FileSaver',
  8. 'DirChooser',
  9. 'MultiDirChooser',
  10. 'DateChooser',
  11. 'ColourChooser',
  12. 'TimeChooser'
  13. ]
  14. class FileChooser(BaseChooser):
  15. widget_class = core.FileChooser
  16. class MultiFileChooser(BaseChooser):
  17. widget_class = core.MultiFileChooser
  18. def formatOutput(self, metatdata, value):
  19. return formatters.multiFileChooser(metatdata, value)
  20. class FileSaver(BaseChooser):
  21. widget_class = core.FileSaver
  22. class DirChooser(BaseChooser):
  23. widget_class = core.DirChooser
  24. class MultiDirChooser(BaseChooser):
  25. widget_class = core.MultiDirChooser
  26. def formatOutput(self, metadata, value):
  27. return formatters.multiFileChooser(metadata, value)
  28. class DateChooser(BaseChooser):
  29. widget_class = core.DateChooser
  30. class ColourChooser(BaseChooser):
  31. widget_class = core.ColourChooser
  32. class TimeChooser(BaseChooser):
  33. widget_class = core.TimeChooser