Dialog for manipulation with simulation. More...
#include <automataWorkSimulator.h>
Public Slots | |
void | updateState () |
called from simulator (owner) | |
Signals | |
void | animSpeedChanged (double) |
void | closed () |
void | stepSpeedChanged (double) |
void | useAnimChanged (int) |
Public Member Functions | |
SimulationDialog (Editor *editor, AutomataWorkSimulator *simulator) | |
~SimulationDialog () | |
QString | getInput () const |
int | getInputLength () const |
Static Public Member Functions | |
static void | showMessageSetInputFailed (QWidget *parent) |
Protected Slots | |
void | appendSymbol (const QString &sybmol) |
void | play () |
void | prettyPrintChanged (int state) |
void | set () |
bool | setInput () |
void | stepForward () |
Private Attributes | |
QDoubleSpinBox * | m_animSpeed |
QPushButton * | m_btnGenerate |
QPushButton * | m_btnPause |
QPushButton * | m_btnPlay |
QPushButton * | m_btnReset |
QPushButton * | m_btnStepBack |
QPushButton * | m_btnStepFwd |
bool | m_bUsePrettyPrint |
QCheckBox * | m_checkPrettyPrint |
QCheckBox * | m_checkUseAnim |
Editor * | m_editor |
QLineEdit * | m_edtInput |
AutomataWorkSimulator * | m_simulator |
QDoubleSpinBox * | m_stepSpeed |
QTextEdit * | m_textSimulation |
Dialog for manipulation with simulation.
Definition at line 142 of file automataWorkSimulator.h.
SimulationDialog::SimulationDialog | ( | Editor * | editor, | |
AutomataWorkSimulator * | simulator | |||
) |
Definition at line 654 of file automataWorkSimulator.cpp.
References ANIM_SPEED_DEFAULT, ANIM_SPEED_MAX, ANIM_SPEED_MIN, animSpeedChanged(), closed(), m_animSpeed, m_btnGenerate, m_btnPause, m_btnPlay, m_btnReset, m_btnStepBack, m_btnStepFwd, m_checkPrettyPrint, m_checkUseAnim, m_edtInput, m_simulator, m_stepSpeed, m_textSimulation, play(), prettyPrintChanged(), SIMULATION_STEP_DEFAULT, SIMULATION_STEP_MAX, SIMULATION_STEP_MIN, stepForward(), stepSpeedChanged(), and useAnimChanged().
SimulationDialog::~SimulationDialog | ( | ) |
Definition at line 747 of file automataWorkSimulator.cpp.
References DBGLOG.
void SimulationDialog::animSpeedChanged | ( | double | _t1 | ) | [signal] |
Definition at line 242 of file moc_automataWorkSimulator.cpp.
Referenced by SimulationDialog().
void SimulationDialog::appendSymbol | ( | const QString & | sybmol | ) | [protected, slot] |
Definition at line 835 of file automataWorkSimulator.cpp.
References StringProcessor::getSymbolPrintInfo(), StringProcessor::isSpecialSymbol(), m_bUsePrettyPrint, and m_textSimulation.
Referenced by updateState().
void SimulationDialog::closed | ( | ) | [signal] |
Definition at line 222 of file moc_automataWorkSimulator.cpp.
Referenced by SimulationDialog().
QString SimulationDialog::getInput | ( | ) | const |
Definition at line 757 of file automataWorkSimulator.cpp.
References m_edtInput.
int SimulationDialog::getInputLength | ( | ) | const |
Definition at line 752 of file automataWorkSimulator.cpp.
References m_edtInput.
void SimulationDialog::play | ( | ) | [protected, slot] |
Definition at line 872 of file automataWorkSimulator.cpp.
References AutomataWorkSimulator::isSet(), m_simulator, and AutomataWorkSimulator::play().
Referenced by SimulationDialog().
void SimulationDialog::prettyPrintChanged | ( | int | state | ) | [protected, slot] |
Definition at line 857 of file automataWorkSimulator.cpp.
References m_bUsePrettyPrint, and updateState().
Referenced by SimulationDialog().
void SimulationDialog::set | ( | ) | [protected, slot] |
Definition at line 881 of file automataWorkSimulator.cpp.
References AutomataWorkSimulator::isSet(), m_simulator, setInput(), and showMessageSetInputFailed().
bool SimulationDialog::setInput | ( | ) | [protected, slot] |
Definition at line 892 of file automataWorkSimulator.cpp.
References m_edtInput, m_simulator, and AutomataWorkSimulator::setInput().
Referenced by set().
void SimulationDialog::showMessageSetInputFailed | ( | QWidget * | parent | ) | [static] |
Definition at line 900 of file automataWorkSimulator.cpp.
Referenced by AutomataWorkSimulator::generateSlideshow(), and set().
void SimulationDialog::stepForward | ( | ) | [protected, slot] |
Definition at line 863 of file automataWorkSimulator.cpp.
References AutomataWorkSimulator::isSet(), m_simulator, and AutomataWorkSimulator::stepForward().
Referenced by SimulationDialog().
void SimulationDialog::stepSpeedChanged | ( | double | _t1 | ) | [signal] |
Definition at line 235 of file moc_automataWorkSimulator.cpp.
Referenced by SimulationDialog().
void SimulationDialog::updateState | ( | ) | [slot] |
called from simulator (owner)
Definition at line 762 of file automataWorkSimulator.cpp.
References AutomataWorkSimulator::Configuration::activeStates, appendSymbol(), AutomataWorkSimulator::Configuration::eAccepted, AutomataWorkSimulator::Configuration::eError, AutomataWorkSimulator::getConfigurations(), AutomataWorkSimulator::getPos(), AutomataWorkSimulator::hasStateAfter(), AutomataWorkSimulator::hasStateBefore(), AutomataWorkSimulator::Configuration::input, AutomataWorkSimulator::isPlaying(), AutomataWorkSimulator::isSet(), m_btnPause, m_btnPlay, m_btnReset, m_btnStepBack, m_btnStepFwd, m_edtInput, m_simulator, m_textSimulation, AutomataWorkSimulator::Configuration::processed, and AutomataWorkSimulator::Configuration::status.
Referenced by prettyPrintChanged().
void SimulationDialog::useAnimChanged | ( | int | _t1 | ) | [signal] |
Definition at line 228 of file moc_automataWorkSimulator.cpp.
Referenced by SimulationDialog().
QDoubleSpinBox* SimulationDialog::m_animSpeed [private] |
Definition at line 175 of file automataWorkSimulator.h.
Referenced by SimulationDialog().
QPushButton* SimulationDialog::m_btnGenerate [private] |
Definition at line 169 of file automataWorkSimulator.h.
Referenced by SimulationDialog().
QPushButton* SimulationDialog::m_btnPause [private] |
Definition at line 166 of file automataWorkSimulator.h.
Referenced by SimulationDialog(), and updateState().
QPushButton* SimulationDialog::m_btnPlay [private] |
Definition at line 165 of file automataWorkSimulator.h.
Referenced by SimulationDialog(), and updateState().
QPushButton* SimulationDialog::m_btnReset [private] |
Definition at line 167 of file automataWorkSimulator.h.
Referenced by SimulationDialog(), and updateState().
QPushButton* SimulationDialog::m_btnStepBack [private] |
Definition at line 164 of file automataWorkSimulator.h.
Referenced by SimulationDialog(), and updateState().
QPushButton* SimulationDialog::m_btnStepFwd [private] |
Definition at line 163 of file automataWorkSimulator.h.
Referenced by SimulationDialog(), and updateState().
bool SimulationDialog::m_bUsePrettyPrint [private] |
if true, latex symbols are drawed in symbol font, otherwise is printed latex syntax (e.g. )
Definition at line 179 of file automataWorkSimulator.h.
Referenced by appendSymbol(), and prettyPrintChanged().
QCheckBox* SimulationDialog::m_checkPrettyPrint [private] |
Definition at line 177 of file automataWorkSimulator.h.
Referenced by SimulationDialog().
QCheckBox* SimulationDialog::m_checkUseAnim [private] |
Definition at line 173 of file automataWorkSimulator.h.
Referenced by SimulationDialog().
Editor* SimulationDialog::m_editor [private] |
Definition at line 158 of file automataWorkSimulator.h.
QLineEdit* SimulationDialog::m_edtInput [private] |
Definition at line 161 of file automataWorkSimulator.h.
Referenced by getInput(), getInputLength(), setInput(), SimulationDialog(), and updateState().
Definition at line 159 of file automataWorkSimulator.h.
Referenced by play(), set(), setInput(), SimulationDialog(), stepForward(), and updateState().
QDoubleSpinBox* SimulationDialog::m_stepSpeed [private] |
Definition at line 174 of file automataWorkSimulator.h.
Referenced by SimulationDialog().
QTextEdit* SimulationDialog::m_textSimulation [private] |
Definition at line 171 of file automataWorkSimulator.h.
Referenced by appendSymbol(), SimulationDialog(), and updateState().