Skip to content

Commit

Permalink
improve plot context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Oct 9, 2024
1 parent 50d0803 commit ffcc6fa
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion requirements_exe_build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ isal; platform_machine == "x86_64" or platform_machine == "AMD64"
lxml
natsort
psutil
PySide6
PySide6==6.7.3
pyqtgraph
QtPy
pyqtlet2
Expand Down
1 change: 0 additions & 1 deletion src/asammdf/gui/ui/define_channel_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,3 @@ def retranslateUi(self, ComputedChannel):
"<li style=\" font-family:'MS Shell Dlg 2'; font-size:8pt;\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">the<span style=\" font-weight:700; font-style:italic;\"> t</span> argument will receive the current time stamp value</li></ul></body></html>", None))
self.sample_by_sample.setText(QCoreApplication.translate("ComputedChannel", u"sample by sample", None))
# retranslateUi

1 change: 0 additions & 1 deletion src/asammdf/gui/ui/functions_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,3 @@ def retranslateUi(self, FunctionsManager):
self.check_globals_syntax_btn.setText(QCoreApplication.translate("FunctionsManager", u"Check syntax", None))
self.tabs.setTabText(self.tabs.indexOf(self.tab_2), QCoreApplication.translate("FunctionsManager", u"Glolbal variables", None))
# retranslateUi

4 changes: 2 additions & 2 deletions src/asammdf/gui/ui/resource_rc.py
Original file line number Diff line number Diff line change
Expand Up @@ -14054,7 +14054,7 @@
\x00\x00\x08\xc0\x00\x00\x00\x00\x00\x01\x00\x03>I\
\x00\x00\x01\x90]\xc8\xe0,\
\x00\x00\x08r\x00\x00\x00\x00\x00\x01\x00\x03-\xf6\
\x00\x00\x01\x90]\xcf\xa7\xf9\
\x00\x00\x01\x91\xe9\xf2\x99\xe9\
\x00\x00\x02\x04\x00\x00\x00\x00\x00\x01\x00\x00b\x1d\
\x00\x00\x01\x90]\xc8\xe08\
\x00\x00\x01\xea\x00\x00\x00\x00\x00\x01\x00\x00_\xe4\
Expand Down Expand Up @@ -14100,7 +14100,7 @@
\x00\x00\x07\x08\x00\x00\x00\x00\x00\x01\x00\x02\xedp\
\x00\x00\x01\x90]\xc8\xe0\x0f\
\x00\x00\x03\xfc\x00\x00\x00\x00\x00\x01\x00\x01B\xba\
\x00\x00\x01\x90]\xcf\xa7\xf9\
\x00\x00\x01\x91\xe9\xf2\x99\xeb\
\x00\x00\x03.\x00\x00\x00\x00\x00\x01\x00\x01\x02V\
\x00\x00\x01\x90]\xc8\xe0L\
\x00\x00\x05\xe2\x00\x00\x00\x00\x00\x01\x00\x01\xb7\xc1\
Expand Down
40 changes: 19 additions & 21 deletions src/asammdf/gui/widgets/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ def __init__(
self.setUniformRowHeights(True)

self.details_enabled = False
self.hide_missing_channels = hide_missing_channels
self.hide_disabled_channels = hide_disabled_channels
self.hide_missing_channels = hide_missing_channels or False
self.hide_disabled_channels = hide_disabled_channels or False
self.filter_computed_channels = False
self.can_delete_items = True

Expand Down Expand Up @@ -964,18 +964,20 @@ def open_menu(self, position=None):
menu.addMenu(submenu)
submenu = QtWidgets.QMenu("Show/hide")

if self.hide_disabled_channels:
show_disabled_channels = "Show disabled items"
else:
show_disabled_channels = "Hide disabled items"
submenu.addAction(show_disabled_channels)
if self.hide_missing_channels:
show_missing_channels = "Show missing items"
else:
show_missing_channels = "Hide missing items"
submenu.addAction(show_missing_channels)
submenu.addAction("Filter only computed channels")
submenu.addAction("Un-filter computed channels")
action = QtGui.QAction("Hide disabled items", submenu)
action.setCheckable(True)
action.setChecked(self.hide_disabled_channels)
submenu.addAction(action)

action = QtGui.QAction("Hide missing items", submenu)
action.setCheckable(True)
action.setChecked(self.hide_missing_channels)
submenu.addAction(action)

action = QtGui.QAction("Filter only computed channels", submenu)
action.setCheckable(True)
action.setChecked(self.filter_computed_channels)
submenu.addAction(action)
menu.addMenu(submenu)
menu.addSeparator()

Expand Down Expand Up @@ -1268,20 +1270,16 @@ def open_menu(self, position=None):
else:
item.setCheckState(item.NameColumn, QtCore.Qt.CheckState.Checked)

elif action_text == show_disabled_channels:
elif action_text == "Hide disabled items":
self.hide_disabled_channels = not self.hide_disabled_channels
self.update_hidden_states()

elif action_text == show_missing_channels:
elif action_text == "Hide missing items":
self.hide_missing_channels = not self.hide_missing_channels
self.update_hidden_states()

elif action_text == "Filter only computed channels":
self.filter_computed_channels = True
self.update_hidden_states()

elif action_text == "Un-filter computed channels":
self.filter_computed_channels = False
self.filter_computed_channels = not self.filter_computed_channels
self.update_hidden_states()

elif action_text == "Add to common Y axis":
Expand Down
2 changes: 1 addition & 1 deletion src/asammdf/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
""" asammdf version module """

__version__ = "8.0.2.dev3"
__version__ = "8.0.2.dev4"

0 comments on commit ffcc6fa

Please sign in to comment.