bool RDMarkerWidget::CheckLimits(int value) { if(mark_lo_limit>=0) { if(value<mark_lo_limit) { mark_edit->setText(GetTimeLength(mark_value)); return false; } } if(mark_hi_limit>=0) { if(value>mark_hi_limit) { mark_edit->setText(GetTimeLength(mark_value)); return false; } } if(mark_lo_marker!=NULL) { if(value<mark_lo_marker->value()) { mark_edit->setText(GetTimeLength(mark_value)); return false; } } if(mark_hi_marker!=NULL) { if(value>mark_hi_marker->value()) { mark_edit->setText(GetTimeLength(mark_value)); return false; } } return true; }
void RDMarkerWidget::setSelected(bool state) { if(!state) { if(mark_value>=0) { mark_edit->setText(GetTimeLength(mark_value)); } } mark_button->setOn(state); mark_button->setFlashingEnabled(state); mark_edit->setReadOnly(!state); }
void RDMarkerWidget::setValue(int msecs) { if(msecs<0) { mark_value=-1; mark_edit->setText(""); } else { mark_value=msecs; mark_edit->setText(GetTimeLength(mark_value)); } }
void ArrayButton::SetKeycap() { if(button_length<0) { QPushButton::setText(""); } else { QPushButton::setText(QString().sprintf("%s\n%s", (const char *)WrapText(button_label), (const char *)GetTimeLength(button_length,true,false))); } }
void RDMarkerWidget::setValue(int msecs) { if(msecs<0) { mark_value=-1; mark_edit->setText(""); } else { if(!CheckLimits(msecs)) { return; } mark_value=msecs; mark_edit->setText(GetTimeLength(mark_value)); } emit valueChanged(); }
void RDMarkerWidget::escapePressedData() { mark_edit->setText(GetTimeLength(mark_value)); mark_edit->selectAll(); }