TutorialGui::TutorialGui(TutorialUnit *control) : ui(new Ui::TutorialGui), mController(control) { ui->setupUi(this); connect(this, SIGNAL(resetSystem()), mController, SLOT(resetSetup()), Qt::QueuedConnection); connect(this, SIGNAL(resetSystemRandom()), mController, SLOT(resetSetupRandom()), Qt::QueuedConnection); }
TutorialUnitGui::TutorialUnitGui(TutorialUnit *control, GraphicsView *scene) : ui(new Ui::TutorialUnitGui), mController(control), mScene(scene) { ui->setupUi(this); connect(mController, SIGNAL(connectStatusChanged(bool)), SLOT(updateStatus(bool))); connect(mController, SIGNAL(positionUpdated(QPointF,qreal)), SLOT(onPositionUpdate(QPointF, qreal))); connect(this, SIGNAL(connectClicked()), mController, SLOT(acquireHardware())); connect(this, SIGNAL(disconnectClicked()), mController, SLOT(releaseHardware())); connect(this, SIGNAL(resetSystem()), mController, SLOT(resetSetup())); connect(this, SIGNAL(resetSystemRandom()), mController, SLOT(resetSetupRandom())); scene->show(); scene->hide(); }
void TutorialUnit::resetSetupRandom() { resetSetup(true); }
void TutorialUnit::resetSetup() { resetSetup(false); }