MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / dropEvent

Method dropEvent

deeplabcut/gui/widgets.py:107–116  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

105 event.ignore()
106
107 def dropEvent(self, event):
108 for url in event.mimeData().urls():
109 path = url.toLocalFile()
110 if os.path.isfile(path):
111 self.add_item(path)
112 elif os.path.isdir(path):
113 for root, _, files in os.walk(path):
114 for file in files:
115 if not file.startswith("."):
116 self.add_item(os.path.join(root, file))
117
118
119class ItemSelectionFrame(QtWidgets.QFrame):

Callers

nothing calls this directly

Calls 1

add_itemMethod · 0.95

Tested by

no test coverage detected