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

Function create_execution_control_widget

src/ui/utils/ui_utils.py:126–223  ·  view source on GitHub ↗

Create the execution mode and control widget.

(mode_changed_callback, button_clicked_callback)

Source from the content-addressed store, hash-verified

124
125
126def create_execution_control_widget(mode_changed_callback, button_clicked_callback):
127 """Create the execution mode and control widget."""
128 # Container widget
129 exec_widget = QWidget()
130 layout = QHBoxLayout(exec_widget)
131 layout.setContentsMargins(10, 5, 10, 5)
132 layout.setSpacing(15)
133
134 # Mode selection label
135 mode_label = QLabel("Execution Mode:")
136 mode_label.setStyleSheet("font-weight: bold; color: #E0E0E0;")
137 layout.addWidget(mode_label)
138
139 # Radio buttons for mode selection
140 mode_button_group = QButtonGroup()
141
142 batch_radio = QRadioButton("Batch")
143 batch_radio.setToolTip("Traditional one-shot execution of entire graph")
144 batch_radio.setChecked(True) # Default mode
145 batch_radio.setStyleSheet("""
146 QRadioButton {
147 color: #E0E0E0;
148 font-weight: bold;
149 spacing: 8px;
150 }
151 QRadioButton::indicator {
152 width: 16px;
153 height: 16px;
154 border-radius: 8px;
155 border: 2px solid #666;
156 background-color: transparent;
157 }
158 QRadioButton::indicator:checked {
159 background-color: #4CAF50;
160 border: 2px solid #4CAF50;
161 }
162 QRadioButton::indicator:hover {
163 border: 2px solid #888;
164 }
165 """)
166
167 live_radio = QRadioButton("Live")
168 live_radio.setToolTip("Interactive mode with event-driven execution")
169 live_radio.setStyleSheet("""
170 QRadioButton {
171 color: #E0E0E0;
172 font-weight: bold;
173 spacing: 8px;
174 }
175 QRadioButton::indicator {
176 width: 16px;
177 height: 16px;
178 border-radius: 8px;
179 border: 2px solid #666;
180 background-color: transparent;
181 }
182 QRadioButton::indicator:checked {
183 background-color: #FF9800;

Callers 1

_create_toolbarMethod · 0.90

Calls 1

get_button_styleMethod · 0.80

Tested by

no test coverage detected