From 34d831699c7a7be4bd81cd7d7336b66b53ef78d9 Mon Sep 17 00:00:00 2001 From: harlekin Date: Sun, 23 Mar 2003 15:17:55 +0000 Subject: if multiple days are selected and only later is on still show all events on next days ,) --- diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp index 896d41d..781e3a4 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp @@ -45,6 +45,7 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name ) readConfig(); getDates(); + m_layoutDates->addStretch(5); } DatebookPluginWidget::~DatebookPluginWidget() { @@ -65,7 +66,15 @@ void DatebookPluginWidget::readConfig() { void DatebookPluginWidget::refresh() { m_eventsList.clear(); + + if ( m_layoutDates ) { + delete m_layoutDates; + } + m_layoutDates = new QVBoxLayout( this ); + m_layoutDates->setAutoAdd( true ); + getDates(); + m_layoutDates->addStretch(5); } /** @@ -89,7 +98,7 @@ void DatebookPluginWidget::getDates() { 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() ) { + } else if ( QDateTime::currentDateTime() <= (*it).event().end() || (*it).event().start().date() != date ) { count++; // show only later appointments DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes ); @@ -113,3 +122,4 @@ void DatebookPluginWidget::getDates() { } } + -- cgit v0.9.0.2