Dialog for filling and submitting an LL(1) parsing table.
More...
#include <lltabledialog.h>
|
void | submitted (const QVector< QVector< QString > > &data) |
| Signal emitted when the user submits the table.
|
|
|
| LLTableDialog (const QStringList &rowHeaders, const QStringList &colHeaders, QWidget *parent, QVector< QVector< QString > > *initialData=nullptr) |
| Constructs the LL(1) table dialog with given headers and optional initial data.
|
|
QVector< QVector< QString > > | getTableData () const |
| Returns the contents of the table filled by the user.
|
|
void | setInitialData (const QVector< QVector< QString > > &data) |
| Pre-fills the table with existing user data.
|
|
void | highlightIncorrectCells (const QList< QPair< int, int > > &coords) |
| Highlights cells that are incorrect based on provided coordinates.
|
|
Dialog for filling and submitting an LL(1) parsing table.
This class represents a dialog window that displays a table for users to complete the LL(1) parsing matrix. It provides functionality to initialize the table with data, retrieve the user's input, and highlight incorrect answers.
◆ LLTableDialog()
LLTableDialog::LLTableDialog |
( |
const QStringList & | rowHeaders, |
|
|
const QStringList & | colHeaders, |
|
|
QWidget * | parent, |
|
|
QVector< QVector< QString > > * | initialData = nullptr ) |
Constructs the LL(1) table dialog with given headers and optional initial data.
- Parameters
-
rowHeaders | Row labels (non-terminal symbols). |
colHeaders | Column labels (terminal symbols). |
parent | Parent widget. |
initialData | Optional initial table data to pre-fill cells. |
◆ getTableData()
QVector< QVector< QString > > LLTableDialog::getTableData |
( |
| ) |
const |
Returns the contents of the table filled by the user.
- Returns
- A 2D vector representing the LL(1) table.
◆ highlightIncorrectCells()
void LLTableDialog::highlightIncorrectCells |
( |
const QList< QPair< int, int > > & | coords | ) |
|
Highlights cells that are incorrect based on provided coordinates.
- Parameters
-
coords | A list of (row, column) pairs to highlight as incorrect. |
◆ setInitialData()
void LLTableDialog::setInitialData |
( |
const QVector< QVector< QString > > & | data | ) |
|
Pre-fills the table with existing user data.
This is used to populate the table with a previous (possibly incorrect) answer when retrying a task or providing feedback.
- Parameters
-
data | A 2D vector of strings representing the initial cell values. |
◆ submitted
void LLTableDialog::submitted |
( |
const QVector< QVector< QString > > & | data | ) |
|
|
signal |
Signal emitted when the user submits the table.
- Parameters
-
data | The filled table data submitted by the user. |
The documentation for this class was generated from the following files: