diff --git a/bec_widgets/applications/main_app.py b/bec_widgets/applications/main_app.py index 0d62ef29..064b076d 100644 --- a/bec_widgets/applications/main_app.py +++ b/bec_widgets/applications/main_app.py @@ -227,6 +227,34 @@ class BECMainApp(BECMainWindow): ) tour_steps.append(toggle_step) + # Register the sidebar icons + sidebar_dock_area = self.sidebar.components.get("dock_area") + if sidebar_dock_area: + dock_step = self.guided_tour.register_widget( + widget=sidebar_dock_area, + title="Dock Area View", + text="Click here to access the Dock Area view, where you can manage and arrange your dockable panels.", + ) + tour_steps.append(dock_step) + + sidebar_device_manager = self.sidebar.components.get("device_manager") + if sidebar_device_manager: + device_manager_step = self.guided_tour.register_widget( + widget=sidebar_device_manager, + title="Device Manager View", + text="Click here to open the Device Manager view, where you can view and manage device configs.", + ) + tour_steps.append(device_manager_step) + + sidebar_developer_view = self.sidebar.components.get("developer_view") + if sidebar_developer_view: + developer_view_step = self.guided_tour.register_widget( + widget=sidebar_developer_view, + title="Developer View", + text="Click here to access the Developer view to write scripts and makros.", + ) + tour_steps.append(developer_view_step) + # Register the dark mode toggle dark_mode_item = self.sidebar.components.get("dark_mode") if dark_mode_item: @@ -289,7 +317,7 @@ class BECMainApp(BECMainWindow): nav_step = self.guided_tour.register_widget( widget=nav_item, title=view_tour.view_title, - text=f"Navigate to the {view_tour.view_title} to access its features and functionality.", + text=f"Let's explore the features of the {view_tour.view_title}.", ) tour_steps.append(nav_step) tour_steps.extend(view_tour.step_ids) diff --git a/bec_widgets/applications/views/developer_view/developer_view.py b/bec_widgets/applications/views/developer_view/developer_view.py index aef9a8e3..9a135dbb 100644 --- a/bec_widgets/applications/views/developer_view/developer_view.py +++ b/bec_widgets/applications/views/developer_view/developer_view.py @@ -94,7 +94,7 @@ class DeveloperView(ViewBase): ) step_ids.append(step_id) - return ViewTourSteps(view_title="Integrated Development Environment", step_ids=step_ids) + return ViewTourSteps(view_title="Developer View", step_ids=step_ids) if __name__ == "__main__": diff --git a/bec_widgets/utils/guided_tour.py b/bec_widgets/utils/guided_tour.py index 880d9e8b..f38e9903 100644 --- a/bec_widgets/utils/guided_tour.py +++ b/bec_widgets/utils/guided_tour.py @@ -106,10 +106,12 @@ class TutorialOverlay(QWidget): # Back button with material icon self.back_btn = QPushButton("Back") self.back_btn.setIcon(material_icon("arrow_back")) + self.back_btn.setToolTip("Press Backspace to go back") # Next button with material icon self.next_btn = QPushButton("Next") self.next_btn.setIcon(material_icon("arrow_forward")) + self.next_btn.setToolTip("Press Enter to continue") btn_layout.addStretch() btn_layout.addWidget(self.back_btn) @@ -121,6 +123,11 @@ class TutorialOverlay(QWidget): # Escape closes the tour QShortcut(QKeySequence(Qt.Key.Key_Escape), self, activated=self.close_btn.click) + # Enter and Return activates the next button + QShortcut(QKeySequence(Qt.Key.Key_Return), self, activated=self.next_btn.click) + QShortcut(QKeySequence(Qt.Key.Key_Enter), self, activated=self.next_btn.click) + # Map Backspace to the back button + QShortcut(QKeySequence(Qt.Key.Key_Backspace), self, activated=self.back_btn.click) return box