Create the main toolbar.
(self)
| 188 | env_menu.addAction(self.action_manage_env) |
| 189 | |
| 190 | def _create_toolbar(self): |
| 191 | """Create the main toolbar.""" |
| 192 | toolbar = QToolBar("Main Toolbar") |
| 193 | self.addToolBar(toolbar) |
| 194 | |
| 195 | # File operations |
| 196 | toolbar.addAction(self.action_new) |
| 197 | toolbar.addAction(self.action_load) |
| 198 | toolbar.addAction(self.action_save) |
| 199 | toolbar.addAction(self.action_save_as) |
| 200 | toolbar.addSeparator() |
| 201 | |
| 202 | # Edit operations (undo/redo) |
| 203 | toolbar.addAction(self.action_undo) |
| 204 | toolbar.addAction(self.action_redo) |
| 205 | toolbar.addSeparator() |
| 206 | |
| 207 | # Add spacer to push execution controls to the right |
| 208 | spacer = QWidget() |
| 209 | spacer.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred) |
| 210 | toolbar.addWidget(spacer) |
| 211 | |
| 212 | # Create execution control widget (right-aligned) |
| 213 | self.exec_widget = create_execution_control_widget( |
| 214 | self._on_mode_changed, |
| 215 | self._on_main_button_clicked |
| 216 | ) |
| 217 | toolbar.addWidget(self.exec_widget) |
| 218 | |
| 219 | def _on_mode_changed(self, mode_id): |
| 220 | """Handle execution mode changes.""" |
no test coverage detected