MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / _generate_welcome_page

Method _generate_welcome_page

deeplabcut/gui/window.py:533–593  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

531 self.status_bar.showMessage("www.deeplabcut.org")
532
533 def _generate_welcome_page(self):
534 self.layout = QtWidgets.QVBoxLayout()
535 self.layout.setAlignment(Qt.AlignCenter | Qt.AlignTop)
536 self.layout.setSpacing(30)
537
538 title = components._create_label_widget(
539 f"Welcome to the DeepLabCut Project Manager GUI {DLC_VERSION}!",
540 "font:bold; font-size:18px;",
541 margins=(0, 30, 0, 0),
542 )
543 title.setAlignment(Qt.AlignCenter)
544 self.layout.addWidget(title)
545
546 image_widget = QtWidgets.QLabel(self)
547 image_widget.setAlignment(Qt.AlignCenter)
548 image_widget.setContentsMargins(0, 0, 0, 0)
549 logo = os.path.join(BASE_DIR, "assets", "logo_transparent.png")
550 pixmap = QtGui.QPixmap(logo)
551 image_widget.setPixmap(pixmap.scaledToHeight(400, QtCore.Qt.SmoothTransformation))
552 self.layout.addWidget(image_widget)
553 description = (
554 "DeepLabCut™ is an open source tool for markerless pose estimation of "
555 "user-defined body parts with deep learning.\n"
556 "A. and M.W. Mathis Labs | http://www.deeplabcut.org\n\n"
557 "To get started, create a new project, load an existing one, or try one "
558 "of our pretrained models from the Model Zoo."
559 )
560 label = components._create_label_widget(
561 description,
562 "font-size:12px; text-align: center;",
563 margins=(0, 0, 0, 0),
564 )
565 label.setMinimumWidth(400)
566 label.setWordWrap(True)
567 label.setAlignment(Qt.AlignCenter)
568 self.layout.addWidget(label)
569
570 self.layout_buttons = QtWidgets.QHBoxLayout()
571 self.layout_buttons.setAlignment(Qt.AlignCenter | Qt.AlignCenter)
572 self.create_project_button = QtWidgets.QPushButton("Create New Project")
573 self.create_project_button.setFixedWidth(200)
574 self.create_project_button.clicked.connect(self._create_project)
575
576 self.load_project_button = QtWidgets.QPushButton("Load Project")
577 self.load_project_button.setFixedWidth(200)
578 self.load_project_button.clicked.connect(self._open_project)
579
580 self.run_superanimal_button = QtWidgets.QPushButton("Model Zoo")
581 self.run_superanimal_button.setFixedWidth(200)
582 self.run_superanimal_button.clicked.connect(self._goto_superanimal)
583
584 self.layout_buttons.addWidget(self.create_project_button)
585 self.layout_buttons.addWidget(self.load_project_button)
586 self.layout_buttons.addWidget(self.run_superanimal_button)
587
588 self.layout.addLayout(self.layout_buttons)
589
590 widget = QWidget()

Callers 1

__init__Method · 0.95

Calls 2

check_for_updatesMethod · 0.95
connectMethod · 0.80

Tested by

no test coverage detected