(self, names)
| 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() |
no test coverage detected