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

int QTodoDateEdit::sectionOffsetEnd ( int  sec  )  const [private]

For internal use only.

Returns the end of the section offset sec.

Definition at line 1354 of file qtodo_datetimeedit.cpp.

References sectionLength(), and separator().

Referenced by sectionFormattedText().

{
      if ( sec == d->yearSection )
      {
            switch( d->ord )
            {
            case DMY:
            case MDY:
                  return sectionOffsetEnd( sec-1) + separator().length() + sectionLength( sec );
            case YMD:
            case YDM:
                  return sectionLength( sec );
            }
      }
      else if ( sec == d->monthSection )
      {
            switch( d->ord )
            {
            case DMY:
            case YDM:
            case YMD:
                  return sectionOffsetEnd( sec-1) + separator().length() + sectionLength( sec );
            case MDY:
                  return sectionLength( sec );
            }
      }
      else if ( sec == d->daySection )
      {
            switch( d->ord )
            {
            case DMY:
                  return sectionLength( sec );
            case YMD:
            case MDY:
            case YDM:
                  return sectionOffsetEnd( sec-1 ) + separator().length() + sectionLength( sec );
            }
      }
      return 0;
}


Generated by  Doxygen 1.6.0   Back to index