summaryrefslogtreecommitdiff
authorzecke <zecke>2002-06-27 12:46:06 (UTC)
committer zecke <zecke>2002-06-27 12:46:06 (UTC)
commit88b644d1c106008fc15f6a3c496e40296e9029d4 (patch) (side-by-side diff)
tree73a1575085426283df714f374862a1d1a7ac42d1
parent475c11d442a03d8e53b220923626c4bb7350831f (diff)
downloadopie-88b644d1c106008fc15f6a3c496e40296e9029d4.zip
opie-88b644d1c106008fc15f6a3c496e40296e9029d4.tar.gz
opie-88b644d1c106008fc15f6a3c496e40296e9029d4.tar.bz2
Fix for #82
setMargin(2);
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/todoentryimpl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/todo/todoentryimpl.cpp b/core/pim/todo/todoentryimpl.cpp
index 89f08e0..af47665 100644
--- a/core/pim/todo/todoentryimpl.cpp
+++ b/core/pim/todo/todoentryimpl.cpp
@@ -47,97 +47,97 @@
NewTaskDialog::NewTaskDialog( const ToDoEvent& task, QWidget *parent,
const char *name, bool modal, WFlags fl )
: NewTaskDialogBase( parent, name, modal, fl ),
todo( task )
{
todo.setCategories( task.allCategories() );
if ( todo.hasDate() )
date = todo.date();
else
date = QDate::currentDate();
init();
comboPriority->setCurrentItem( task.priority() - 1 );
checkCompleted->setChecked( task.isCompleted() );
checkDate->setChecked( task.hasDate() );
buttonDate->setText( TimeString::longDateString( date ) );
txtTodo->setText( task.description() );
lneSum->setText( task.summary() );
cmbProg->setCurrentItem( task.progress()/20 );
}
/*
* Constructs a NewTaskDialog which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
NewTaskDialog::NewTaskDialog( int id, QWidget* parent, const char* name, bool modal,
WFlags fl )
: NewTaskDialogBase( parent, name, modal, fl ),
date( QDate::currentDate() )
{
if ( id != -1 ) {
QArray<int> ids( 1 );
ids[0] = id;
todo.setCategory( Qtopia::Record::idsToString( ids ) );
}
init();
}
void NewTaskDialog::init()
{
if( layout() != 0 ){
- layout()->setMargin( 0 );
+ layout()->setMargin( 2 );
}
QPopupMenu *m1 = new QPopupMenu( this );
picker = new DateBookMonth( m1, 0, TRUE );
m1->insertItem( picker );
buttonDate->setPopup( m1 );
comboCategory->setCategories( todo.categories(), "Todo List", tr("Todo List") );
connect( picker, SIGNAL( dateClicked( int, int, int ) ),
this, SLOT( dateChanged( int, int, int ) ) );
buttonDate->setText( TimeString::longDateString( date ) );
picker->setDate( date.year(), date.month(), date.day() );
lblDown->setPixmap(Resource::loadPixmap("down") );
}
/*
* Destroys the object and frees any allocated resources
*/
NewTaskDialog::~NewTaskDialog()
{
// no need to delete child widgets, Qt does it all for us
}
void NewTaskDialog::dateChanged( int y, int m, int d )
{
date = QDate( y, m, d );
buttonDate->setText( TimeString::longDateString( date ) );
}
/*!
*/
ToDoEvent NewTaskDialog::todoEntry()
{
if( checkDate->isChecked() ){
todo.setDate( date );
todo.setHasDate( true );
}else{
todo.setHasDate( false );
}
if ( comboCategory->currentCategory() != -1 ) {
QArray<int> arr = comboCategory->currentCategories();
QStringList list;
list = QStringList::split(";", Qtopia::Record::idsToString( arr )) ;
todo.setCategories( list );
}
todo.setPriority( comboPriority->currentItem() + 1 );
todo.setCompleted( checkCompleted->isChecked() );