void TextPatternEntity::updateCurrent(sf::Time delta_time, const sf::Color& color) { // Comprobamos si tenemos que actualizar fecha y hora para esta entidad if (m_has_miscelaneous) { // Solo forzamos el parseo de la cadena si cambiĆ³ algo de la fecha-hora m_need_parse = updateDateTime() ? true : m_need_parse; } if (m_need_parse) { TextEntity::setString(parsePattern()); m_need_parse = false; } }
void CWinMainView::setConnexion() { QTimer *m_timer = new QTimer(this); connect(m_timer, SIGNAL(timeout()), this, SLOT(updateDateTime())); m_timer->start(1000); //Bt onglet principale connect(m_btPlayPause, SIGNAL(clicked()), m_pControler, SLOT(btPlayPausePressed())); connect(m_btStop, SIGNAL(clicked()), m_pControler, SLOT(btStopPressed())); connect(m_btStopEndCycle, SIGNAL(clicked()), m_pControler, SLOT(btStopEndCylePressed())); connect(m_btNext, SIGNAL(clicked()), m_pControler, SLOT(btNextPressed())); connect(m_btAlarm, SIGNAL(clicked()), m_pControler, SLOT(btAlarmPressed())); CPushButton* btTmp; foreach(btTmp, m_listBtDetail) { connect(btTmp, SIGNAL(clicked(int)), m_pControler, SLOT(btDetailPressed(int))); }
ExamControl::ExamControl() { setupUi(this); mode = EXAMING; tableWidget_student->verticalHeader()->setHidden(true); tableWidget_student->setSelectionBehavior(QAbstractItemView::SelectRows); tableWidget_student->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); dateTimeEdit->setDateTime(QDateTime::currentDateTime()); _countTimer = new QTimer(this); _dateTimer = new QTimer(this); connect(_countTimer, SIGNAL(timeout()), this, SLOT(updateCountTime())); connect(_dateTimer, SIGNAL(timeout()), this, SLOT(updateDateTime())); _dateTimer->start(1000); pushButton_pause->setEnabled(false); pushButton_continue->setEnabled(false); pushButton_end->setEnabled(false); }