-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginwidget.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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 @@ -46,4 +46,5 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name ) readConfig(); getDates(); + m_layoutDates->addStretch(5); } @@ -66,5 +67,13 @@ 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); } @@ -90,5 +99,5 @@ void DatebookPluginWidget::getDates() { 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 @@ -114,2 +123,3 @@ void DatebookPluginWidget::getDates() { } + |