From 0c99f2087c4d5a1cab6c2bd1083d6db3f2a4cae8 Mon Sep 17 00:00:00 2001 From: zecke Date: Mon, 27 Jun 2005 17:50:15 +0000 Subject: Sort by Anniversary and Birthday Patch courtsey Marcin Juszkiewicz --- (limited to 'core/pim') diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index 5662af2..75bf474 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp @@ -116,6 +116,11 @@ void AddressBookPluginWidget::getAddress() { + QObject::tr( "Next birthdays in %1 days:" ) .arg( m_daysLookAhead ) + "
"; + + // Sort filtered results + m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortBirthday, + Opie::OPimContactAccess::FilterOff, NULL ); + for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { if ( ammount++ < m_maxLinesTask ){ // Now we want to calculate how many days @@ -168,6 +173,11 @@ void AddressBookPluginWidget::getAddress() { + QObject::tr( "Next anniversaries in %1 days:" ) .arg( m_daysLookAhead ) + "
"; + + // Sort filtered results + m_list = m_contactdb->sorted( m_list, true, Opie::OPimContactAccess::SortAnniversary, + Opie::OPimContactAccess::FilterOff, NULL ); + for ( m_it = m_list.begin(); m_it != m_list.end(); ++m_it ) { if ( ammount++ < m_maxLinesTask ){ // Now we want to calculate how many days until anniversary. -- cgit v0.9.0.2