summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2004-12-04 22:01:08 (UTC)
committer zautrix <zautrix>2004-12-04 22:01:08 (UTC)
commit9c7f3267a1d7db2dbc3bd6384e75cf8ffea1c3df (patch) (unidiff)
tree0b1707f003049d6c86b001d87e2c3e2525ac471e /korganizer
parent33a7e96870517ccf4b1daf5bfcbac4755ee535b4 (diff)
downloadkdepimpi-9c7f3267a1d7db2dbc3bd6384e75cf8ffea1c3df.zip
kdepimpi-9c7f3267a1d7db2dbc3bd6384e75cf8ffea1c3df.tar.gz
kdepimpi-9c7f3267a1d7db2dbc3bd6384e75cf8ffea1c3df.tar.bz2
translation fixes
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 3801ed4..5f14bfa 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -55,385 +55,385 @@ void WhatsNextTextBrowser::setSource(const QString& n)
55 } else { 55 } else {
56 QTextBrowser::setSource(n); 56 QTextBrowser::setSource(n);
57 } 57 }
58} 58}
59 59
60KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, 60KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
61 const char *name) 61 const char *name)
62 : KOrg::BaseView(calendar, parent, name) 62 : KOrg::BaseView(calendar, parent, name)
63{ 63{
64 // mDateLabel = 64 // mDateLabel =
65 // new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this); 65 // new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this);
66 // mDateLabel->setMargin(2); 66 // mDateLabel->setMargin(2);
67 // mDateLabel->setAlignment(AlignCenter); 67 // mDateLabel->setAlignment(AlignCenter);
68 setFont( KOPrefs::instance()->mWhatsNextFont ); 68 setFont( KOPrefs::instance()->mWhatsNextFont );
69 mView = new WhatsNextTextBrowser(this); 69 mView = new WhatsNextTextBrowser(this);
70 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); 70 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &)));
71 QStyleSheet* stsh = mView->styleSheet(); 71 QStyleSheet* stsh = mView->styleSheet();
72 QStyleSheetItem * style ; 72 QStyleSheetItem * style ;
73 style = stsh->item ("h2" ); 73 style = stsh->item ("h2" );
74 if ( style ) { 74 if ( style ) {
75 style->setMargin(QStyleSheetItem::MarginAll,0); 75 style->setMargin(QStyleSheetItem::MarginAll,0);
76 } 76 }
77 style = stsh->item ("h3" ); 77 style = stsh->item ("h3" );
78 if ( style ) { 78 if ( style ) {
79 style->setMargin(QStyleSheetItem::MarginAll,0); 79 style->setMargin(QStyleSheetItem::MarginAll,0);
80 } 80 }
81 mEventViewer = 0; 81 mEventViewer = 0;
82 82
83 QBoxLayout *topLayout = new QVBoxLayout(this); 83 QBoxLayout *topLayout = new QVBoxLayout(this);
84 // topLayout->addWidget(mDateLabel); 84 // topLayout->addWidget(mDateLabel);
85 topLayout->addWidget(mView); 85 topLayout->addWidget(mView);
86 mTimer = new QTimer( this ); 86 mTimer = new QTimer( this );
87 connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView())); 87 connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView()));
88 88
89 connect(mView->horizontalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); 89 connect(mView->horizontalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer()));
90 connect(mView->verticalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); 90 connect(mView->verticalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer()));
91} 91}
92 92
93KOWhatsNextView::~KOWhatsNextView() 93KOWhatsNextView::~KOWhatsNextView()
94{ 94{
95} 95}
96 96
97int KOWhatsNextView::maxDatesHint() 97int KOWhatsNextView::maxDatesHint()
98{ 98{
99 return 0; 99 return 0;
100} 100}
101 101
102int KOWhatsNextView::currentDateCount() 102int KOWhatsNextView::currentDateCount()
103{ 103{
104 return 0; 104 return 0;
105} 105}
106 106
107QPtrList<Incidence> KOWhatsNextView::selectedIncidences() 107QPtrList<Incidence> KOWhatsNextView::selectedIncidences()
108{ 108{
109 QPtrList<Incidence> eventList; 109 QPtrList<Incidence> eventList;
110 110
111 return eventList; 111 return eventList;
112} 112}
113 113
114 114
115void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd, 115void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd,
116 const QDate &td) 116 const QDate &td)
117{ 117{
118#ifndef KORG_NOPRINTER 118#ifndef KORG_NOPRINTER
119 calPrinter->preview(CalPrinter::Day, fd, td); 119 calPrinter->preview(CalPrinter::Day, fd, td);
120#endif 120#endif
121} 121}
122void KOWhatsNextView::updateConfig() 122void KOWhatsNextView::updateConfig()
123{ 123{
124 setFont( KOPrefs::instance()->mWhatsNextFont ); 124 setFont( KOPrefs::instance()->mWhatsNextFont );
125 updateView(); 125 updateView();
126 126
127} 127}
128void KOWhatsNextView::showEvent ( QShowEvent * e ) 128void KOWhatsNextView::showEvent ( QShowEvent * e )
129{ 129{
130 //qDebug("KOWhatsNextView::showEvent "); 130 //qDebug("KOWhatsNextView::showEvent ");
131 restartTimer(); 131 restartTimer();
132 QWidget::showEvent ( e ); 132 QWidget::showEvent ( e );
133} 133}
134void KOWhatsNextView::hideEvent ( QHideEvent * e) 134void KOWhatsNextView::hideEvent ( QHideEvent * e)
135{ 135{
136 //qDebug(" KOWhatsNextView::hideEvent"); 136 //qDebug(" KOWhatsNextView::hideEvent");
137 mTimer->stop(); 137 mTimer->stop();
138 QWidget::hideEvent ( e ); 138 QWidget::hideEvent ( e );
139} 139}
140void KOWhatsNextView::restartTimer() 140void KOWhatsNextView::restartTimer()
141{ 141{
142 //qDebug("KOWhatsNextView::restartTimer() "); 142 //qDebug("KOWhatsNextView::restartTimer() ");
143 mTimer->start( 300000 ); 143 mTimer->start( 300000 );
144 //mTimer->start( 5000 ); 144 //mTimer->start( 5000 );
145} 145}
146void KOWhatsNextView::updateView() 146void KOWhatsNextView::updateView()
147{ 147{
148 if ( mTimer->isActive() ) 148 if ( mTimer->isActive() )
149 restartTimer(); 149 restartTimer();
150 //qDebug("KOWhatsNextView::updateView() "); 150 //qDebug("KOWhatsNextView::updateView() ");
151 // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); 151 // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate()));
152 KIconLoader kil("korganizer"); 152 KIconLoader kil("korganizer");
153 QString ipath;// = new QString(); 153 QString ipath;// = new QString();
154 // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath); 154 // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath);
155 //<big><big><strong>" + date + "</strong></big></big>\n"; 155 //<big><big><strong>" + date + "</strong></big></big>\n";
156 mText = "<table width=\"100%\">\n"; 156 mText = "<table width=\"100%\">\n";
157 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; 157 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
158#ifdef DESKTOP_VERSION 158#ifdef DESKTOP_VERSION
159 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h1>"; 159 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h1>";
160#else 160#else
161 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; 161 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>";
162#endif 162#endif
163 // mText += "<img src=\""; 163 // mText += "<img src=\"";
164 // mText += ipath; 164 // mText += ipath;
165 // mText += "\">"; 165 // mText += "\">";
166 mEventDate = QDate::currentDate(); 166 mEventDate = QDate::currentDate();
167#ifdef DESKTOP_VERSION 167#ifdef DESKTOP_VERSION
168 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h1>"; 168 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h1>";
169#else 169#else
170 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h2>"; 170 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h2>";
171#endif 171#endif
172 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>"; 172 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
173 int iii; 173 int iii;
174 mTodos.clear(); 174 mTodos.clear();
175 QPtrList<Event> events; 175 QPtrList<Event> events;
176 QPtrList<Todo> todos = calendar()->todos(); 176 QPtrList<Todo> todos = calendar()->todos();
177 Todo * todo; 177 Todo * todo;
178 //mText += "<h2>" + i18n("Events: ") + "</h2>\n"; 178 //mText += "<h2>" + i18n("Events: ") + "</h2>\n";
179 int daysToShow = KOPrefs::instance()->mWhatsNextDays ; 179 int daysToShow = KOPrefs::instance()->mWhatsNextDays ;
180 bool itemAdded = false; 180 bool itemAdded = false;
181 for ( iii = 0; iii < daysToShow; ++iii ) { 181 for ( iii = 0; iii < daysToShow; ++iii ) {
182 QString date; 182 QString date;
183 itemAdded = false; 183 itemAdded = false;
184 events = calendar()->events( mEventDate, true ); 184 events = calendar()->events( mEventDate, true );
185 185
186 if ( iii == 0 ) { // today !!! 186 if ( iii == 0 ) { // today !!!
187 todo = todos.first(); 187 todo = todos.first();
188 while(todo) { 188 while(todo) {
189 if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() < mEventDate ) { 189 if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() < mEventDate ) {
190 if ( ! itemAdded ) { 190 if ( ! itemAdded ) {
191 appendDay ( iii, mEventDate ); 191 appendDay ( iii, mEventDate );
192 //itemAdded = true; 192 //itemAdded = true;
193 193
194 } //bool reply=false, bool notRed = true, bool appendTable = false); 194 } //bool reply=false, bool notRed = true, bool appendTable = false);
195 appendEvent(todo, false, false, !itemAdded ); 195 appendEvent(todo, false, false, !itemAdded );
196 itemAdded = true; 196 itemAdded = true;
197 } 197 }
198 todo = todos.next(); 198 todo = todos.next();
199 } 199 }
200 } 200 }
201 201
202 202
203 if (events.count() > 0) { 203 if (events.count() > 0) {
204 // mText += "<p></p>"; 204 // mText += "<p></p>";
205 // kil.loadIcon("month",KIcon::NoGroup,22,KIcon::DefaultState,&ipath); 205 // kil.loadIcon("month",KIcon::NoGroup,22,KIcon::DefaultState,&ipath);
206 // mText += "<h2>"; 206 // mText += "<h2>";
207 //mText += " <img src=\""; 207 //mText += " <img src=\"";
208 //mText += ipath; 208 //mText += ipath;
209 //mText += "\">"; 209 //mText += "\">";
210 if ( ! itemAdded ) { 210 if ( ! itemAdded ) {
211 appendDay ( iii, mEventDate ); 211 appendDay ( iii, mEventDate );
212 212
213 } 213 }
214 // for first day (iii == 0) 214 // for first day (iii == 0)
215 // we may have syncevents, or events in the past, which maybe should not be diaplayed 215 // we may have syncevents, or events in the past, which maybe should not be diaplayed
216 // for that reason we cannot append <table> in appendDay () for iii == 0 216 // for that reason we cannot append <table> in appendDay () for iii == 0
217 // we must append it in the first successful call of appendEvent() 217 // we must append it in the first successful call of appendEvent()
218 Event *ev = events.first(); 218 Event *ev = events.first();
219 while(ev) { 219 while(ev) {
220 //qDebug("+++++event append %s", ev->summary().latin1()); 220 //qDebug("+++++event append %s", ev->summary().latin1());
221 if ( true /*!ev->recurrence()->doesRecur() || ev->recursOn( mEventDate)*/) { 221 if ( true /*!ev->recurrence()->doesRecur() || ev->recursOn( mEventDate)*/) {
222 if ( appendEvent(ev, false , iii!= 0,!itemAdded ) ) 222 if ( appendEvent(ev, false , iii!= 0,!itemAdded ) )
223 itemAdded = true; 223 itemAdded = true;
224 } 224 }
225 ev = events.next(); 225 ev = events.next();
226 } 226 }
227 227
228 //mText += "</table>\n"; 228 //mText += "</table>\n";
229 } 229 }
230 230
231 todo = todos.first(); 231 todo = todos.first();
232 while(todo) { 232 while(todo) {
233 if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() == mEventDate ) { 233 if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() == mEventDate ) {
234 if ( ! itemAdded ) { 234 if ( ! itemAdded ) {
235 appendDay ( iii, mEventDate ); 235 appendDay ( iii, mEventDate );
236 //itemAdded = true; 236 //itemAdded = true;
237 } 237 }
238 appendEvent(todo, false , iii!= 0,!itemAdded); 238 appendEvent(todo, false , iii!= 0,!itemAdded);
239 itemAdded = true; 239 itemAdded = true;
240 } 240 }
241 todo = todos.next(); 241 todo = todos.next();
242 } 242 }
243 if ( !itemAdded && iii == 0 ) { 243 if ( !itemAdded && iii == 0 ) {
244 // appendDay ( iii, mEventDate ); 244 // appendDay ( iii, mEventDate );
245 //mText += "<table>"; 245 //mText += "<table>";
246 // mText += "<b><font color=\"#000080\"><em>"+i18n("No event, nothing to do.") +"</em></font></b>\n"; 246 // mText += "<b><font color=\"#000080\"><em>"+i18n("No event, nothing to do.") +"</em></font></b>\n";
247 mText += "<h3 align=\"center\"><font color=\"#008000\"><em>"+i18n("No event, nothing to do. ") +"</em></font></h3>\n"; 247 mText += "<h3 align=\"center\"><font color=\"#008000\"><em>"+i18n("No event, nothing to do.") +"</em></font></h3>\n";
248 //mText +="</table>"; 248 //mText +="</table>";
249 } 249 }
250 if ( itemAdded ) 250 if ( itemAdded )
251 mText += "</table>\n"; 251 mText += "</table>\n";
252 mEventDate = mEventDate.addDays( 1 ); 252 mEventDate = mEventDate.addDays( 1 );
253 } 253 }
254 254
255 int topmostPrios = KOPrefs::instance()->mWhatsNextPrios; 255 int topmostPrios = KOPrefs::instance()->mWhatsNextPrios;
256 if (todos.count() > 0 && topmostPrios > 0 ) { 256 if (todos.count() > 0 && topmostPrios > 0 ) {
257 // kil.loadIcon("todo",KIcon::NoGroup,22,KIcon::DefaultState,&ipath); 257 // kil.loadIcon("todo",KIcon::NoGroup,22,KIcon::DefaultState,&ipath);
258 // mText += "<h2>"; 258 // mText += "<h2>";
259 //<img src=\""; 259 //<img src=\"";
260 // mText += ipath; 260 // mText += ipath;
261 // mText += "\">"; 261 // mText += "\">";
262 // mText += i18n("Overdue To-Do:") + "</h2>\n"; 262 // mText += i18n("Overdue To-Do:") + "</h2>\n";
263 263
264 //mText += "<ul>\n"; 264 //mText += "<ul>\n";
265 bool gotone = false; 265 bool gotone = false;
266 int priority = 1; 266 int priority = 1;
267 int priosFound = 0; 267 int priosFound = 0;
268#ifdef DESKTOP_VERSION 268#ifdef DESKTOP_VERSION
269 mText +="<p></p>"; 269 mText +="<p></p>";
270#endif 270#endif
271 271
272 mText +="<h2><em><font color=\"#000080\">" + i18n("Incomplete Todo:") + "</font></em></h2>\n"; 272 mText +="<h2><em><font color=\"#000080\">" + i18n("Incomplete Todo:") + "</font></em></h2>\n";
273 mText += "<ul>\n"; 273 mText += "<ul>\n";
274 while (!gotone && priority<6) { 274 while (!gotone && priority<6) {
275 todo = todos.first(); 275 todo = todos.first();
276 while(todo) { 276 while(todo) {
277 if (!todo->isCompleted() && (todo->priority() == priority) ) { 277 if (!todo->isCompleted() && (todo->priority() == priority) ) {
278 if ( appendTodo(todo) ) 278 if ( appendTodo(todo) )
279 gotone = true; 279 gotone = true;
280 } 280 }
281 todo = todos.next(); 281 todo = todos.next();
282 } 282 }
283 if ( gotone ) { 283 if ( gotone ) {
284 gotone = false; 284 gotone = false;
285 ++priosFound; 285 ++priosFound;
286 if ( priosFound == topmostPrios ) 286 if ( priosFound == topmostPrios )
287 break; 287 break;
288 } 288 }
289 priority++; 289 priority++;
290 // kdDebug() << "adding the todos..." << endl; 290 // kdDebug() << "adding the todos..." << endl;
291 } 291 }
292 mText += "</ul>\n"; 292 mText += "</ul>\n";
293 } 293 }
294 294
295 int replys = 0; 295 int replys = 0;
296 events = calendar()->events(QDate::currentDate(), QDate(2975,12,6)); 296 events = calendar()->events(QDate::currentDate(), QDate(2975,12,6));
297 if (events.count() > 0) { 297 if (events.count() > 0) {
298 Event *ev = events.first(); 298 Event *ev = events.first();
299 while(ev) { 299 while(ev) {
300 Attendee *me = ev->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); 300 Attendee *me = ev->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email());
301 if (me!=0) { 301 if (me!=0) {
302 if (me->status()==Attendee::NeedsAction && me->RSVP()) { 302 if (me->status()==Attendee::NeedsAction && me->RSVP()) {
303 if (replys == 0) { 303 if (replys == 0) {
304 mText += "<p></p>"; 304 mText += "<p></p>";
305 // kil.loadIcon("reply",KIcon::NoGroup,22,KIcon::DefaultState,&ipath); 305 // kil.loadIcon("reply",KIcon::NoGroup,22,KIcon::DefaultState,&ipath);
306 //mText += "<h2>"; 306 //mText += "<h2>";
307 //<img src=\""; 307 //<img src=\"";
308 // mText += ipath; 308 // mText += ipath;
309 // mText += "\">"; 309 // mText += "\">";
310 //mText += i18n("Events and To-Dos that need a reply:") + "</h2>\n"; 310 //mText += i18n("Events and To-Dos that need a reply:") + "</h2>\n";
311 mText +="<h2><em><font color=\"#000080\">" + i18n("Events and To-Dos that need a reply:") + "</font></em></h2>\n"; 311 mText +="<h2><em><font color=\"#000080\">" + i18n("Events and To-Dos that need a reply:") + "</font></em></h2>\n";
312 mText += "<table>\n"; 312 mText += "<table>\n";
313 } 313 }
314 replys++; 314 replys++;
315 appendEvent(ev,true); 315 appendEvent(ev,true);
316 } 316 }
317 } 317 }
318 ev = events.next(); 318 ev = events.next();
319 } 319 }
320 } 320 }
321 todos = calendar()->todos(); 321 todos = calendar()->todos();
322 if (todos.count() > 0) { 322 if (todos.count() > 0) {
323 Todo *to = todos.first(); 323 Todo *to = todos.first();
324 while(to) { 324 while(to) {
325 if ( !to->isCompleted() ){ 325 if ( !to->isCompleted() ){
326 Attendee *me = to->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email()); 326 Attendee *me = to->attendeeByMails(KOPrefs::instance()->mAdditionalMails,KOPrefs::instance()->email());
327 if (me!=0) { 327 if (me!=0) {
328 if (me->status()==Attendee::NeedsAction && me->RSVP()) { 328 if (me->status()==Attendee::NeedsAction && me->RSVP()) {
329 if (replys == 0) { 329 if (replys == 0) {
330 mText +="<h2><em><font color=\"#000080\">" + i18n("Events and To-Dos that need a reply:") + "</font></em></h2>\n"; 330 mText +="<h2><em><font color=\"#000080\">" + i18n("Events and To-Dos that need a reply:") + "</font></em></h2>\n";
331 mText += "<table>\n"; 331 mText += "<table>\n";
332 } 332 }
333 replys++; 333 replys++;
334 appendEvent(to, true); 334 appendEvent(to, true);
335 } 335 }
336 } 336 }
337 } 337 }
338 to = todos.next(); 338 to = todos.next();
339 } 339 }
340 } 340 }
341 if (replys > 0 ) mText += "</table>\n"; 341 if (replys > 0 ) mText += "</table>\n";
342 342
343 343
344 mText += "</td></tr>\n</table>\n"; 344 mText += "</td></tr>\n</table>\n";
345 345
346 mView->setText(mText); 346 mView->setText(mText);
347 mView->setFocus(); 347 mView->setFocus();
348 348
349 // QPixmap bPix = SmallIcon( "back" ); 349 // QPixmap bPix = SmallIcon( "back" );
350 // qDebug("xxxxxxxxxxxxxxxxxxxxx "); 350 // qDebug("xxxxxxxxxxxxxxxxxxxxx ");
351 // QWidget* test = new QWidget(); 351 // QWidget* test = new QWidget();
352 // test->setBackgroundMode(FixedPixmap ); 352 // test->setBackgroundMode(FixedPixmap );
353 // test->setBackgroundPixmap ( bPix ); 353 // test->setBackgroundPixmap ( bPix );
354 // test->resize( 300, 400 ); 354 // test->resize( 300, 400 );
355 // test->show(); 355 // test->show();
356 // mView->setBackgroundMode(FixedPixmap ); 356 // mView->setBackgroundMode(FixedPixmap );
357 // mView->setBackgroundPixmap ( bPix ); 357 // mView->setBackgroundPixmap ( bPix );
358 // qDebug("%s ",mText.latin1()); 358 // qDebug("%s ",mText.latin1());
359} 359}
360 360
361void KOWhatsNextView::appendDay( int i, QDate eventDate ) 361void KOWhatsNextView::appendDay( int i, QDate eventDate )
362{ 362{
363 QString date; 363 QString date;
364 QString day = KGlobal::locale()->formatDate( eventDate , KOPrefs::instance()->mShortDateInViewer); 364 QString day = KGlobal::locale()->formatDate( eventDate , KOPrefs::instance()->mShortDateInViewer);
365 if ( ! KOPrefs::instance()->mShortDateInViewer && QApplication::desktop()->width() < 320 ) { 365 if ( ! KOPrefs::instance()->mShortDateInViewer && QApplication::desktop()->width() < 320 ) {
366 if ( i == 0 ) { 366 if ( i == 0 ) {
367 //mText += "<table>\n"; 367 //mText += "<table>\n";
368 return;//date = "<em><font color=\"#008000\"><em>" + day+"</font></em>"; 368 return;//date = "<em><font color=\"#008000\"><em>" + day+"</font></em>";
369 } 369 }
370 else if ( i == 1 ) 370 else if ( i == 1 )
371 date = "<em><font color=\"#000080\">" + day + "</font></em>" ; 371 date = "<em><font color=\"#000080\">" + day + "</font></em>" ;
372 else date = "<em><font color=\"#000080\">" + day + "</font></em>"; 372 else date = "<em><font color=\"#000080\">" + day + "</font></em>";
373 mText += "<h2>" + date + "</h2>\n"; 373 mText += "<h2>" + date + "</h2>\n";
374 //mText += "<big><big><strong>" + date + "</strong></big></big>\n"; 374 //mText += "<big><big><strong>" + date + "</strong></big></big>\n";
375 mText += "<table>\n"; 375 mText += "<table>\n";
376 376
377 377
378 378
379 } else { 379 } else {
380 if ( i == 0 ) { 380 if ( i == 0 ) {
381 //mText += "<table>\n"; 381 //mText += "<table>\n";
382 return;// date = "<font color=\"#008000\"><em>" +i18n("Today: ") +"</em>" + day+"</font>"; 382 return;// date = "<font color=\"#008000\"><em>" +i18n("Today: ") +"</em>" + day+"</font>";
383 } 383 }
384 384
385#ifdef DESKTOP_VERSION 385#ifdef DESKTOP_VERSION
386 else if ( i == 1 ) { 386 else if ( i == 1 ) {
387 date = "<h2><em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em></h2>" ; 387 date = "<h2><em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em></h2>" ;
388 } 388 }
389 else date = "<h2><em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em></h2>"; 389 else date = "<h2><em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em></h2>";
390#else 390#else
391 else if ( i == 1 ) { 391 else if ( i == 1 ) {
392 date = "<em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em>" ; 392 date = "<em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em>" ;
393 } 393 }
394 else date = "<em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em>"; 394 else date = "<em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em>";
395 395
396#endif 396#endif
397 mText += "<h2>" + date + "</h2>\n"; 397 mText += "<h2>" + date + "</h2>\n";
398 //mText += "<big><big><strong>" + date + "</strong></big></big>\n"; 398 //mText += "<big><big><strong>" + date + "</strong></big></big>\n";
399 mText += "<table>\n"; 399 mText += "<table>\n";
400 } 400 }
401} 401}
402 402
403 403
404void KOWhatsNextView::showDates(const QDate &, const QDate &) 404void KOWhatsNextView::showDates(const QDate &, const QDate &)
405{ 405{
406 updateView(); 406 updateView();
407} 407}
408 408
409void KOWhatsNextView::showEvents(QPtrList<Event>) 409void KOWhatsNextView::showEvents(QPtrList<Event>)
410{ 410{
411} 411}
412 412
413void KOWhatsNextView::changeEventDisplay(Event *, int action) 413void KOWhatsNextView::changeEventDisplay(Event *, int action)
414{ 414{
415 switch(action) { 415 switch(action) {
416 case KOGlobals::EVENTADDED: 416 case KOGlobals::EVENTADDED:
417 updateView(); 417 updateView();
418 break; 418 break;
419 case KOGlobals::EVENTEDITED: 419 case KOGlobals::EVENTEDITED:
420 updateView(); 420 updateView();
421 break; 421 break;
422 case KOGlobals::EVENTDELETED: 422 case KOGlobals::EVENTDELETED:
423 updateView(); 423 updateView();
424 break; 424 break;
425 default: 425 default:
426 updateView(); 426 updateView();
427 kdDebug() << "KOWhatsNextView::changeEventDisplay(): Illegal action " << action << endl; 427 kdDebug() << "KOWhatsNextView::changeEventDisplay(): Illegal action " << action << endl;
428 } 428 }
429} 429}
430 430
431bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool appendTable ) 431bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool appendTable )
432{ 432{
433 if ( !KOPrefs::instance()->mShowSyncEvents && ev->uid().left(15) == QString("last-syncEvent-") ) 433 if ( !KOPrefs::instance()->mShowSyncEvents && ev->uid().left(15) == QString("last-syncEvent-") )
434 return false; 434 return false;
435 QDateTime cdt = QDateTime::currentDateTime(); 435 QDateTime cdt = QDateTime::currentDateTime();
436 QDateTime noc; 436 QDateTime noc;
437 QString tempText; 437 QString tempText;
438 if ( appendTable && !notRed ) { 438 if ( appendTable && !notRed ) {
439 tempText = "<table>"; 439 tempText = "<table>";