summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-23 15:17:55 (UTC)
committer harlekin <harlekin>2003-03-23 15:17:55 (UTC)
commit34d831699c7a7be4bd81cd7d7336b66b53ef78d9 (patch) (unidiff)
treeb38d3e4377bdc47e8a78c070af2ca2ac62e48d70
parentfd1b86e8590b34efb38b82953e5bf897a8de1cdf (diff)
downloadopie-34d831699c7a7be4bd81cd7d7336b66b53ef78d9.zip
opie-34d831699c7a7be4bd81cd7d7336b66b53ef78d9.tar.gz
opie-34d831699c7a7be4bd81cd7d7336b66b53ef78d9.tar.bz2
if multiple days are selected and only later is on still show all events on next days ,)
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/today/plugins/datebook/datebookpluginwidget.cpp12
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
@@ -45,6 +45,7 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name )
45 45
46 readConfig(); 46 readConfig();
47 getDates(); 47 getDates();
48 m_layoutDates->addStretch(5);
48} 49}
49 50
50DatebookPluginWidget::~DatebookPluginWidget() { 51DatebookPluginWidget::~DatebookPluginWidget() {
@@ -65,7 +66,15 @@ void DatebookPluginWidget::readConfig() {
65 66
66void DatebookPluginWidget::refresh() { 67void DatebookPluginWidget::refresh() {
67 m_eventsList.clear(); 68 m_eventsList.clear();
69
70 if ( m_layoutDates ) {
71 delete m_layoutDates;
72 }
73 m_layoutDates = new QVBoxLayout( this );
74 m_layoutDates->setAutoAdd( true );
75
68 getDates(); 76 getDates();
77 m_layoutDates->addStretch(5);
69} 78}
70 79
71/** 80/**
@@ -89,7 +98,7 @@ void DatebookPluginWidget::getDates() {
89 m_eventsList.append( l ); 98 m_eventsList.append( l );
90 l->show(); 99 l->show();
91 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); 100 QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) );
92 } else if ( QDateTime::currentDateTime() <= (*it).event().end() ) { 101 } else if ( QDateTime::currentDateTime() <= (*it).event().end() || (*it).event().start().date() != date ) {
93 count++; 102 count++;
94 // show only later appointments 103 // show only later appointments
95 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes ); 104 DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes );
@@ -113,3 +122,4 @@ void DatebookPluginWidget::getDates() {
113 } 122 }
114} 123}
115 124
125