-rw-r--r-- | korganizer/koeditorgeneralevent.cpp | 3 | ||||
-rw-r--r-- | korganizer/koeditorgeneraltodo.cpp | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp index d4aa78c..3b2a276 100644 --- a/korganizer/koeditorgeneralevent.cpp +++ b/korganizer/koeditorgeneralevent.cpp | |||
@@ -129,32 +129,35 @@ void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) | |||
129 | //} | 129 | //} |
130 | flagsBox->setStretchFactor(mDurationLabel, 10 ); | 130 | flagsBox->setStretchFactor(mDurationLabel, 10 ); |
131 | mDurationLabel->setAlignment( AlignRight | AlignVCenter); | 131 | mDurationLabel->setAlignment( AlignRight | AlignVCenter); |
132 | layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); | 132 | layoutTimeBox->addMultiCellWidget( duration, 2, 2, 0, 3 ); |
133 | 133 | ||
134 | // time widgets are checked if they contain a valid time | 134 | // time widgets are checked if they contain a valid time |
135 | connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), | 135 | connect(mStartTimeEdit, SIGNAL(timeChanged(QTime)), |
136 | this, SLOT(startTimeChanged(QTime))); | 136 | this, SLOT(startTimeChanged(QTime))); |
137 | connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), | 137 | connect(mEndTimeEdit, SIGNAL(timeChanged(QTime)), |
138 | this, SLOT(endTimeChanged(QTime))); | 138 | this, SLOT(endTimeChanged(QTime))); |
139 | 139 | ||
140 | // date widgets are checked if they contain a valid date | 140 | // date widgets are checked if they contain a valid date |
141 | connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), | 141 | connect(mStartDateEdit, SIGNAL(dateChanged(QDate)), |
142 | this, SLOT(startDateChanged(QDate))); | 142 | this, SLOT(startDateChanged(QDate))); |
143 | connect(mEndDateEdit, SIGNAL(dateChanged(QDate)), | 143 | connect(mEndDateEdit, SIGNAL(dateChanged(QDate)), |
144 | this, SLOT(endDateChanged(QDate))); | 144 | this, SLOT(endDateChanged(QDate))); |
145 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); | ||
146 | connect(mEndDateEdit,SIGNAL(setTimeTo(QTime)),mEndTimeEdit,SLOT(setTime(QTime))); | ||
147 | |||
145 | } | 148 | } |
146 | 149 | ||
147 | void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) | 150 | void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) |
148 | { | 151 | { |
149 | QBoxLayout *classLayout = new QHBoxLayout(topLayout); | 152 | QBoxLayout *classLayout = new QHBoxLayout(topLayout); |
150 | 153 | ||
151 | QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); | 154 | QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); |
152 | classLayout->addWidget(freeTimeLabel); | 155 | classLayout->addWidget(freeTimeLabel); |
153 | 156 | ||
154 | mFreeTimeCombo = new QComboBox(false, parent); | 157 | mFreeTimeCombo = new QComboBox(false, parent); |
155 | mFreeTimeCombo->insertItem(i18n("Busy")); | 158 | mFreeTimeCombo->insertItem(i18n("Busy")); |
156 | mFreeTimeCombo->insertItem(i18n("Free")); | 159 | mFreeTimeCombo->insertItem(i18n("Free")); |
157 | classLayout->addWidget(mFreeTimeCombo); | 160 | classLayout->addWidget(mFreeTimeCombo); |
158 | } | 161 | } |
159 | 162 | ||
160 | void KOEditorGeneralEvent::timeStuffDisable(bool disable) | 163 | void KOEditorGeneralEvent::timeStuffDisable(bool disable) |
diff --git a/korganizer/koeditorgeneraltodo.cpp b/korganizer/koeditorgeneraltodo.cpp index a03ec52..4a1576a 100644 --- a/korganizer/koeditorgeneraltodo.cpp +++ b/korganizer/koeditorgeneraltodo.cpp | |||
@@ -111,32 +111,34 @@ void KOEditorGeneralTodo::initTime(QWidget *parent,QBoxLayout *topLayout) | |||
111 | 111 | ||
112 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); | 112 | mStartCheck = new QCheckBox(i18n("Start:"),timeBoxFrame); |
113 | layoutTimeBox->addWidget(mStartCheck,1,0); | 113 | layoutTimeBox->addWidget(mStartCheck,1,0); |
114 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); | 114 | connect(mStartCheck,SIGNAL(toggled(bool)),SLOT(enableStartEdit(bool))); |
115 | 115 | ||
116 | mStartDateEdit = new KDateEdit(timeBoxFrame); | 116 | mStartDateEdit = new KDateEdit(timeBoxFrame); |
117 | layoutTimeBox->addWidget(mStartDateEdit,1,1); | 117 | layoutTimeBox->addWidget(mStartDateEdit,1,1); |
118 | 118 | ||
119 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); | 119 | mStartTimeEdit = new KOTimeEdit(timeBoxFrame); |
120 | layoutTimeBox->addWidget(mStartTimeEdit,1,2); | 120 | layoutTimeBox->addWidget(mStartTimeEdit,1,2); |
121 | 121 | ||
122 | 122 | ||
123 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); | 123 | mTimeButton = new QCheckBox(i18n("Time associated"),timeBoxFrame); |
124 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); | 124 | layoutTimeBox->addMultiCellWidget(mTimeButton,2,2,0,1); |
125 | 125 | ||
126 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); | 126 | connect(mTimeButton,SIGNAL(toggled(bool)),SLOT(enableTimeEdits(bool))); |
127 | connect(mDueDateEdit,SIGNAL(setTimeTo(QTime)),mDueTimeEdit,SLOT(setTime(QTime))); | ||
128 | connect(mStartDateEdit,SIGNAL(setTimeTo(QTime)),mStartTimeEdit,SLOT(setTime(QTime))); | ||
127 | 129 | ||
128 | // some more layouting | 130 | // some more layouting |
129 | //layoutTimeBox->setColStretch(3,1); | 131 | //layoutTimeBox->setColStretch(3,1); |
130 | } | 132 | } |
131 | 133 | ||
132 | 134 | ||
133 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | 135 | void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) |
134 | { | 136 | { |
135 | mCompletedCombo = new QComboBox(parent); | 137 | mCompletedCombo = new QComboBox(parent); |
136 | // xgettext:no-c-format | 138 | // xgettext:no-c-format |
137 | mCompletedCombo->insertItem(i18n(" 0 %")); | 139 | mCompletedCombo->insertItem(i18n(" 0 %")); |
138 | // xgettext:no-c-format | 140 | // xgettext:no-c-format |
139 | mCompletedCombo->insertItem(i18n(" 20 %")); | 141 | mCompletedCombo->insertItem(i18n(" 20 %")); |
140 | // xgettext:no-c-format | 142 | // xgettext:no-c-format |
141 | mCompletedCombo->insertItem(i18n(" 40 %")); | 143 | mCompletedCombo->insertItem(i18n(" 40 %")); |
142 | // xgettext:no-c-format | 144 | // xgettext:no-c-format |
@@ -146,37 +148,38 @@ void KOEditorGeneralTodo::initCompletion(QWidget *parent, QBoxLayout *topLayout) | |||
146 | // xgettext:no-c-format | 148 | // xgettext:no-c-format |
147 | mCompletedCombo->insertItem(i18n("100 %")); | 149 | mCompletedCombo->insertItem(i18n("100 %")); |
148 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); | 150 | connect(mCompletedCombo,SIGNAL(activated(int)),SLOT(completedChanged(int))); |
149 | topLayout->addWidget(mCompletedCombo); | 151 | topLayout->addWidget(mCompletedCombo); |
150 | 152 | ||
151 | mCompletedLabel = new QLabel(i18n("completed"),parent); | 153 | mCompletedLabel = new QLabel(i18n("completed"),parent); |
152 | topLayout->addWidget(mCompletedLabel); | 154 | topLayout->addWidget(mCompletedLabel); |
153 | 155 | ||
154 | mCompleteDateEdit = new KDateEdit(parent); | 156 | mCompleteDateEdit = new KDateEdit(parent); |
155 | topLayout->addWidget(mCompleteDateEdit ); | 157 | topLayout->addWidget(mCompleteDateEdit ); |
156 | 158 | ||
157 | mCompleteTimeEdit = new KOTimeEdit(parent); | 159 | mCompleteTimeEdit = new KOTimeEdit(parent); |
158 | topLayout->addWidget( mCompleteTimeEdit); | 160 | topLayout->addWidget( mCompleteTimeEdit); |
159 | 161 | ||
160 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); | 162 | mCompletedCombo->setSizePolicy( QSizePolicy( QSizePolicy::Preferred,QSizePolicy::Preferred) ); |
161 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); | 163 | mCompletedLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding,QSizePolicy::Preferred) ); |
164 | connect(mCompleteDateEdit,SIGNAL(setTimeTo(QTime)),mCompleteTimeEdit,SLOT(setTime(QTime))); | ||
162 | 165 | ||
163 | if ( QApplication::desktop()->width() <= 480 ) { | 166 | if ( QApplication::desktop()->width() <= 480 ) { |
164 | if ( QApplication::desktop()->width() < 320 ) | 167 | if ( QApplication::desktop()->width() < 320 ) |
165 | mCompleteDateEdit->setMaximumWidth( 85 ); | 168 | mCompleteDateEdit->setMaximumWidth( 85 ); |
166 | else | 169 | else |
167 | mCompleteDateEdit->setMaximumWidth( 140 ); | 170 | mCompleteDateEdit->setMaximumWidth( 140 ); |
168 | topLayout->setSpacing( 0 ); | 171 | topLayout->setSpacing( 0 ); |
169 | } | 172 | } |
170 | } | 173 | } |
171 | 174 | ||
172 | void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) | 175 | void KOEditorGeneralTodo::initPriority(QWidget *parent, QBoxLayout *topLayout) |
173 | { | 176 | { |
174 | 177 | ||
175 | QHBox* h = new QHBox ( parent ); | 178 | QHBox* h = new QHBox ( parent ); |
176 | topLayout->addWidget( h ); | 179 | topLayout->addWidget( h ); |
177 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); | 180 | QLabel *priorityLabel = new QLabel(i18n("Priority:"), h); |
178 | // topLayout->addWidget(priorityLabel); | 181 | // topLayout->addWidget(priorityLabel); |
179 | mPriorityCombo = new QComboBox( h ); | 182 | mPriorityCombo = new QComboBox( h ); |
180 | mPriorityCombo->insertItem(i18n("1 (high)")); | 183 | mPriorityCombo->insertItem(i18n("1 (high)")); |
181 | mPriorityCombo->insertItem(i18n("2")); | 184 | mPriorityCombo->insertItem(i18n("2")); |
182 | mPriorityCombo->insertItem(i18n("3")); | 185 | mPriorityCombo->insertItem(i18n("3")); |