void PhMediaPanel::setTCType(PhTimeCodeType tcType) { onTimeCodeTypeChanged(tcType); if(_clock) _clock->setTimeCodeType(tcType); }
void PhMediaPanel::setClock(PhTimeCodeType tcType, PhClock *clock) { onTimeCodeTypeChanged(tcType); _clock = clock; if(_clock) { ui->_timecodeLabel->setText(PhTimeCode::stringFromTime(_clock->time(), tcType)); connect(_clock, &PhClock::timeChanged, this, &PhMediaPanel::onTimeChanged); connect(_clock, &PhClock::rateChanged, this, &PhMediaPanel::onRateChanged); } }
void PhMediaPanel::setClock(PhClock *clock) { _clock = clock; if(_clock) { setTCType(_clock->timeCodeType()); ui->_timecodeLabel->setText(PhTimeCode::stringFromFrame(_clock->frame(), _clock->timeCodeType())); connect(_clock, SIGNAL(frameChanged(PhFrame, PhTimeCodeType)), this, SLOT(onFrameChanged(PhFrame, PhTimeCodeType))); connect(_clock, SIGNAL(rateChanged(PhRate)), this, SLOT(onRateChanged(PhRate))); connect(_clock, SIGNAL(tcTypeChanged(PhTimeCodeType)), this, SLOT(onTimeCodeTypeChanged(PhTimeCodeType))); } }