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

void QTodoTimeEdit::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 2809 of file qtodo_datetimeedit.cpp.

{
      if ( sec == -1 )
            return;
      sec = d->ed->mapSection( sec );
      QString txt;
      switch( sec )
      {
      case 0:
            txt = QString::number( d->h );
            break;
      case 1:
            txt = QString::number( d->m );
            break;
      case 2:
            txt = QString::number( d->s );
            break;
      }
      txt = txt.mid( 1, txt.length() ) + "0";
      switch( sec )
      {
      case 0:
            d->h = txt.toInt();
            break;
      case 1:
            d->m = txt.toInt();
            break;
      case 2:
            d->s = txt.toInt();
            break;
      }
      d->ed->repaint( d->ed->rect(), FALSE );
}


Generated by  Doxygen 1.6.0   Back to index