Logo Search packages:      
Sourcecode: qtodo version File versions  Download package

bool QTodoTimeEdit::setFocusSection ( int  sec  )  [protected, virtual]

Implements QTodoDateTimeEditBase.

Definition at line 2505 of file qtodo_datetimeedit.cpp.

References sectionText(), separator(), and valueChanged().

Referenced by addNumber().

{
      if ( sec != d->ed->focusSection() )
      {
            killTimer( d->timerId );
            d->overwrite = TRUE;
            d->typing = FALSE;
            QString txt = sectionText( sec );
            txt = txt.rightJustify( 2, QDATETIMEEDIT_HIDDEN_CHAR );
            int offset = sec*2+sec*separator().length() + txt.length();
            d->ed->setSectionSelection( sec, /*offset -*/ txt.length(), offset );
            if ( d->changed )
            {
                  emit valueChanged( time() );
                  d->changed = FALSE;
            }
      }
      return d->ed->setFocusSection( sec );
}


Generated by  Doxygen 1.6.0   Back to index