21 #include <tdeabc/field.h>
27 NameSortMode::NameSortMode()
28 : mNameType( FormattedName ), mAscendingOrder( true ), d( 0 )
30 mNameType = FormattedName;
33 NameSortMode::NameSortMode( NameType type,
bool ascending )
34 : mNameType( type ), mAscendingOrder( ascending ), d( 0 )
42 switch ( mNameType ) {
44 lesser = TQString::localeAwareCompare( first.formattedName(), second.formattedName() ) < 0;
47 lesser = TQString::localeAwareCompare( first.familyName(), second.familyName() ) < 0;
50 lesser = TQString::localeAwareCompare( first.givenName(), second.givenName() ) < 0;
57 if ( !mAscendingOrder )
63 FieldSortMode::FieldSortMode( TDEABC::Field *field,
bool ascending )
64 : mField( field ), mAscendingOrder( ascending ), d( 0 )
73 bool lesser = TQString::localeAwareCompare( mField->value( first ), mField->value( second ) ) < 0;
74 if ( !mAscendingOrder )
static data, shared by ALL addressee objects