processview 1.3.3__tar.gz → 1.4.1__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.
- {processview-1.3.3 → processview-1.4.1}/PKG-INFO +1 -1
- processview-1.4.1/processview/gui/DropDownWidget.py +50 -0
- {processview-1.3.3 → processview-1.4.1}/processview/gui/processmanager.py +17 -35
- {processview-1.3.3 → processview-1.4.1}/processview/version.py +2 -2
- {processview-1.3.3 → processview-1.4.1}/processview.egg-info/PKG-INFO +1 -1
- {processview-1.3.3 → processview-1.4.1}/processview.egg-info/SOURCES.txt +1 -0
- {processview-1.3.3 → processview-1.4.1}/LICENSE +0 -0
- {processview-1.3.3 → processview-1.4.1}/README.md +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/dataset.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/helpers.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/manager/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/manager/manager.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/manager/test/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/manager/test/test_manager.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/setup.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/sorting.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/superviseprocess.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/core/test/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/gui/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/gui/icons.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/gui/messagebox.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/gui/test/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/gui/test/test_process_manager.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/resources/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/resources/gui/icons/advancement.png +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/resources/gui/icons/advancement.svg +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/resources/gui/icons/magnifying_glass.png +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/resources/gui/icons/magnifying_glass.svg +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/test/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/utils/__init__.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview/utils/singleton.py +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview.egg-info/dependency_links.txt +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview.egg-info/requires.txt +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview.egg-info/top_level.txt +0 -0
- {processview-1.3.3 → processview-1.4.1}/processview.egg-info/zip-safe +0 -0
- {processview-1.3.3 → processview-1.4.1}/setup.cfg +0 -0
- {processview-1.3.3 → processview-1.4.1}/setup.py +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
from silx.gui import qt
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class DropDownWidget(qt.QWidget):
|
|
5
|
+
"""Simple 'dropdown' widget"""
|
|
6
|
+
|
|
7
|
+
_BUTTON_ICON = qt.QStyle.SP_ToolBarVerticalExtensionButton # noqa
|
|
8
|
+
|
|
9
|
+
def __init__(self, parent, direction=qt.Qt.LeftToRight):
|
|
10
|
+
super().__init__(parent)
|
|
11
|
+
|
|
12
|
+
self.setLayout(qt.QVBoxLayout())
|
|
13
|
+
self.setLayoutDirection(direction)
|
|
14
|
+
# toggable button
|
|
15
|
+
self._toggleButton = qt.QPushButton("", self)
|
|
16
|
+
self._toggleButton.setCheckable(True)
|
|
17
|
+
self._toggleButton.setSizePolicy(qt.QSizePolicy.Fixed, qt.QSizePolicy.Fixed)
|
|
18
|
+
self.layout().addWidget(self._toggleButton)
|
|
19
|
+
|
|
20
|
+
self._mainWidget = None
|
|
21
|
+
|
|
22
|
+
# set up interface
|
|
23
|
+
self.layout().setContentsMargins(2, 2, 2, 2)
|
|
24
|
+
self.layout().setSpacing(0)
|
|
25
|
+
|
|
26
|
+
self._setButtonIcon(show=True)
|
|
27
|
+
self._toggleButton.setChecked(True)
|
|
28
|
+
|
|
29
|
+
# connect signal / slot
|
|
30
|
+
self._toggleButton.toggled.connect(self._toggleVisibility)
|
|
31
|
+
|
|
32
|
+
def setWidget(self, widget: qt.QWidget):
|
|
33
|
+
if self._mainWidget is not None:
|
|
34
|
+
self.layout().removeWidget(self._mainWidget)
|
|
35
|
+
|
|
36
|
+
self._mainWidget = widget
|
|
37
|
+
self.layout().addWidget(self._mainWidget)
|
|
38
|
+
|
|
39
|
+
def _setButtonIcon(self, show):
|
|
40
|
+
style = qt.QApplication.instance().style()
|
|
41
|
+
# return a QIcon
|
|
42
|
+
icon = style.standardIcon(self._BUTTON_ICON)
|
|
43
|
+
if show is True:
|
|
44
|
+
pixmap = icon.pixmap(32, 32).transformed(qt.QTransform().scale(1, -1))
|
|
45
|
+
icon = qt.QIcon(pixmap)
|
|
46
|
+
self._toggleButton.setIcon(icon)
|
|
47
|
+
|
|
48
|
+
def _toggleVisibility(self, visible):
|
|
49
|
+
self._setButtonIcon(show=visible)
|
|
50
|
+
self._mainWidget.setVisible(visible)
|
|
@@ -41,6 +41,7 @@ from processview.core.manager import DatasetState
|
|
|
41
41
|
from processview.core.manager import ProcessManager as _ProcessManager
|
|
42
42
|
from processview.core.sorting import SortType, tooltips
|
|
43
43
|
from processview.core.superviseprocess import SuperviseProcess
|
|
44
|
+
from processview.gui.DropDownWidget import DropDownWidget
|
|
44
45
|
from processview.gui import icons as icons
|
|
45
46
|
from processview.gui.messagebox import MessageBox
|
|
46
47
|
from processview.utils import docstring
|
|
@@ -199,7 +200,7 @@ class ObservationTable(qt.QTableView):
|
|
|
199
200
|
|
|
200
201
|
class ProcessManagerWidget(qt.QWidget):
|
|
201
202
|
"""
|
|
202
|
-
Main widget to
|
|
203
|
+
Main widget to display dataset vs process metadata
|
|
203
204
|
"""
|
|
204
205
|
|
|
205
206
|
def __init__(self, parent):
|
|
@@ -208,14 +209,17 @@ class ProcessManagerWidget(qt.QWidget):
|
|
|
208
209
|
|
|
209
210
|
self._manager = ProcessManager()
|
|
210
211
|
|
|
211
|
-
self._optionsWidget =
|
|
212
|
-
self.
|
|
212
|
+
self._optionsWidget = OptionsWidget(parent=self)
|
|
213
|
+
self._dropDownOptionsWidget = DropDownWidget(parent=self)
|
|
214
|
+
self._dropDownOptionsWidget.setWidget(self._optionsWidget)
|
|
215
|
+
|
|
216
|
+
self._dropDownOptionsWidget.setSizePolicy(
|
|
213
217
|
qt.QSizePolicy.Minimum, qt.QSizePolicy.Minimum
|
|
214
218
|
)
|
|
215
219
|
self.setContentsMargins(0, 0, 0, 0)
|
|
216
220
|
self.layout().setContentsMargins(0, 0, 0, 0)
|
|
217
221
|
self.layout().setSpacing(2)
|
|
218
|
-
self.layout().addWidget(self.
|
|
222
|
+
self.layout().addWidget(self._dropDownOptionsWidget)
|
|
219
223
|
|
|
220
224
|
self.observationTable = ObservationTable(self)
|
|
221
225
|
|
|
@@ -252,11 +256,11 @@ class ProcessManagerWidget(qt.QWidget):
|
|
|
252
256
|
|
|
253
257
|
def _filterUpdated(self):
|
|
254
258
|
self.observationTable.model().process_patterns = (
|
|
255
|
-
self.
|
|
259
|
+
self._dropDownOptionsWidget.getProcessPatterns()
|
|
256
260
|
)
|
|
257
261
|
self._updateProcesses()
|
|
258
262
|
self.observationTable.model().dataset_patterns = (
|
|
259
|
-
self.
|
|
263
|
+
self._dropDownOptionsWidget.getDatasetPatterns()
|
|
260
264
|
)
|
|
261
265
|
self._updateDatasetStates()
|
|
262
266
|
|
|
@@ -451,15 +455,11 @@ class _DatasetProcessModel(qt.QAbstractTableModel):
|
|
|
451
455
|
self.layoutChanged.emit()
|
|
452
456
|
|
|
453
457
|
|
|
454
|
-
class
|
|
455
|
-
_BUTTON_ICON = qt.QStyle.SP_ToolBarVerticalExtensionButton # noqa
|
|
458
|
+
class OptionsWidget(qt.QWidget):
|
|
456
459
|
|
|
457
460
|
def __init__(self, parent):
|
|
458
461
|
super().__init__(parent)
|
|
459
462
|
self.setLayout(qt.QGridLayout())
|
|
460
|
-
# toggable button
|
|
461
|
-
self._toggleButton = qt.QPushButton("", self)
|
|
462
|
-
self.layout().addWidget(self._toggleButton, 0, 0, 1, 1)
|
|
463
463
|
|
|
464
464
|
# dataset ordering
|
|
465
465
|
self._orderingWidget = _OrderingWidget(parent=self)
|
|
@@ -473,34 +473,16 @@ class _ToggleableOptionsWidget(qt.QWidget):
|
|
|
473
473
|
self.layout().setSpacing(0)
|
|
474
474
|
self.layout().addWidget(self._filterWidget, 4, 1, 3, 3)
|
|
475
475
|
|
|
476
|
-
self._toggleButton.setSizePolicy(qt.QSizePolicy.Fixed, qt.QSizePolicy.Fixed)
|
|
477
|
-
self._setButtonIcon(show=True)
|
|
478
|
-
|
|
479
|
-
# connect signal / slot
|
|
480
|
-
self._toggleButton.clicked.connect(self._toggleFilterWidget)
|
|
481
|
-
|
|
482
|
-
# expose API
|
|
483
|
-
self.getProcessPatterns = self._filterWidget.getProcessPatterns
|
|
484
|
-
self.getDatasetPatterns = self._filterWidget.getDatasetPatterns
|
|
485
|
-
|
|
486
476
|
@property
|
|
487
477
|
def filterWidget(self):
|
|
488
478
|
return self._filterWidget
|
|
489
479
|
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
icon = qt.QIcon(pixmap)
|
|
497
|
-
self._toggleButton.setIcon(icon)
|
|
498
|
-
|
|
499
|
-
def _toggleFilterWidget(self):
|
|
500
|
-
visible = not self._filterWidget.isVisible()
|
|
501
|
-
self._setButtonIcon(show=visible)
|
|
502
|
-
self._filterWidget.setVisible(visible)
|
|
503
|
-
self._orderingWidget.setVisible(visible)
|
|
480
|
+
# expose API
|
|
481
|
+
def getProcessPatterns(self):
|
|
482
|
+
return self._filterWidget.getProcessPatterns()
|
|
483
|
+
|
|
484
|
+
def getDatasetPatterns(self):
|
|
485
|
+
return self._filterWidget.getDatasetPatterns()
|
|
504
486
|
|
|
505
487
|
|
|
506
488
|
class _FilterWidget(qt.QWidget):
|
|
@@ -21,6 +21,7 @@ processview/core/manager/manager.py
|
|
|
21
21
|
processview/core/manager/test/__init__.py
|
|
22
22
|
processview/core/manager/test/test_manager.py
|
|
23
23
|
processview/core/test/__init__.py
|
|
24
|
+
processview/gui/DropDownWidget.py
|
|
24
25
|
processview/gui/__init__.py
|
|
25
26
|
processview/gui/icons.py
|
|
26
27
|
processview/gui/messagebox.py
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{processview-1.3.3 → processview-1.4.1}/processview/resources/gui/icons/magnifying_glass.png
RENAMED
|
File without changes
|
{processview-1.3.3 → processview-1.4.1}/processview/resources/gui/icons/magnifying_glass.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|