TabWidget::TabWidget(QWidget *parent) : QTabWidget(parent), ui(new Ui::TabWidget) { ui->setupUi(this); QObject::connect(&_traductor,SIGNAL(consoleChanged(QString)),ui->console,SLOT(appendHtml(QString))); QObject::connect(&_traductor,SIGNAL(proteineDecrypted(QString)),ui->plainTextEdit,SLOT(appendHtml(QString))); QObject::connect(&_reverseTraductor,SIGNAL(chainDecrypted(QString)),ui->plainTextEdit,SLOT(appendHtml(QString))); QObject::connect(&_traductor,SIGNAL(startTimer()),this,SLOT(timerLaunched())); QObject::connect(&_traductor,SIGNAL(stopTimer()),this,SLOT(timerStoped())); QObject::connect(&_reverseTraductor,SIGNAL(startTimer()),this,SLOT(timerLaunched())); QObject::connect(&_reverseTraductor,SIGNAL(stopTimer()),this,SLOT(timerStoped())); QObject::connect(&_reverseTraductor,SIGNAL(consoleChanged(QString)),ui->console,SLOT(appendHtml(QString))); _notepad=false; }
void Timer::stop() { if(mThreaded) { mThread->terminate(); } else { disconnect(Root::getInstance().getStateManager(), SIGNAL(beginFrame(double)), this, SLOT(updateTimeLeft(double))); mTimeLeft = mInterval; // reset } emit timerStoped(); }