stify">} (isStopState (currentState))
{= false;> logWidget-> addItem (QString (trUtf8 ("Досягли кінцевого стану; неприпустимо "));
}
}
MainWindow :: resetState ()
{> logWidget-> clear (); (ready)
{= 0; = 0; =
}
}
MainWindow :: on_buttonSetStates_clicked ()
{. clear ();. clear ();. clear (); (int i = 0; i lineStateSymbols-> text (). length (); i + + ) + = ui-> lineStateSymbols-> text (). at (i);
. clear (); (int i = 0; i lineInputSymbols-> text (). length (); i + +) + = ui-> lineInputSymbols-> text (). at (i);
stateList = stateSet.toList (); symbolsList = symbolsSet.toList (); (stateList); (symbolsList);
> ruleTable-> setItem (0,0, new QTableWidgetItem); str = i = 0; i
{> ruleTable-> setVerticalHeaderItem (i, new QTableWidgetItem (QString (stateList.at (i))));> meaningsTable-> setVerticalHeaderItem (i, new QTableWidgetItem (QString (stateList . at (i)))); + =
}> lineStateSymbols-> setText (str);
= "",> comboWriteSymbol-> clear ();> comboSpaceSymbol-> clear (); (int i = 0; i
{> ruleTable-> setHorizontalHeaderItem (i, new QTableWidgetItem (QString (symbolsList.at (i)))); + =
}> lineInputSymbols-> setText (str);
(int i = 0; i ruleTable-> rowCount (); i + +) (int j = 0; j ruleTable-> columnCount ( ); j + +)> ruleTable-> setItem (i, j, new QTableWidgetItem);
(int i = 0; i ruleTable-> rowCount (); i + +) (int j = 0; j ruleTable-> columnCount ( ); j + +)
{asd = ""; [0] = ui-> ruleTable-> horizontalHeaderItem (j) -> text (). at (0); [1] = QString ( "R"). at (0); [2] = ui-> ruleTable-> verticalHeaderItem (i) -> text (). at (0);> ruleTable-> item (i, j ) -> setText (asd);
} = true;> resetState ();
}
MainWindow :: on_load_triggered ()
{fileName = QFileDialog :: getOpenFileName (this, trUtf8 ("Завантажити таблицю"),
"", ("Таблиці правил (*. tbl)")); file (fileName); (! file.open (QIODevice :: ReadOnly));
stream (& file);. setVersion (QDataStream :: Qt_4_2);
> ruleTable-> clear ();. clear ();. clear (); rows, columns, posa, posc;>> rows;>> columns;> > stateSet;>> symbolsSet;>> posa;>> posc;>> endStateSet;>> allowedStateSet;
> ruleTable-> setRowCount (rows);> ruleTable-> setColumnCount (columns);
str; (int i = -1; i