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

QString QTodoDateEdit::sectionFormattedText ( int  sec  )  [protected, virtual]

Returns the formatted number for section sec. This will correspond to either the year, month or day section, depending on the current display order.

See also:
setOrder()

Implements QTodoDateTimeEditBase.

Definition at line 1281 of file qtodo_datetimeedit.cpp.

References sectionLength(), sectionOffsetEnd(), and sectionText().

{
      QString txt;
      txt = sectionText( sec );
      if ( d->typing && sec == d->ed->focusSection() )
            d->ed->setSectionSelection( sec, sectionOffsetEnd( sec ) - txt.length(),
                                        sectionOffsetEnd( sec ) );
      else
            d->ed->setSectionSelection( sec, sectionOffsetEnd( sec ) - sectionLength( sec ),
                                        sectionOffsetEnd( sec ) );
      txt = txt.rightJustify( sectionLength( sec ), QDATETIMEEDIT_HIDDEN_CHAR );
      return txt;
}


Generated by  Doxygen 1.6.0   Back to index