MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / _create_toolbar

Method _create_toolbar

src/ui/editor/node_editor_window.py:190–217  ·  view source on GitHub ↗

Create the main toolbar.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers 1

_setup_uiMethod · 0.95

Calls 1

Tested by

no test coverage detected