Diffstat (limited to 'korganizer/koeditorgeneraltodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 20 |
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 @@ -34,16 +34,17 @@ #include <kglobal.h> #include <klocale.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kdebug.h> #include <krestrictedline.h> #include <kstandarddirs.h> #include <kfiledialog.h> +#include <kdialog.h> #include <libkcal/todo.h> #include <libkdepim/kdateedit.h> #include "koprefs.h" #include "ktimeedit.h" @@ -83,46 +84,46 @@ void KOEditorGeneralTodo::finishSetup() void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) { QBoxLayout *timeLayout = new QVBoxLayout(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); layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); @@ -336,17 +337,16 @@ void KOEditorGeneralTodo::writeTodo(Todo *todo) todo->setDtStart(tmpDT); } todo->setPriority(mPriorityCombo->currentItem()+1); // set completion state if ( mCompletedCombo->currentItem() == 5 ) { QDateTime comp ( mCompleteDateEdit->date(), mCompleteTimeEdit->getTime() ); if ( comp.isValid () ) { - todo->setPercentComplete(0); todo->setPercentComplete(100); todo->setCompleted(comp); } else { todo->setPercentComplete( 100 ); if ( mCompleted.isValid() ) todo->setCompleted(mCompleted); } } else { |