summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koeditorgeneralevent.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/koeditorgeneralevent.cpp b/korganizer/koeditorgeneralevent.cpp
index 30b792b..adc733b 100644
--- a/korganizer/koeditorgeneralevent.cpp
+++ b/korganizer/koeditorgeneralevent.cpp
@@ -1,313 +1,313 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qtooltip.h> 24#include <qtooltip.h>
25#include <qlayout.h> 25#include <qlayout.h>
26#include <qvbox.h> 26#include <qvbox.h>
27#include <qbuttongroup.h> 27#include <qbuttongroup.h>
28#include <qvgroupbox.h> 28#include <qvgroupbox.h>
29#include <qwidgetstack.h> 29#include <qwidgetstack.h>
30#include <qdatetime.h> 30#include <qdatetime.h>
31 31
32#include <kdebug.h> 32#include <kdebug.h>
33#include <kglobal.h> 33#include <kglobal.h>
34#include <klocale.h> 34#include <klocale.h>
35#include <kiconloader.h> 35#include <kiconloader.h>
36#include <kmessagebox.h> 36#include <kmessagebox.h>
37#include <kfiledialog.h> 37#include <kfiledialog.h>
38#include <kstandarddirs.h> 38#include <kstandarddirs.h>
39 39
40#include <libkcal/event.h> 40#include <libkcal/event.h>
41 41
42#include <libkdepim/kdateedit.h> 42#include <libkdepim/kdateedit.h>
43 43
44#include "koprefs.h" 44#include "koprefs.h"
45 45
46#include "koeditorgeneralevent.h" 46#include "koeditorgeneralevent.h"
47#include "kolocationbox.h" 47#include "kolocationbox.h"
48 48
49KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent, 49KOEditorGeneralEvent::KOEditorGeneralEvent(QObject* parent,
50 const char* name) : 50 const char* name) :
51 KOEditorGeneral( parent, name) 51 KOEditorGeneral( parent, name)
52{ 52{
53 mTemplate = false; 53 mTemplate = false;
54 connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), 54 connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
55 SLOT(setDuration())); 55 SLOT(setDuration()));
56 connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)), 56 connect(this,SIGNAL(dateTimesChanged(QDateTime,QDateTime)),
57 SLOT(emitDateTimeStr())); 57 SLOT(emitDateTimeStr()));
58} 58}
59 59
60KOEditorGeneralEvent::~KOEditorGeneralEvent() 60KOEditorGeneralEvent::~KOEditorGeneralEvent()
61{ 61{
62} 62}
63 63
64void KOEditorGeneralEvent::finishSetup() 64void KOEditorGeneralEvent::finishSetup()
65{ 65{
66 66
67 //disabled 67 //disabled
68// QWidget::setTabOrder( mSummaryEdit, mLocationEdit ); 68// QWidget::setTabOrder( mSummaryEdit, mLocationEdit );
69// QWidget::setTabOrder( mLocationEdit, mStartDateEdit ); 69// QWidget::setTabOrder( mLocationEdit, mStartDateEdit );
70// QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit ); 70// QWidget::setTabOrder( mStartDateEdit, mStartTimeEdit );
71// QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit ); 71// QWidget::setTabOrder( mStartTimeEdit, mEndDateEdit );
72// QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit ); 72// QWidget::setTabOrder( mEndDateEdit, mEndTimeEdit );
73// QWidget::setTabOrder( mEndTimeEdit, mNoTimeButton ); 73// QWidget::setTabOrder( mEndTimeEdit, mNoTimeButton );
74// QWidget::setTabOrder( mNoTimeButton, mAlarmButton ); 74// QWidget::setTabOrder( mNoTimeButton, mAlarmButton );
75// QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit ); 75// QWidget::setTabOrder( mAlarmButton, mAlarmTimeEdit );
76// QWidget::setTabOrder( mFreeTimeCombo, mCategoriesButton ); 76// QWidget::setTabOrder( mFreeTimeCombo, mCategoriesButton );
77// QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo ); 77// QWidget::setTabOrder( mCategoriesButton, mSecrecyCombo );
78// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit ); 78// QWidget::setTabOrder( mSecrecyCombo, mDescriptionEdit );
79 79
80 80
81 81
82 mSummaryEdit->load(KOLocationBox::SUMMARYEVENT); 82 mSummaryEdit->load(KOLocationBox::SUMMARYEVENT);
83 mSummaryEdit->setFocus(); 83 mSummaryEdit->setFocus();
84} 84}
85 85
86void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout) 86void KOEditorGeneralEvent::initTime(QWidget *parent,QBoxLayout *topLayout)
87{ 87{
88 QBoxLayout *timeLayout = new QVBoxLayout(topLayout); 88 QBoxLayout *timeLayout = new QVBoxLayout(topLayout);
89 89
90 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal, 90 QGroupBox *timeGroupBox = new QGroupBox(1,QGroupBox::Horizontal,
91 i18n("Date && Time"),parent); 91 i18n("Date && Time"),parent);
92 timeLayout->addWidget(timeGroupBox); 92 timeLayout->addWidget(timeGroupBox);
93 93
94 timeGroupBox->layout()->setSpacing( 0 ); 94 timeGroupBox->layout()->setSpacing( 0 );
95 timeGroupBox->layout()->setMargin( 5 ); 95 timeGroupBox->layout()->setMargin( 5 );
96 QFrame *timeBoxFrame = new QFrame(timeGroupBox); 96 QFrame *timeBoxFrame = new QFrame(timeGroupBox);
97 97
98 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3); 98 QGridLayout *layoutTimeBox = new QGridLayout(timeBoxFrame,2,3);
99 layoutTimeBox->setSpacing(topLayout->spacing()); 99 layoutTimeBox->setSpacing(topLayout->spacing());
100 100
101 mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame); 101 mStartDateLabel = new QLabel(i18n("Start:"),timeBoxFrame);
102 layoutTimeBox->addWidget(mStartDateLabel,0,0); 102 layoutTimeBox->addWidget(mStartDateLabel,0,0);
103 103
104 mStartDateEdit = new KDateEdit(timeBoxFrame); 104 mStartDateEdit = new KDateEdit(timeBoxFrame);
105 layoutTimeBox->addWidget(mStartDateEdit,0,1); 105 layoutTimeBox->addWidget(mStartDateEdit,0,1);
106 106
107 mStartTimeEdit = new KOTimeEdit(timeBoxFrame); 107 mStartTimeEdit = new KOTimeEdit(timeBoxFrame);
108 layoutTimeBox->addWidget(mStartTimeEdit,0,2); 108 layoutTimeBox->addWidget(mStartTimeEdit,0,2);
109 109
110 110
111 mEndDateLabel = new QLabel(i18n("End:"),timeBoxFrame); 111 mEndDateLabel = new QLabel(i18n("End:"),timeBoxFrame);
112 layoutTimeBox->addWidget(mEndDateLabel,1,0); 112 layoutTimeBox->addWidget(mEndDateLabel,1,0);
113 113
114 mEndDateEdit = new KDateEdit(timeBoxFrame); 114 mEndDateEdit = new KDateEdit(timeBoxFrame);
115 layoutTimeBox->addWidget(mEndDateEdit,1,1); 115 layoutTimeBox->addWidget(mEndDateEdit,1,1);
116 116
117 mEndTimeEdit = new KOTimeEdit(timeBoxFrame); 117 mEndTimeEdit = new KOTimeEdit(timeBoxFrame);
118 layoutTimeBox->addWidget(mEndTimeEdit,1,2); 118 layoutTimeBox->addWidget(mEndTimeEdit,1,2);
119 QWidget* duration = new QWidget( timeBoxFrame ); 119 QWidget* duration = new QWidget( timeBoxFrame );
120 QHBoxLayout *flagsBox = new QHBoxLayout( duration ); 120 QHBoxLayout *flagsBox = new QHBoxLayout( duration );
121 mNoTimeButton = new QCheckBox(i18n("Allday"),duration); 121 mNoTimeButton = new QCheckBox(i18n("All day event"),duration);
122 flagsBox->addWidget(mNoTimeButton); 122 flagsBox->addWidget(mNoTimeButton);
123 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool))); 123 connect(mNoTimeButton, SIGNAL(toggled(bool)),SLOT(dontAssociateTime(bool)));
124 mDurationLabel = new QLabel( duration ); 124 mDurationLabel = new QLabel( duration );
125 // if ( KOPrefs::instance()->mCompactDialogs ) { 125 // if ( KOPrefs::instance()->mCompactDialogs ) {
126 //layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 ); 126 //layoutTimeBox->addMultiCellWidget( mDurationLabel, 3, 3, 0, 3 );
127 //} else { 127 //} else {
128 flagsBox->addWidget( mDurationLabel ); 128 flagsBox->addWidget( mDurationLabel );
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} 145}
146 146
147void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout) 147void KOEditorGeneralEvent::initClass(QWidget *parent,QBoxLayout *topLayout)
148{ 148{
149 QBoxLayout *classLayout = new QHBoxLayout(topLayout); 149 QBoxLayout *classLayout = new QHBoxLayout(topLayout);
150 150
151 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent); 151 QLabel *freeTimeLabel = new QLabel(i18n("Show time as:"),parent);
152 classLayout->addWidget(freeTimeLabel); 152 classLayout->addWidget(freeTimeLabel);
153 153
154 mFreeTimeCombo = new QComboBox(false, parent); 154 mFreeTimeCombo = new QComboBox(false, parent);
155 mFreeTimeCombo->insertItem(i18n("Busy")); 155 mFreeTimeCombo->insertItem(i18n("Busy"));
156 mFreeTimeCombo->insertItem(i18n("Free")); 156 mFreeTimeCombo->insertItem(i18n("Free"));
157 classLayout->addWidget(mFreeTimeCombo); 157 classLayout->addWidget(mFreeTimeCombo);
158} 158}
159 159
160void KOEditorGeneralEvent::timeStuffDisable(bool disable) 160void KOEditorGeneralEvent::timeStuffDisable(bool disable)
161{ 161{
162 mStartTimeEdit->setEnabled( !disable ); 162 mStartTimeEdit->setEnabled( !disable );
163 mEndTimeEdit->setEnabled( !disable ); 163 mEndTimeEdit->setEnabled( !disable );
164 164
165 setDuration(); 165 setDuration();
166 emitDateTimeStr(); 166 emitDateTimeStr();
167} 167}
168 168
169void KOEditorGeneralEvent::dontAssociateTime(bool noTime) 169void KOEditorGeneralEvent::dontAssociateTime(bool noTime)
170{ 170{
171 timeStuffDisable(noTime); 171 timeStuffDisable(noTime);
172 //if(alarmButton->isChecked()) alarmStuffDisable(noTime); 172 //if(alarmButton->isChecked()) alarmStuffDisable(noTime);
173 allDayChanged(noTime); 173 allDayChanged(noTime);
174} 174}
175 175
176void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end) 176void KOEditorGeneralEvent::setDateTimes(QDateTime start, QDateTime end)
177{ 177{
178// kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl; 178// kdDebug() << "KOEditorGeneralEvent::setDateTimes(): Start DateTime: " << start.toString() << endl;
179 if ( !mTemplate ) 179 if ( !mTemplate )
180 mStartDateEdit->setDate(start.date()); 180 mStartDateEdit->setDate(start.date());
181 // KTimeEdit seems to emit some signals when setTime() is called. 181 // KTimeEdit seems to emit some signals when setTime() is called.
182 mStartTimeEdit->blockSignals( true ); 182 mStartTimeEdit->blockSignals( true );
183 mStartTimeEdit->setTime(start.time()); 183 mStartTimeEdit->setTime(start.time());
184 mStartTimeEdit->blockSignals( false ); 184 mStartTimeEdit->blockSignals( false );
185 if ( !mTemplate ) 185 if ( !mTemplate )
186 mEndDateEdit->setDate(end.date()); 186 mEndDateEdit->setDate(end.date());
187 mEndTimeEdit->setTime(end.time()); 187 mEndTimeEdit->setTime(end.time());
188 188
189 mCurrStartDateTime = start; 189 mCurrStartDateTime = start;
190 mCurrEndDateTime = end; 190 mCurrEndDateTime = end;
191 191
192 setDuration(); 192 setDuration();
193 emitDateTimeStr(); 193 emitDateTimeStr();
194} 194}
195 195
196void KOEditorGeneralEvent::startTimeChanged(QTime newtime) 196void KOEditorGeneralEvent::startTimeChanged(QTime newtime)
197{ 197{
198 kdDebug() << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl; 198 kdDebug() << "KOEditorGeneralEvent::startTimeChanged() " << newtime.toString() << endl;
199 199
200 int secsep = mCurrStartDateTime.secsTo(mCurrEndDateTime); 200 int secsep = mCurrStartDateTime.secsTo(mCurrEndDateTime);
201 201
202 mCurrStartDateTime.setTime(newtime); 202 mCurrStartDateTime.setTime(newtime);
203 203
204 // adjust end time so that the event has the same duration as before. 204 // adjust end time so that the event has the same duration as before.
205 mCurrEndDateTime = mCurrStartDateTime.addSecs(secsep); 205 mCurrEndDateTime = mCurrStartDateTime.addSecs(secsep);
206 mEndTimeEdit->setTime(mCurrEndDateTime.time()); 206 mEndTimeEdit->setTime(mCurrEndDateTime.time());
207 mEndDateEdit->setDate(mCurrEndDateTime.date()); 207 mEndDateEdit->setDate(mCurrEndDateTime.date());
208 208
209 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); 209 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
210} 210}
211 211
212void KOEditorGeneralEvent::endTimeChanged(QTime newtime) 212void KOEditorGeneralEvent::endTimeChanged(QTime newtime)
213{ 213{
214// kdDebug() << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl; 214// kdDebug() << "KOEditorGeneralEvent::endTimeChanged " << newtime.toString() << endl;
215 215
216 QDateTime newdt(mCurrEndDateTime.date(), newtime); 216 QDateTime newdt(mCurrEndDateTime.date(), newtime);
217 mCurrEndDateTime = newdt; 217 mCurrEndDateTime = newdt;
218 218
219 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); 219 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
220} 220}
221 221
222void KOEditorGeneralEvent::startDateChanged(QDate newdate) 222void KOEditorGeneralEvent::startDateChanged(QDate newdate)
223{ 223{
224 int daysep = mCurrStartDateTime.daysTo(mCurrEndDateTime); 224 int daysep = mCurrStartDateTime.daysTo(mCurrEndDateTime);
225 225
226 mCurrStartDateTime.setDate(newdate); 226 mCurrStartDateTime.setDate(newdate);
227 227
228 // adjust end date so that the event has the same duration as before 228 // adjust end date so that the event has the same duration as before
229 mCurrEndDateTime.setDate(mCurrStartDateTime.date().addDays(daysep)); 229 mCurrEndDateTime.setDate(mCurrStartDateTime.date().addDays(daysep));
230 mEndDateEdit->setDate(mCurrEndDateTime.date()); 230 mEndDateEdit->setDate(mCurrEndDateTime.date());
231 231
232 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); 232 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
233} 233}
234 234
235void KOEditorGeneralEvent::endDateChanged(QDate newdate) 235void KOEditorGeneralEvent::endDateChanged(QDate newdate)
236{ 236{
237 QDateTime newdt(newdate, mCurrEndDateTime.time()); 237 QDateTime newdt(newdate, mCurrEndDateTime.time());
238 238
239 if(newdt < mCurrStartDateTime) { 239 if(newdt < mCurrStartDateTime) {
240 // oops, we can't let that happen. 240 // oops, we can't let that happen.
241 newdt = mCurrStartDateTime; 241 newdt = mCurrStartDateTime;
242 mEndDateEdit->setDate(newdt.date()); 242 mEndDateEdit->setDate(newdt.date());
243 mEndTimeEdit->setTime(newdt.time()); 243 mEndTimeEdit->setTime(newdt.time());
244 } 244 }
245 mCurrEndDateTime = newdt; 245 mCurrEndDateTime = newdt;
246 246
247 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime); 247 emit dateTimesChanged(mCurrStartDateTime,mCurrEndDateTime);
248} 248}
249 249
250void KOEditorGeneralEvent::setDefaults(QDateTime from,QDateTime to,bool allDay) 250void KOEditorGeneralEvent::setDefaults(QDateTime from,QDateTime to,bool allDay)
251{ 251{
252 mSummaryEdit->load(KOLocationBox::SUMMARYEVENT); 252 mSummaryEdit->load(KOLocationBox::SUMMARYEVENT);
253 mLocationEdit->load(KOLocationBox::LOCATION); 253 mLocationEdit->load(KOLocationBox::LOCATION);
254 KOEditorGeneral::setDefaults(allDay); 254 KOEditorGeneral::setDefaults(allDay);
255 255
256 mNoTimeButton->setChecked(allDay); 256 mNoTimeButton->setChecked(allDay);
257 timeStuffDisable(allDay); 257 timeStuffDisable(allDay);
258 mFreeTimeCombo->setCurrentItem( 0 ); 258 mFreeTimeCombo->setCurrentItem( 0 );
259 setDateTimes(from,to); 259 setDateTimes(from,to);
260} 260}
261 261
262void KOEditorGeneralEvent::readEvent( Event *event, bool tmpl ) 262void KOEditorGeneralEvent::readEvent( Event *event, bool tmpl )
263{ 263{
264 QString tmpStr; 264 QString tmpStr;
265 265
266 mTemplate = tmpl; 266 mTemplate = tmpl;
267 // the rest is for the events only 267 // the rest is for the events only
268 mNoTimeButton->setChecked(event->doesFloat()); 268 mNoTimeButton->setChecked(event->doesFloat());
269 timeStuffDisable(event->doesFloat()); 269 timeStuffDisable(event->doesFloat());
270 270
271 setDateTimes(event->dtStart(),event->dtEnd()); 271 setDateTimes(event->dtStart(),event->dtEnd());
272 272
273 mTemplate = false; 273 mTemplate = false;
274 switch( event->transparency() ) { 274 switch( event->transparency() ) {
275 case Event::Transparent: 275 case Event::Transparent:
276 mFreeTimeCombo->setCurrentItem(1); 276 mFreeTimeCombo->setCurrentItem(1);
277 break; 277 break;
278 case Event::Opaque: 278 case Event::Opaque:
279 mFreeTimeCombo->setCurrentItem(0); 279 mFreeTimeCombo->setCurrentItem(0);
280 break; 280 break;
281 } 281 }
282 282
283 mSummaryEdit->load(KOLocationBox::SUMMARYEVENT); 283 mSummaryEdit->load(KOLocationBox::SUMMARYEVENT);
284 mLocationEdit->load(KOLocationBox::LOCATION); 284 mLocationEdit->load(KOLocationBox::LOCATION);
285 readIncidence(event); 285 readIncidence(event);
286} 286}
287 287
288void KOEditorGeneralEvent::writeEvent(Event *event) 288void KOEditorGeneralEvent::writeEvent(Event *event)
289{ 289{
290// kdDebug() << "KOEditorGeneralEvent::writeEvent()" << endl; 290// kdDebug() << "KOEditorGeneralEvent::writeEvent()" << endl;
291 291
292 writeIncidence(event); 292 writeIncidence(event);
293 293
294 QDate tmpDate; 294 QDate tmpDate;
295 QTime tmpTime; 295 QTime tmpTime;
296 QDateTime tmpDT; 296 QDateTime tmpDT;
297 297
298 // temp. until something better happens. 298 // temp. until something better happens.
299 QString tmpStr; 299 QString tmpStr;
300 300
301 if (mNoTimeButton->isChecked()) { 301 if (mNoTimeButton->isChecked()) {
302 event->setFloats(true); 302 event->setFloats(true);
303 // need to change this. 303 // need to change this.
304 tmpDate = mStartDateEdit->date(); 304 tmpDate = mStartDateEdit->date();
305 tmpTime.setHMS(0,0,0); 305 tmpTime.setHMS(0,0,0);
306 tmpDT.setDate(tmpDate); 306 tmpDT.setDate(tmpDate);
307 tmpDT.setTime(tmpTime); 307 tmpDT.setTime(tmpTime);
308 event->setDtStart(tmpDT); 308 event->setDtStart(tmpDT);
309 309
310 tmpDate = mEndDateEdit->date(); 310 tmpDate = mEndDateEdit->date();
311 tmpTime.setHMS(0,0,0); 311 tmpTime.setHMS(0,0,0);
312 tmpDT.setDate(tmpDate); 312 tmpDT.setDate(tmpDate);
313 tmpDT.setTime(tmpTime); 313 tmpDT.setTime(tmpTime);