예제 #1
0
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;
}
예제 #2
0
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);
}
예제 #3
0
void RDMarkerWidget::setValue(int msecs)
{
  if(msecs<0) {
    mark_value=-1;
    mark_edit->setText("");
  }
  else {
    mark_value=msecs;
    mark_edit->setText(GetTimeLength(mark_value));
  }
}
예제 #4
0
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)));
  }
}
예제 #5
0
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();
}
예제 #6
0
void RDMarkerWidget::escapePressedData()
{
  mark_edit->setText(GetTimeLength(mark_value));
  mark_edit->selectAll();
}