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

Method create_actions

deeplabcut/gui/window.py:601–645  ·  view source on GitHub ↗
(self, names)

Source from the content-addressed store, hash-verified

599 self.loc_default = str(Path.home())
600
601 def create_actions(self, names):
602 # Creating action using the first constructor
603 self.newAction = QAction(self)
604 self.newAction.setText("&New Project...")
605
606 self.newAction.setIcon(QIcon(os.path.join(BASE_DIR, "assets", "icons", names[0])))
607 self.newAction.setShortcut("Ctrl+N")
608 self.newAction.setStatusTip("Create a new project...")
609
610 self.newAction.triggered.connect(self._create_project)
611
612 # Creating actions using the second constructor
613 self.openAction = QAction("&Open...", self)
614 self.openAction.setIcon(QIcon(os.path.join(BASE_DIR, "assets", "icons", names[1])))
615 self.openAction.setShortcut("Ctrl+O")
616 self.openAction.setStatusTip("Open a project...")
617 self.openAction.triggered.connect(self._open_project)
618
619 self.saveAction = QAction("&Save", self)
620 self.exitAction = QAction("&Exit", self)
621
622 self.lightmodeAction = QAction("&Light theme", self)
623 self.lightmodeAction.triggered.connect(self.lightmode)
624 self.darkmodeAction = QAction("&Dark theme", self)
625 self.darkmodeAction.triggered.connect(self.darkmode)
626
627 self.helpAction = QAction("&Help", self)
628 self.helpAction.setIcon(QIcon(os.path.join(BASE_DIR, "assets", "icons", names[2])))
629 self.helpAction.setStatusTip("Ask for help...")
630 self.helpAction.triggered.connect(self._ask_for_help)
631
632 self.aboutAction = QAction("&Learn DLC", self)
633 self.aboutAction.triggered.connect(self._learn_dlc)
634
635 self.check_updates = QAction("&Check for Updates...", self)
636 self.check_updates.triggered.connect(lambda: self.check_for_updates(silent=False))
637
638 self.buildDebugLogAction = create_generate_debug_log_action(
639 parent=self,
640 recorder=self._debug_recorder,
641 logger_name="deeplabcut",
642 include_module_paths=False,
643 include_executable_paths=True,
644 log_limit=1000,
645 )
646
647 def create_menu_bar(self):
648 menu_bar = self.menuBar()

Callers 3

__init__Method · 0.95
darkmodeMethod · 0.95
lightmodeMethod · 0.95

Calls 3

check_for_updatesMethod · 0.95
connectMethod · 0.80

Tested by

no test coverage detected