summaryrefslogtreecommitdiff
authorzecke <zecke>2002-11-15 10:01:40 (UTC)
committer zecke <zecke>2002-11-15 10:01:40 (UTC)
commit39f256de174af80fd8ba2560e8586dda99d06b7d (patch) (side-by-side diff)
treed03da9996c67044b5593bae5726231214535dafc
parentec92de66e81b145119ff15bea0ad88436eb7bd4b (diff)
downloadopie-39f256de174af80fd8ba2560e8586dda99d06b7d.zip
opie-39f256de174af80fd8ba2560e8586dda99d06b7d.tar.gz
opie-39f256de174af80fd8ba2560e8586dda99d06b7d.tar.bz2
Fix the DueDate button not beeing enabled when it should
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/taskeditoroverviewimpl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/pim/todo/taskeditoroverviewimpl.cpp b/core/pim/todo/taskeditoroverviewimpl.cpp
index c10ad40..24b3386 100644
--- a/core/pim/todo/taskeditoroverviewimpl.cpp
+++ b/core/pim/todo/taskeditoroverviewimpl.cpp
@@ -1,112 +1,113 @@
#include <qapplication.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qpopupmenu.h>
#include <qpe/datebookmonth.h>
#include <qpe/categoryselect.h>
#include <qpe/timestring.h>
#include "taskeditoroverviewimpl.h"
/*
* we need to hack
*/
TaskEditorOverViewImpl::TaskEditorOverViewImpl( QWidget* parent, const char* name )
: TaskEditorOverView( parent, name ) {
init();
}
TaskEditorOverViewImpl::~TaskEditorOverViewImpl() {
}
void TaskEditorOverViewImpl::load( const OTodo& todo) {
/*
* now that we're 'preloaded' we
* need to disable the buttons
* holding the dat
*/
btnDue-> setEnabled( FALSE );
btnComp-> setEnabled( FALSE );
btnStart->setEnabled( FALSE );
QDate date = QDate::currentDate();
QString str = TimeString::longDateString( date );
emit recurranceEnabled( FALSE );
ckbStart->setChecked( FALSE );
btnStart->setText( str );
ckbComp->setChecked( FALSE );
btnComp->setText( str );
cmbProgress->setCurrentItem( todo.progress()/20 );
cmbSum->insertItem( todo.summary(), 0 );
cmbSum->setCurrentItem( 0 );
ckbDue->setChecked( todo.hasDueDate() );
btnDue->setText( TimeString::longDateString( todo.dueDate() ) );
+ btnDue->setEnabled( todo.hasDueDate() );
cmbPrio->setCurrentItem( todo.priority() -1 );
ckbCompleted->setChecked( todo.isCompleted() );
comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") );
}
void TaskEditorOverViewImpl::save( OTodo& to) {
qWarning("save it now");
if ( ckbDue->isChecked() ) {
to.setDueDate( m_due );
to.setHasDueDate( true );
}else
to.setHasDueDate( false );
if ( comboCategory->currentCategory() != -1 ) {
QArray<int> arr = comboCategory->currentCategories();
to.setCategories( arr );
}
to.setPriority( cmbPrio->currentItem() + 1 );
to.setCompleted( ckbCompleted->isChecked() );
to.setSummary( cmbSum->currentText() );
to.setProgress( cmbProgress->currentItem() * 20 );
}
/*
* here we will init the basic view
* one Popup for each Date Button
* and some other signal and slots connection
*/
void TaskEditorOverViewImpl::init() {
QDate curDate = QDate::currentDate();
m_start = m_comp = m_due = curDate;
QString str = TimeString::longDateString( curDate );
/* Start Date Picker */
m_startPop = new QPopupMenu(this);
m_startBook = new DateBookMonth(m_startPop, 0, TRUE );
m_startPop->insertItem( m_startBook );
connect( m_startBook, SIGNAL( dateClicked(int, int, int) ),
this, SLOT(slotStartChanged(int, int, int) ) );
/* Due Date Picker */
m_duePop = new QPopupMenu(this);
m_dueBook = new DateBookMonth(m_duePop, 0, TRUE );
m_duePop->insertItem( m_dueBook );
connect( m_dueBook, SIGNAL( dateClicked(int, int, int) ),
this, SLOT(slotDueChanged(int, int, int) ) );
m_compPop = new QPopupMenu(this);
m_compBook = new DateBookMonth(m_compPop, 0, TRUE );
m_compPop->insertItem(m_compBook );
connect( m_compBook, SIGNAL(dateClicked(int, int, int) ),
this, SLOT(slotCompletedChanged(int, int, int) ) );
/*
* another part of the hack
* it's deprecated in Qt2 but
* still available in my qt-copy of Qt3.1beta2
*/
btnDue->setIsMenuButton( TRUE );
btnStart->setIsMenuButton( TRUE );