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

void QTodoDateEdit::stepUp (  )  [protected, virtual]

Implements QTodoDateTimeEditBase.

Definition at line 1445 of file qtodo_datetimeedit.cpp.

References date, outOfRange(), setDay(), setMonth(), setYear(), and valueChanged().

Referenced by init().

{
      int sec = d->ed->focusSection();
      bool accepted = FALSE;
      if ( sec == d->yearSection )
      {
            if ( !outOfRange( d->y+1, d->m, d->d ) )
            {
                  accepted = TRUE;
                  setYear( d->y+1 );
            }
      }
      else if ( sec == d->monthSection )
      {
            if ( !outOfRange( d->y, d->m+1, d->d ) )
            {
                  accepted = TRUE;
                  setMonth( d->m+1 );
            }
      }
      else if ( sec == d->daySection )
      {
            if ( !outOfRange( d->y, d->m, d->d+1 ) )
            {
                  accepted = TRUE;
                  setDay( d->d+1 );
            }
      }
      if ( accepted )
      {
            d->changed = TRUE;
            emit valueChanged( date() );
      }
      d->ed->repaint( d->ed->rect(), FALSE );
}


Generated by  Doxygen 1.6.0   Back to index