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

void QTodoDateEdit::removeFirstNumber ( int  sec  ) 

For internal use only.

Function which is called whenever the user tries to remove the first number from sec by pressing the backspace key.

Definition at line 1933 of file qtodo_datetimeedit.cpp.

{
      if ( sec == -1 )
            return;
      QString txt;
      if ( sec == d->yearSection )
      {
            txt = QString::number( d->y );
            txt = txt.mid( 1, txt.length() ) + "0";
            d->y = txt.toInt();
      }
      else if ( sec == d->monthSection )
      {
            txt = QString::number( d->m );
            txt = txt.mid( 1, txt.length() ) + "0";
            d->m = txt.toInt();
      }
      else if ( sec == d->daySection )
      {
            txt = QString::number( d->d );
            txt = txt.mid( 1, txt.length() ) + "0";
            d->d = txt.toInt();
            d->dayCache = d->d;
      }
      d->ed->repaint( d->ed->rect(), FALSE );
}


Generated by  Doxygen 1.6.0   Back to index