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();
}
Exemple #3
0
void TutorialUnit::resetSetupRandom()
{
    resetSetup(true);
}
Exemple #4
0
void TutorialUnit::resetSetup()
{
    resetSetup(false);
}