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

void QTodoDateEdit::setDay ( int  day  )  [protected, virtual]

Sets the day to day, which must be a valid day. The function will ensure that the day set is valid for the month and year.

Definition at line 1573 of file qtodo_datetimeedit.cpp.

References outOfRange().

Referenced by setMonth(), setYear(), stepDown(), and stepUp().

{
      if ( day < 1 )
            day = 1;
      if ( day > 31 )
            day = 31;
      if ( d->m > 0 && d->y > 1752 )
      {
            while ( !QDate::isValid( d->y, d->m, day ) )
                  --day;
            if ( !outOfRange( d->y, d->m, day ) )
                  d->d = day;
      }
      else if ( d->m > 0 )
      {
            if ( day > 0 && day < 32 )
            {
                  if ( !outOfRange( d->y, d->m, day ) )
                        d->d = day;
            }
      }
      d->dayCache = d->d;
}


Generated by  Doxygen 1.6.0   Back to index