summaryrefslogtreecommitdiffabout
path: root/korganizer/koeditorgeneraltodo.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koeditorgeneraltodo.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koeditorgeneraltodo.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp
index 4a1576a..e86b4d0 100644
--- a/korganizer/koeditorgeneraltodo.cpp
+++ b/korganizer/koeditorgeneraltodo.cpp
@@ -39,6 +39,7 @@
#include <krestrictedline.h>
#include <kstandarddirs.h>
#include <kfiledialog.h>
+#include <kdialog.h>
#include <libkcal/todo.h>
@@ -88,36 +89,36 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout)
QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
i18n("Date && Time"),parent);
timeLayout->addWidget(timeGroupBox);
- timeGroupBox->layout()->setSpacing( 0 );
- timeGroupBox->layout()->setMargin( 5 );
+ timeGroupBox->layout()->setSpacing( KDialog::spacingHintSmall() );
+ timeGroupBox->layout()->setMargin( KDialog::marginHint() );
QFrame *timeBoxFrame = new QFrame(timeGroupBox);
QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,3,3);
- layoutTimeBox->setSpacing(topLayout->spacing());
+ layoutTimeBox->setSpacing(KDialog::spacingHintSmall());
layoutTimeBox->setColStretch( 1, 1 );
mDueCheck = new QCheckBox(i18n("Due:"),timeBoxFrame);
- layoutTimeBox->addWidget(mDueCheck,0,0);
+ layoutTimeBox->addWidget(mDueCheck,1,0);
connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(enableDueEdit(bool)));
connect(mDueCheck,SIGNAL(toggled(bool)),SLOT(showAlarm()));
mDueDateEdit = new KDateEdit(timeBoxFrame);
- layoutTimeBox->addWidget(mDueDateEdit,0,1);
+ layoutTimeBox->addWidget(mDueDateEdit,1,1);
mDueTimeEdit = new KOTimeEdit(timeBoxFrame);
- layoutTimeBox->addWidget(mDueTimeEdit,0,2);
+ layoutTimeBox->addWidget(mDueTimeEdit,1,2);
mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame);
- layoutTimeBox->addWidget(mStartCheck,1,0);
+ layoutTimeBox->addWidget(mStartCheck,0,0);
connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool)));
mStartDateEdit = new KDateEdit(timeBoxFrame);
- layoutTimeBox->addWidget(mStartDateEdit,1,1);
+ layoutTimeBox->addWidget(mStartDateEdit,0,1);
mStartTimeEdit = new KOTimeEdit(timeBoxFrame);
- layoutTimeBox->addWidget(mStartTimeEdit,1,2);
+ layoutTimeBox->addWidget(mStartTimeEdit,0,2);
mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame);
@@ -341,7 +342,6 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo)
if ( mCompletedCombo->currentItem() == 5 ) {
QDateTime comp ( mCompleteDateEdit->date(), mCompleteTimeEdit->getTime() );
if ( comp.isValid () ) {
- todo->setPercentComplete(0);
todo->setPercentComplete(100);
todo->setCompleted(comp);
} else {