author | zecke <zecke> | 2002-04-13 16:28:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-13 16:28:40 (UTC) |
commit | 1eb54898047fab3963debe51fa3e570b361a1215 (patch) (side-by-side diff) | |
tree | 7ba017af1f2807d9710577817e4a13876900a0a7 /core/pim/todo/mainwindow.cpp | |
parent | def870c6fcccf2b20d7ce3821055391b18243a24 (diff) | |
download | opie-1eb54898047fab3963debe51fa3e570b361a1215.zip opie-1eb54898047fab3963debe51fa3e570b361a1215.tar.gz opie-1eb54898047fab3963debe51fa3e570b361a1215.tar.bz2 |
move to multiple categories + patch from Stefan Eilers to show the due date
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index f3afa5f..33f13aa 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -2,2 +2,4 @@ ** Copyright (C) 2000 Trolltech AS. All rights reserved. + Copyright (C) 2002 zecke + Copyright (C) 2002 Stefan Eilers ** @@ -109,2 +111,7 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : table->setShowCompleted( complete ); + + /* added 20.01.2k2 by se */ + bool showdeadline = config.readBoolEntry("ShowDeadLine", true); + table->setShowDeadline (showdeadline); + QString category = config.readEntry( "Category", QString::null ); @@ -176,2 +183,5 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : + /* added 20.01.2k2 by se */ + showdeadlineAction = new QAction( QString::null, tr( "Show Deadline" ), 0, this, 0, TRUE ); + catMenu->setCheckable( true ); @@ -197,2 +207,3 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : connect( completedAction, SIGNAL( toggled(bool) ), this, SLOT( showCompleted(bool) ) ); + connect( showdeadlineAction, SIGNAL( toggled(bool) ), this, SLOT( showDeadline(bool) ) ); connect( catMenu, SIGNAL(activated(int)), this, SLOT(setCategory(int)) ); @@ -353,2 +364,4 @@ void TodoWindow::populateCategories() completedAction->setOn( table->showCompleted() ); + showdeadlineAction->addTo( catMenu ); + showdeadlineAction->setOn( table->showDeadline() ); @@ -404,2 +417,4 @@ void TodoWindow::closeEvent( QCloseEvent *e ) config.writeEntry( "Category", table->showCategory() ); + /* added 20.01.2k2 by se */ + config.writeEntry( "ShowDeadLine", table->showDeadline()); } else { @@ -475 +490,9 @@ void TodoWindow::beamDone( Ir *ir ) } + +/* added 20.01.2k2 by se */ +void TodoWindow::showDeadline( bool s ) +{ + table->setPaintingEnabled( false ); + table->setShowDeadline( s ); + table->setPaintingEnabled( true ); +} |