summaryrefslogtreecommitdiff
authorskyhusker <skyhusker>2005-06-14 16:49:23 (UTC)
committer skyhusker <skyhusker>2005-06-14 16:49:23 (UTC)
commit5750c96e17ef0a2a3add50e7a20495e36dc7c4d6 (patch) (side-by-side diff)
tree3f5e978692c4d41ce514c2ceaa3a1d01bc984db2
parent7d8d317205a74bc2e23291ab4909472db6694091 (diff)
downloadopie-5750c96e17ef0a2a3add50e7a20495e36dc7c4d6.zip
opie-5750c96e17ef0a2a3add50e7a20495e36dc7c4d6.tar.gz
opie-5750c96e17ef0a2a3add50e7a20495e36dc7c4d6.tar.bz2
Fix #1635
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
index eb6d47a..781cfcf 100644
--- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
+++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp
@@ -71,71 +71,71 @@ void DatebookPluginWidget::refresh() {
m_layoutDates = new QVBoxLayout( this );
m_layoutDates->setAutoAdd( true );
getDates();
}
/**
* Get all events that are in the datebook xml file for today
*/
void DatebookPluginWidget::getDates() {
if ( db ) {
delete db;
}
db = new DateBookDB;
QDate date = QDate::currentDate();
QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) );
qBubbleSort( list );
int count = 0;
if ( list.count() > 0 ) {
for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) {
if ( count < m_max_lines_meet ) {
if ( !m_onlyLater ) {
count++;
DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine, m_maxCharClip );
m_eventsList.append( l );
l->show();
QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) );
} else {
if ( ( QDateTime::currentDateTime() <= (*it).event().end() )
// Show events which span over many days and are not elapsed.
|| ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) )
// Show repeated event for today that is not elapsed.
|| ( ( (*it).event().repeatType() != Event::NoRepeat )
&& ( ( date.dayOfWeek() == (*it).date().dayOfWeek() )
&& ( QTime::currentTime() < (*it).event().start().time() ) ) )
// Show repeated event for next days.
|| ( ( (*it).event().repeatType() != Event::NoRepeat )
&& ( date.dayOfWeek() != (*it).date().dayOfWeek() ) )
)
{
count++;
// show only later appointments
- DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine );
+ DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine, m_maxCharClip );
m_eventsList.append( l );
l->show();
QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) );
}
}
}
}
if ( m_onlyLater && count == 0 ) {
QLabel* noMoreEvents = new QLabel( this );
m_eventsList.append( noMoreEvents );
noMoreEvents->show();
noMoreEvents->setText( QObject::tr( "No more appointments today" ) );
}
} else {
QLabel* noEvents = new QLabel( this );
m_eventsList.append( noEvents );
noEvents->show();
noEvents->setText( QObject::tr( "No appointments today" ) );
}
}