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

bool QTodoDateEdit::event ( QEvent *  e  )  [protected]

Definition at line 1891 of file qtodo_datetimeedit.cpp.

References fix(), and valueChanged().

{
      if( e->type() == QEvent::FocusOut )
      {
            d->typing = FALSE;
            fix();
            // the following can't be done in fix() because fix() called
            // from all over the place and it will break the old behaviour
            if ( !QDate::isValid( d->y, d->m, d->d ) )
            {
                  d->dayCache = d->d;
                  int i = d->d;
                  for ( ; i > 0; i-- )
                  {
                        d->d = i;
                        if ( QDate::isValid( d->y, d->m, d->d ) )
                              break;
                  }
                  d->changed = TRUE;
            }
            if ( d->changed )
            {
                  emit valueChanged( date() );
                  d->changed = FALSE;
            }
      }
      else if ( e->type() == QEvent::LocaleChange )
      {
            readLocaleSettings();
            d->ed->setSeparator( localDateSep() );
            setOrder( localOrder() );
      }
      return QTodoDateTimeEditBase::event( e );
}


Generated by  Doxygen 1.6.0   Back to index