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 @@ -1,6 +1,8 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. + Copyright (C) 2002 zecke + Copyright (C) 2002 Stefan Eilers ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the @@ -106,8 +108,13 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : Config config( "todo" ); config.setGroup( "View" ); bool complete = config.readBoolEntry( "ShowComplete", true ); 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 ); table->setShowCategory( category ); QPEToolBar *bar = new QPEToolBar( this ); @@ -173,8 +180,11 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : // qDebug("mainwindow #2: t=%d", t.elapsed() ); completedAction = new QAction( QString::null, tr("Completed tasks"), 0, this, 0, TRUE ); + /* added 20.01.2k2 by se */ + showdeadlineAction = new QAction( QString::null, tr( "Show Deadline" ), 0, this, 0, TRUE ); + catMenu->setCheckable( true ); populateCategories(); mb->insertItem( tr( "Task" ), edit ); @@ -194,8 +204,9 @@ TodoWindow::TodoWindow( QWidget *parent, const char *name, WFlags f = 0 ) : table->setPaintingEnabled( TRUE ); table->viewport()->setUpdatesEnabled( TRUE ); 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)) ); connect( table, SIGNAL( currentChanged( int, int ) ), this, SLOT( currentEntryChanged( int, int ) ) ); @@ -350,8 +361,10 @@ void TodoWindow::populateCategories() catMenu->clear(); completedAction->addTo( catMenu ); completedAction->setOn( table->showCompleted() ); + showdeadlineAction->addTo( catMenu ); + showdeadlineAction->setOn( table->showDeadline() ); int id, rememberId; id = 1; catMenu->insertItem( tr( "All Categories" ), id++ ); @@ -401,8 +414,10 @@ void TodoWindow::closeEvent( QCloseEvent *e ) Config config( "todo" ); config.setGroup( "View" ); config.writeEntry( "ShowComplete", table->showCompleted() ); config.writeEntry( "Category", table->showCategory() ); + /* added 20.01.2k2 by se */ + config.writeEntry( "ShowDeadLine", table->showDeadline()); } else { if ( QMessageBox::critical( this, tr("Out of space"), tr("Todo was unable\n" "to save your changes.\n" @@ -472,4 +487,12 @@ void TodoWindow::beamDone( Ir *ir ) { delete ir; unlink( beamfile ); } + +/* added 20.01.2k2 by se */ +void TodoWindow::showDeadline( bool s ) +{ + table->setPaintingEnabled( false ); + table->setShowDeadline( s ); + table->setPaintingEnabled( true ); +} |