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
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 | |||
@@ -1,5 +1,7 @@ | |||
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. |
5 | ** | 7 | ** |
@@ -107,6 +109,11 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
107 | config.setGroup( "View" ); | 109 | config.setGroup( "View" ); |
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 ); |
112 | 119 | ||
@@ -174,6 +181,9 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
174 | 181 | ||
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(); |
179 | 189 | ||
@@ -195,6 +205,7 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : | |||
195 | table->viewport()->setUpdatesEnabled( TRUE ); | 205 | table->viewport()->setUpdatesEnabled( TRUE ); |
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 ) ), |
200 | this, SLOT( currentEntryChanged( int, int ) ) ); | 211 | this, SLOT( currentEntryChanged( int, int ) ) ); |
@@ -351,6 +362,8 @@ void TodoWindow::populateCategories() | |||
351 | 362 | ||
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; |
356 | id = 1; | 369 | id = 1; |
@@ -402,6 +415,8 @@ void TodoWindow::closeEvent( QCloseEvent *e ) | |||
402 | config.setGroup( "View" ); | 415 | config.setGroup( "View" ); |
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"), |
407 | tr("Todo was unable\n" | 422 | tr("Todo was unable\n" |
@@ -473,3 +488,11 @@ void TodoWindow::beamDone( Ir *ir ) | |||
473 | delete ir; | 488 | delete 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 | } | ||