author | zecke <zecke> | 2002-04-13 16:28:40 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-04-13 16:28:40 (UTC) |
commit | 1eb54898047fab3963debe51fa3e570b361a1215 (patch) (unidiff) | |
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
-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 | |||
@@ -1,4 +1,6 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | Copyright (C) 2002 zecke | ||
4 | Copyright (C) 2002 Stefan Eilers | ||
3 | ** | 5 | ** |
4 | ** This file is part of Qtopia Environment. | 6 | ** This file is part of Qtopia Environment. |
@@ -108,4 +110,9 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
108 | bool complete = config.readBoolEntry( "ShowComplete", true ); | 110 | bool complete = config.readBoolEntry( "ShowComplete", true ); |
109 | table->setShowCompleted( complete ); | 111 | table->setShowCompleted( complete ); |
112 | |||
113 | /* added 20.01.2k2 by se */ | ||
114 | bool showdeadline = config.readBoolEntry("ShowDeadLine", true); | ||
115 | table->setShowDeadline (showdeadline); | ||
116 | |||
110 | QString category = config.readEntry( "Category", QString::null ); | 117 | QString category = config.readEntry( "Category", QString::null ); |
111 | table->setShowCategory( category ); | 118 | table->setShowCategory( category ); |
@@ -175,4 +182,7 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
175 | completedAction = new QAction( QString::null, tr("Completed tasks"), 0, this, 0, TRUE ); | 182 | completedAction = new QAction( QString::null, tr("Completed tasks"), 0, this, 0, TRUE ); |
176 | 183 | ||
184 | /* added 20.01.2k2 by se */ | ||
185 | showdeadlineAction = new QAction( QString::null, tr( "Show Deadline" ), 0, this, 0, TRUE ); | ||
186 | |||
177 | catMenu->setCheckable( true ); | 187 | catMenu->setCheckable( true ); |
178 | populateCategories(); | 188 | populateCategories(); |
@@ -196,4 +206,5 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
196 | 206 | ||
197 | connect( completedAction, SIGNAL( toggled(bool) ), this, SLOT( showCompleted(bool) ) ); | 207 | connect( completedAction, SIGNAL( toggled(bool) ), this, SLOT( showCompleted(bool) ) ); |
208 | connect( showdeadlineAction, SIGNAL( toggled(bool) ), this, SLOT( showDeadline(bool) ) ); | ||
198 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(setCategory(int)) ); | 209 | connect( catMenu, SIGNAL(activated(int)), this, SLOT(setCategory(int)) ); |
199 | connect( table, SIGNAL( currentChanged( int, int ) ), | 210 | connect( table, SIGNAL( currentChanged( int, int ) ), |
@@ -352,4 +363,6 @@ void TodoWindow::populateCategories() | |||
352 | completedAction->addTo( catMenu ); | 363 | completedAction->addTo( catMenu ); |
353 | completedAction->setOn( table->showCompleted() ); | 364 | completedAction->setOn( table->showCompleted() ); |
365 | showdeadlineAction->addTo( catMenu ); | ||
366 | showdeadlineAction->setOn( table->showDeadline() ); | ||
354 | 367 | ||
355 | int id, rememberId; | 368 | int id, rememberId; |
@@ -403,4 +416,6 @@ void TodoWindow::closeEvent( QCloseEvent *e ) | |||
403 | config.writeEntry( "ShowComplete", table->showCompleted() ); | 416 | config.writeEntry( "ShowComplete", table->showCompleted() ); |
404 | config.writeEntry( "Category", table->showCategory() ); | 417 | config.writeEntry( "Category", table->showCategory() ); |
418 | /* added 20.01.2k2 by se */ | ||
419 | config.writeEntry( "ShowDeadLine", table->showDeadline()); | ||
405 | } else { | 420 | } else { |
406 | if ( QMessageBox::critical( this, tr("Out of space"), | 421 | if ( QMessageBox::critical( this, tr("Out of space"), |
@@ -474,2 +489,10 @@ void TodoWindow::beamDone( Ir *ir ) | |||
474 | unlink( beamfile ); | 489 | unlink( beamfile ); |
475 | } | 490 | } |
491 | |||
492 | /* added 20.01.2k2 by se */ | ||
493 | void TodoWindow::showDeadline( bool s ) | ||
494 | { | ||
495 | table->setPaintingEnabled( false ); | ||
496 | table->setShowDeadline( s ); | ||
497 | table->setPaintingEnabled( true ); | ||
498 | } | ||