summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp23
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 );
+}