Diffstat (limited to 'core/pim/today/plugins/datebook/datebookpluginwidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/datebook/datebookpluginwidget.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp index a8ce059..c6aa2a6 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp @@ -38,46 +38,47 @@ DatebookPluginWidget::DatebookPluginWidget( QWidget *parent, const char* name) DatebookPluginWidget::~DatebookPluginWidget() { delete db; } void DatebookPluginWidget::readConfig() { Config cfg( "todaydatebookplugin" ); cfg.setGroup( "config" ); m_max_lines_meet = cfg.readNumEntry( "maxlinesmeet", 5 ); m_show_location = cfg.readNumEntry( "showlocation", 1 ); m_show_notes = cfg.readNumEntry( "shownotes", 0 ); m_onlyLater = cfg.readNumEntry( "onlylater", 1 ); + m_moreDays = cfg.readNumEntry( "moredays", 0 ); } /** * Get all events that are in the datebook xml file for today */ void DatebookPluginWidget::getDates() { QDate date = QDate::currentDate(); QVBoxLayout* layoutDates = new QVBoxLayout( this ); layoutDates->setSpacing( 1 ); layoutDates->setMargin( 1 ); if ( db ) { delete db; } db = new DateBookDB; - QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date ); + QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) ); qBubbleSort( list ); Config config( "qpe" ); int count=0; if ( list.count() > 0 ) { for ( QValueList<EffectiveEvent>::ConstIterator it=list.begin(); it!=list.end(); ++it ) { if ( count <= m_max_lines_meet ) { |