auto-options-python 0.1.5__tar.gz → 0.1.6__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 (41) hide show
  1. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/PKG-INFO +1 -1
  2. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/auto_options_python.egg-info/PKG-INFO +1 -1
  3. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/_version.py +3 -3
  4. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/widget.py +23 -9
  5. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/scratch/options.py +1 -1
  6. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/.github/workflows/create_doc.yml +0 -0
  7. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/.github/workflows/test_and_deploy.yml +0 -0
  8. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/.gitignore +0 -0
  9. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/LICENSE +0 -0
  10. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/README.md +0 -0
  11. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/Makefile +0 -0
  12. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/make.bat +0 -0
  13. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/auto-options-python.rst +0 -0
  14. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/autooptions.array_util.rst +0 -0
  15. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/autooptions.napari_util.rst +0 -0
  16. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/autooptions.options.rst +0 -0
  17. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/autooptions.qtutil.rst +0 -0
  18. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/autooptions.widget.rst +0 -0
  19. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/conf.py +0 -0
  20. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/index.rst +0 -0
  21. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/modules.rst +0 -0
  22. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/user/installation.rst +0 -0
  23. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/user/introduction.rst +0 -0
  24. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/docs/source/user/user_documentation.rst +0 -0
  25. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/pyproject.toml +0 -0
  26. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/setup.cfg +0 -0
  27. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/auto_options_python.egg-info/SOURCES.txt +0 -0
  28. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/auto_options_python.egg-info/dependency_links.txt +0 -0
  29. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/auto_options_python.egg-info/requires.txt +0 -0
  30. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/auto_options_python.egg-info/top_level.txt +0 -0
  31. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/__init__.py +0 -0
  32. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/_tests/__init__.py +0 -0
  33. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/_tests/test_array_util.py +0 -0
  34. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/_tests/test_napari_util.py +0 -0
  35. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/_tests/test_options.py +0 -0
  36. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/_tests/test_qtutil.py +0 -0
  37. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/_tests/test_widget.py +0 -0
  38. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/array_util.py +0 -0
  39. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/napari_util.py +0 -0
  40. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/options.py +0 -0
  41. {auto_options_python-0.1.5 → auto_options_python-0.1.6}/src/autooptions/qtutil.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-options-python
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Mange command options in python and create QWidgets for them.
5
5
  Author: Volker Baecker
6
6
  Author-email: volker.baecker@mri.cnrs.fr
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: auto-options-python
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: Mange command options in python and create QWidgets for them.
5
5
  Author: Volker Baecker
6
6
  Author-email: volker.baecker@mri.cnrs.fr
@@ -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 = '0.1.5'
22
- __version_tuple__ = version_tuple = (0, 1, 5)
21
+ __version__ = version = '0.1.6'
22
+ __version_tuple__ = version_tuple = (0, 1, 6)
23
23
 
24
- __commit_id__ = commit_id = 'g88d6dc181'
24
+ __commit_id__ = commit_id = 'g52deebf6d'
@@ -13,7 +13,7 @@ class OptionsWidget(QWidget):
13
13
  to the options file.
14
14
  """
15
15
 
16
- def __init__(self, viewer, options, client=None):
16
+ def __init__(self, viewer, options, client=None, sameRowMap=None):
17
17
  """
18
18
  Create a new options widget. Layer add and remove events are caught and
19
19
  the combo-boxes are updated accordingly, depending on the layer types.
@@ -41,6 +41,7 @@ class OptionsWidget(QWidget):
41
41
  self.labelComboBoxes = []
42
42
  self.pointComboBoxes = []
43
43
  self.widgets = {}
44
+ self._isSameRow = sameRowMap
44
45
  self.viewer.layers.events.inserted.connect(self._onLayerAddedOrRemoved)
45
46
  self.viewer.layers.events.removed.connect(self._onLayerAddedOrRemoved)
46
47
  self.input_layer = None
@@ -137,42 +138,55 @@ class OptionsWidget(QWidget):
137
138
  return func
138
139
 
139
140
 
141
+ def sameRow(self, name):
142
+ if self._isSameRow is None:
143
+ self._isSameRow = {}
144
+ self._isSameRow[name] = True
145
+
146
+
147
+ def isSameRow(self, name):
148
+ if self._isSameRow is None:
149
+ return False
150
+ if name in self._isSameRow.keys():
151
+ return self._isSameRow[name]
152
+ return False
153
+
154
+
140
155
  def _createLayout(self):
141
156
  self.mainLayout = QVBoxLayout()
157
+ layout = None
158
+ lastLayout = None
142
159
  for name, item in self.options.items.items():
143
160
  widget = None
144
161
  if item['type'] == 'image':
145
162
  layout, widget = self._getImageWidget(name, item)
146
- self.mainLayout.addLayout(layout)
147
163
  self.imageComboBoxes.append(widget)
148
164
  if item['type'] == 'labels':
149
165
  layout, widget = self._getLabelsWidget(name, item)
150
- self.mainLayout.addLayout(layout)
151
166
  self.labelComboBoxes.append(widget)
152
167
  if item['type'] == 'points':
153
168
  layout, widget = self._getPointsWidget(name, item)
154
- self.mainLayout.addLayout(layout)
155
169
  self.pointComboBoxes.append(widget)
156
170
  if item['type'] == 'fft':
157
171
  layout, widget = self._getFFTWidget(name, item)
158
- self.mainLayout.addLayout(layout)
159
172
  self.fftComboBoxes.append(widget)
160
173
  if item['type'] == 'int':
161
174
  layout, widget = self._getIntWidget(name, item)
162
- self.mainLayout.addLayout(layout)
163
175
  if item['type'] == 'float':
164
176
  layout, widget = self._getFloatWidget(name, item)
165
- self.mainLayout.addLayout(layout)
166
177
  if item['type'] == 'choice':
167
178
  layout, widget = self._getChoiceWidget(name, item)
168
- self.mainLayout.addLayout(layout)
169
179
  if item['type'] == 'str':
170
180
  layout, widget = self._getStrWidget(name, item)
171
- self.mainLayout.addLayout(layout)
172
181
  if item['type'] == 'bool':
173
182
  layout, widget = self._getBoolWidget(name, item)
183
+ if self.isSameRow(name):
184
+ lastLayout.addWidget(layout.itemAt(0).widget())
185
+ lastLayout.addWidget(layout.itemAt(1).widget())
186
+ else:
174
187
  self.mainLayout.addLayout(layout)
175
188
  self.widgets[name] = widget
189
+ lastLayout = layout
176
190
  self.setLayout(self.mainLayout)
177
191
 
178
192
 
@@ -29,7 +29,7 @@ class Client:
29
29
  self.options.addChoice('footprint', value=None, choices=["none", "cube", "ball", "octahedron"])
30
30
  self.options.addInt('radius', value=1, widget="input")
31
31
  self.options.load()
32
- self.widget = OptionsWidget(self.viewer, self.options, self.widget)
32
+ self.widget = OptionsWidget(self.viewer, self.options, self, sameRowMap={"size z": True})
33
33
  self.widget.addApplyButton(self.onApplyButtonClicked)
34
34
  #self.widget.addOKButton(None)
35
35
  #self.widget.addCancelButton(None)