66class RuntimeView :
public QWidget {
70 explicit RuntimeView(QWidget* parent =
nullptr);
71 ~RuntimeView()
override =
default;
76 void stepThreadRequested(nsbaci::types::ThreadID threadId);
78 void pauseRequested();
79 void resetRequested();
83 void inputProvided(
const QString& input);
87 void updateThreads(
const std::vector<ThreadInfo>& threads);
88 void updateVariables(
const std::vector<VariableInfo>& variables);
89 void updateCurrentInstruction(
const QString& instruction);
90 void updateExecutionState(
bool running,
bool halted);
93 void appendOutput(
const QString& text);
94 void requestInput(
const QString& prompt);
98 void onProgramLoaded(
const QString& programName);
99 void onProgramHalted();
102 void onStepClicked();
104 void onPauseClicked();
105 void onResetClicked();
106 void onStopClicked();
107 void onInputSubmitted();
108 void onThreadSelected(QTreeWidgetItem* item,
int column);
112 void createToolbar();
113 void createThreadPanel();
114 void createVariablePanel();
115 void createConsolePanel();
116 void applyStyleSheet();
119 QWidget* toolbar =
nullptr;
120 QToolButton* stepButton =
nullptr;
121 QToolButton* runButton =
nullptr;
122 QToolButton* pauseButton =
nullptr;
123 QToolButton* resetButton =
nullptr;
124 QToolButton* stopButton =
nullptr;
125 QLabel* statusLabel =
nullptr;
128 QTreeWidget* threadTree =
nullptr;
131 QTableWidget* variableTable =
nullptr;
134 QPlainTextEdit* consoleOutput =
nullptr;
135 QLineEdit* consoleInput =
nullptr;
136 QPushButton* inputSubmitButton =
nullptr;
137 QLabel* inputPromptLabel =
nullptr;
140 bool isRunning =
false;
141 bool isHalted =
false;
142 bool waitingForInput =
false;
143 nsbaci::types::ThreadID selectedThread = 0;