Skip to content

Commit

Permalink
add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
7174Andy committed Dec 16, 2024
1 parent ac6da50 commit 788e8bc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sleap/gui/dataviews.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,11 @@ def mousePressEvent(self, event) -> None:
super().mousePressEvent(event)

def show_context_menu(self, event):
"""Show context menu for VideosTableView.
Args:
event (QMouseEvent): The mouse event.
"""
menu = QtWidgets.QMenu(self)

# Add actions to the menu
Expand Down Expand Up @@ -447,6 +452,7 @@ def __init__(self, show_video_name: bool = False, *args, **kwargs):
self.update_properties()

def update_properties(self):
"""Update properties based on show_video_name attribute."""
if self.show_video_name:
self.properties = (
"filename",
Expand All @@ -460,6 +466,7 @@ def update_properties(self):
self.properties = ("filename", "frames", "height", "width", "channels")

def set_show_video_name(self, show_video_name: bool):
"""Set whether to show video name in table."""
if self.show_video_name == show_video_name:
return
self.show_video_name = show_video_name
Expand Down

0 comments on commit 788e8bc

Please sign in to comment.