auto-options-python 1.0.8__tar.gz → 1.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/PKG-INFO +1 -1
  2. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/auto_options_python.egg-info/PKG-INFO +1 -1
  3. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_version.py +3 -3
  4. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/widget.py +17 -8
  5. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/.github/workflows/create_doc.yml +0 -0
  6. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/.github/workflows/test_and_deploy.yml +0 -0
  7. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/.gitignore +0 -0
  8. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/LICENSE +0 -0
  9. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/README.md +0 -0
  10. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/Makefile +0 -0
  11. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/make.bat +0 -0
  12. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/auto-options-python.rst +0 -0
  13. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/autooptions.array_util.rst +0 -0
  14. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/autooptions.napari_util.rst +0 -0
  15. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/autooptions.options.rst +0 -0
  16. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/autooptions.qtutil.rst +0 -0
  17. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/autooptions.widget.rst +0 -0
  18. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/conf.py +0 -0
  19. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/index.rst +0 -0
  20. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/modules.rst +0 -0
  21. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/user/installation.rst +0 -0
  22. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/user/introduction.rst +0 -0
  23. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/docs/source/user/user_documentation.rst +0 -0
  24. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/pyproject.toml +0 -0
  25. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/setup.cfg +0 -0
  26. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/auto_options_python.egg-info/SOURCES.txt +0 -0
  27. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/auto_options_python.egg-info/dependency_links.txt +0 -0
  28. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/auto_options_python.egg-info/requires.txt +0 -0
  29. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/auto_options_python.egg-info/top_level.txt +0 -0
  30. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/__init__.py +0 -0
  31. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_tests/__init__.py +0 -0
  32. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_tests/test_array_util.py +0 -0
  33. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_tests/test_layouts.py +0 -0
  34. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_tests/test_napari_util.py +0 -0
  35. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_tests/test_options.py +0 -0
  36. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_tests/test_qtutil.py +0 -0
  37. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/_tests/test_widget.py +0 -0
  38. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/array_util.py +0 -0
  39. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/layouts/__init__.py +0 -0
  40. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/layouts/base_layout.py +0 -0
  41. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/layouts/grid_layout.py +0 -0
  42. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/layouts/vertical_layout.py +0 -0
  43. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/napari_util.py +0 -0
  44. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/options.py +0 -0
  45. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/autooptions/qtutil.py +0 -0
  46. {auto_options_python-1.0.8 → auto_options_python-1.0.9}/src/scratch/options.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-options-python
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: Manage command options in Python and create QWidgets for them.
5
5
  Author-email: Volker Baecker <volker.baecker@mri.cnrs.fr>, Clément Benedetti <clement.benedetti@mri.cnrs.fr>
6
6
  License: MIT License
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-options-python
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: Manage command options in Python and create QWidgets for them.
5
5
  Author-email: Volker Baecker <volker.baecker@mri.cnrs.fr>, Clément Benedetti <clement.benedetti@mri.cnrs.fr>
6
6
  License: MIT License
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '1.0.8'
22
- __version_tuple__ = version_tuple = (1, 0, 8)
21
+ __version__ = version = '1.0.9'
22
+ __version_tuple__ = version_tuple = (1, 0, 9)
23
23
 
24
- __commit_id__ = commit_id = 'g8b8e2d997'
24
+ __commit_id__ = commit_id = 'g06bda8006'
@@ -56,6 +56,11 @@ class OptionsWidget(QWidget):
56
56
  self.mainLayout = None
57
57
  self._createLayout(layout_type)
58
58
 
59
+ def addButton(self, name, callback):
60
+ button = self._createButton(name, callback, None)
61
+ self.buttons[name] = button
62
+ self._getButtonsLayout().addWidget(button)
63
+
59
64
  def addApplyButton(self, callback):
60
65
  """
61
66
  Add an apply button to the options widget. When the button is pressed the value are copied from the dialog
@@ -93,24 +98,28 @@ class OptionsWidget(QWidget):
93
98
  """
94
99
  Answers the apply button if it exists and None otherwise.
95
100
  """
96
- if "Apply" in self.buttons.keys():
97
- return self.buttons["Apply"]
98
- return None
101
+ return self.getButton("Apply")
99
102
 
100
103
  def getOKButton(self):
101
104
  """
102
105
  Answers the ok button if it exists and None otherwise.
103
106
  """
104
- if "OK" in self.buttons.keys():
105
- return self.buttons["OK"]
106
- return None
107
+ return self.getButton("OK")
107
108
 
108
109
  def getCancelButton(self):
109
110
  """
110
111
  Answers the cancel button if it exists and None otherwise.
111
112
  """
112
- if "Cancel" in self.buttons.keys():
113
- return self.buttons["Cancel"]
113
+ return self.getButton("Cancel")
114
+
115
+ def getButton(self, name):
116
+ """
117
+ Answer the button with the given name.
118
+ :param name: The name of the button
119
+ :return: The button widget with the given name
120
+ """
121
+ if name in self.buttons.keys():
122
+ return self.buttons[name]
114
123
  return None
115
124
 
116
125
  def shut(self):