Diffstat (limited to 'core/pim/datebook/datebookweeklst.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/datebookweeklst.cpp | 442 |
1 files changed, 0 insertions, 442 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp deleted file mode 100644 index 3c871ea..0000000 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/dev/null | |||
@@ -1,442 +0,0 @@ | |||
1 | #include "namespace_hack.h" | ||
2 | #include "datebookweeklst.h" | ||
3 | |||
4 | #include "datebook.h" | ||
5 | #include "datebooktypes.h" | ||
6 | |||
7 | #include <opie2/odebug.h> | ||
8 | |||
9 | #include <qpe/datebookmonth.h> | ||
10 | #include <qpe/config.h> | ||
11 | #include <qpe/ir.h> | ||
12 | #include <qpe/resource.h> | ||
13 | |||
14 | #include <qlayout.h> | ||
15 | #include <qtoolbutton.h> | ||
16 | #include <qtl.h> | ||
17 | |||
18 | bool calcWeek(const QDate &d, int &week, int &year,bool startOnMonday = false); | ||
19 | |||
20 | using namespace Opie::Ui; | ||
21 | DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent, const char* name, WFlags fl) | ||
22 | : DateBookWeekLstHeaderBase(parent, name, fl) | ||
23 | { | ||
24 | setBackgroundMode( PaletteButton ); | ||
25 | labelDate->setBackgroundMode( PaletteButton ); | ||
26 | forwardweek->setBackgroundMode( PaletteButton ); | ||
27 | forwardweek->setPixmap( Resource::loadPixmap("forward") ); | ||
28 | forwardmonth->setBackgroundMode( PaletteButton ); | ||
29 | forwardmonth->setPixmap( Resource::loadPixmap("fastforward") ); | ||
30 | backweek->setBackgroundMode( PaletteButton ); | ||
31 | backweek->setPixmap( Resource::loadPixmap("back") ); | ||
32 | backmonth->setBackgroundMode( PaletteButton ); | ||
33 | backmonth->setPixmap( Resource::loadPixmap("fastback") ); | ||
34 | DateBookWeekLstHeaderBaseLayout->setSpacing(0); | ||
35 | DateBookWeekLstHeaderBaseLayout->setMargin(0); | ||
36 | //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); | ||
37 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); | ||
38 | |||
39 | connect(backmonth, SIGNAL(clicked()), this, SLOT(prevMonth())); | ||
40 | connect(backweek, SIGNAL(clicked()), this, SLOT(prevWeek())); | ||
41 | connect(forwardweek, SIGNAL(clicked()), this, SLOT(nextWeek())); | ||
42 | connect(forwardmonth, SIGNAL(clicked()), this, SLOT(nextMonth())); | ||
43 | connect(labelDate, SIGNAL(clicked()), this, SLOT(pickDate())); | ||
44 | connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool))); | ||
45 | bStartOnMonday=onM; | ||
46 | } | ||
47 | DateBookWeekLstHeader::~DateBookWeekLstHeader(){} | ||
48 | |||
49 | void DateBookWeekLstHeader::setDate(const QDate &d) { | ||
50 | int year,week,dayofweek; | ||
51 | date=d; | ||
52 | dayofweek=d.dayOfWeek(); | ||
53 | if(bStartOnMonday) | ||
54 | dayofweek--; | ||
55 | else if( dayofweek == 7 ) | ||
56 | /* we already have the right day -7 would lead to the same week */ | ||
57 | dayofweek = 0; | ||
58 | |||
59 | date=date.addDays(-dayofweek); | ||
60 | |||
61 | calcWeek(date,week,year,bStartOnMonday); | ||
62 | QDate start=date; | ||
63 | QDate stop=start.addDays(6); | ||
64 | labelDate->setText( QString::number(start.day()) + "." + | ||
65 | Calendar::nameOfMonth( start.month() ) + "-" + | ||
66 | QString::number(stop.day()) + "." + | ||
67 | Calendar::nameOfMonth( stop.month()) +" ("+ | ||
68 | tr("w")+":"+QString::number( week ) +")"); | ||
69 | date = d; // bugfix: 0001126 - date has to be the selected date, not monday! | ||
70 | emit dateChanged(date); | ||
71 | } | ||
72 | |||
73 | void DateBookWeekLstHeader::pickDate() { | ||
74 | static QPopupMenu *m1 = 0; | ||
75 | static DateBookMonth *picker = 0; | ||
76 | if ( !m1 ) { | ||
77 | m1 = new QPopupMenu( this ); | ||
78 | picker = new DateBookMonth( m1, 0, TRUE ); | ||
79 | m1->insertItem( picker ); | ||
80 | connect( picker, SIGNAL( dateClicked(int,int,int) ),this, SLOT( setDate(int,int,int) ) ); | ||
81 | //connect( m1, SIGNAL( aboutToHide() ), | ||
82 | //this, SLOT( gotHide() ) ); | ||
83 | } | ||
84 | picker->setDate( date.year(), date.month(), date.day() ); | ||
85 | m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); | ||
86 | picker->setFocus(); | ||
87 | } | ||
88 | void DateBookWeekLstHeader::setDate(int y, int m, int d) { | ||
89 | setDate(QDate(y,m,d)); | ||
90 | } | ||
91 | |||
92 | void DateBookWeekLstHeader::nextWeek() { | ||
93 | setDate(date.addDays(7)); | ||
94 | } | ||
95 | void DateBookWeekLstHeader::prevWeek() { | ||
96 | setDate(date.addDays(-7)); | ||
97 | } | ||
98 | void DateBookWeekLstHeader::nextMonth() | ||
99 | { | ||
100 | setDate(date.addDays(28)); | ||
101 | } | ||
102 | void DateBookWeekLstHeader::prevMonth() | ||
103 | { | ||
104 | setDate(date.addDays(-28)); | ||
105 | } | ||
106 | |||
107 | DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /* onM */, | ||
108 | QWidget* parent, | ||
109 | const char* name, | ||
110 | WFlags fl ) | ||
111 | : DateBookWeekLstDayHdrBase(parent, name, fl) { | ||
112 | |||
113 | date=d; | ||
114 | |||
115 | static const QString wdays=tr("MTWTFSSM", "Week days"); | ||
116 | char day=wdays[d.dayOfWeek()-1]; | ||
117 | |||
118 | //dont use dayOfWeek() to save space ! | ||
119 | label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) ); | ||
120 | |||
121 | add->setText("+"); | ||
122 | |||
123 | if (d == QDate::currentDate()) { | ||
124 | QPalette pal=label->palette(); | ||
125 | pal.setColor(QColorGroup::Foreground, QColor(0,0,255)); | ||
126 | label->setPalette(pal); | ||
127 | |||
128 | /* | ||
129 | QFont f=label->font(); | ||
130 | f.setItalic(true); | ||
131 | label->setFont(f); | ||
132 | label->setPalette(QPalette(QColor(0,0,255),label->backgroundColor())); | ||
133 | */ | ||
134 | } else if (d.dayOfWeek() == 7) { // FIXME: Match any holiday | ||
135 | QPalette pal=label->palette(); | ||
136 | pal.setColor(QColorGroup::Foreground, QColor(255,0,0)); | ||
137 | label->setPalette(pal); | ||
138 | } | ||
139 | |||
140 | connect (label, SIGNAL(clicked()), this, SLOT(showDay())); | ||
141 | connect (add, SIGNAL(clicked()), this, SLOT(newEvent())); | ||
142 | } | ||
143 | |||
144 | void DateBookWeekLstDayHdr::showDay() { | ||
145 | emit showDate(date.year(), date.month(), date.day()); | ||
146 | } | ||
147 | |||
148 | void DateBookWeekLstDayHdr::newEvent() { | ||
149 | QDateTime start, stop; | ||
150 | start=stop=date; | ||
151 | start.setTime(QTime(10,0)); | ||
152 | stop.setTime(QTime(12,0)); | ||
153 | |||
154 | emit addEvent(start,stop,"",0); | ||
155 | } | ||
156 | DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev, | ||
157 | int weeklistviewconfig, | ||
158 | QWidget* parent, | ||
159 | const char* name, | ||
160 | WFlags fl ) : OClickableLabel(parent,name,fl), event(ev) | ||
161 | { | ||
162 | // old values... lastday = "__|__", middle=" |---", Firstday="00:00", | ||
163 | QString s,start,middle,end,day; | ||
164 | |||
165 | odebug << "weeklistviewconfig=" << weeklistviewconfig << oendl; | ||
166 | if(weeklistviewconfig==NONE) { // No times displayed. | ||
167 | // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute()); | ||
168 | // middle.sprintf("<--->"); | ||
169 | // end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute()); | ||
170 | // day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute()); | ||
171 | } else if(weeklistviewconfig==NORMAL) { // "Normal", only display start time. | ||
172 | start.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute()); | ||
173 | middle.sprintf(" |---"); | ||
174 | end.sprintf("__|__"); | ||
175 | day.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute()); | ||
176 | } else if(weeklistviewconfig==EXTENDED) { // Extended mode, display start and end times. | ||
177 | start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute()); | ||
178 | middle.sprintf("<--->"); | ||
179 | end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute()); | ||
180 | day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute()); | ||
181 | } | ||
182 | |||
183 | if(ev.event().type() == Event::Normal) { | ||
184 | if(ev.startDate()==ev.date() && ev.endDate()==ev.date()) { // day event. | ||
185 | s=day; | ||
186 | } else if(ev.startDate()==ev.date()) { // start event. | ||
187 | s=start; | ||
188 | } else if(ev.endDate()==ev.date()) { // end event. | ||
189 | s=end; | ||
190 | } else { // middle day. | ||
191 | s=middle; | ||
192 | } | ||
193 | } else { | ||
194 | s=""; | ||
195 | } | ||
196 | setText(QString(s) + " " + ev.description()); | ||
197 | // connect(this, SIGNAL(clicked()), this, SLOT(editMe())); | ||
198 | setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); | ||
199 | } | ||
200 | void DateBookWeekLstEvent::editMe() { | ||
201 | emit editEvent(event.event()); | ||
202 | } | ||
203 | void DateBookWeekLstEvent::duplicateMe() | ||
204 | { | ||
205 | emit duplicateEvent(event.event()); | ||
206 | } | ||
207 | void DateBookWeekLstEvent::deleteMe() | ||
208 | { | ||
209 | emit removeEvent(event.event()); | ||
210 | emit redraw(); | ||
211 | } | ||
212 | void DateBookWeekLstEvent::beamMe() | ||
213 | { | ||
214 | emit beamEvent( event.event() ); | ||
215 | } | ||
216 | void DateBookWeekLstEvent::mousePressEvent( QMouseEvent *e ) | ||
217 | { | ||
218 | if (!event.event().isValidUid()) { | ||
219 | // this is just such a holiday event. | ||
220 | return; | ||
221 | } | ||
222 | popmenue = new QPopupMenu; | ||
223 | |||
224 | popmenue->insertItem( tr( "Edit" ), this, SLOT(editMe())); | ||
225 | popmenue->insertItem( tr( "Duplicate" ), this, SLOT(duplicateMe())); | ||
226 | popmenue->insertItem( tr( "Delete" ), this, SLOT(deleteMe())); | ||
227 | if(Ir::supported()) | ||
228 | popmenue->insertItem( tr( "Beam" ), this, SLOT(beamMe())); | ||
229 | popmenue->popup( mapToGlobal( e->pos() )); | ||
230 | } | ||
231 | |||
232 | DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, | ||
233 | const QDate &d, bool onM, | ||
234 | QWidget* parent, | ||
235 | const char* name, WFlags fl) | ||
236 | : QWidget( parent, name, fl ) | ||
237 | { | ||
238 | Config config("DateBook"); | ||
239 | config.setGroup("Main"); | ||
240 | int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL); | ||
241 | odebug << "weeklistviewconfig: " << weeklistviewconfig << oendl; | ||
242 | |||
243 | bStartOnMonday=onM; | ||
244 | setPalette(white); | ||
245 | setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); | ||
246 | |||
247 | QVBoxLayout *layout = new QVBoxLayout( this ); | ||
248 | |||
249 | qBubbleSort(ev); | ||
250 | QValueListIterator<EffectiveEvent> it; | ||
251 | it=ev.begin(); | ||
252 | |||
253 | int dayOrder[7]; | ||
254 | if (bStartOnMonday) { | ||
255 | for (int d=0; d<7; d++) dayOrder[d]=d+1; | ||
256 | } else { | ||
257 | for (int d=0; d<7; d++) dayOrder[d]=d; | ||
258 | dayOrder[0]=7; | ||
259 | } | ||
260 | |||
261 | // Calculate offset to first day of week. | ||
262 | int dayoffset=d.dayOfWeek(); | ||
263 | if(bStartOnMonday) dayoffset--; | ||
264 | else if( dayoffset == 7 ) dayoffset = 0; | ||
265 | |||
266 | for (int i=0; i<7; i++) { | ||
267 | // Header | ||
268 | DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,this); | ||
269 | connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | ||
270 | connect(hdr, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | ||
271 | this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); | ||
272 | layout->addWidget(hdr); | ||
273 | |||
274 | // Events | ||
275 | while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { | ||
276 | if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) { // Skip events ending at 00:00 starting at another day. | ||
277 | DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,this); | ||
278 | layout->addWidget(l); | ||
279 | connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | ||
280 | connect (l, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
281 | connect (l, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
282 | connect (l, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
283 | connect (l, SIGNAL(redraw()), this, SIGNAL(redraw())); | ||
284 | } | ||
285 | it++; | ||
286 | } | ||
287 | layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding)); | ||
288 | } | ||
289 | } | ||
290 | DateBookWeekLstView::~DateBookWeekLstView(){} | ||
291 | void DateBookWeekLstView::keyPressEvent(QKeyEvent *e) {e->ignore();} | ||
292 | |||
293 | DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, | ||
294 | QValueList<EffectiveEvent> &ev2, | ||
295 | QDate &d, bool onM, | ||
296 | QWidget* parent, | ||
297 | const char* name, WFlags fl) | ||
298 | : QWidget( parent, name, fl ) | ||
299 | { | ||
300 | QHBoxLayout *layout = new QHBoxLayout( this ); | ||
301 | |||
302 | DateBookWeekLstView *w=new DateBookWeekLstView(ev1,d,onM,this); | ||
303 | layout->addWidget(w); | ||
304 | connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | ||
305 | connect (w, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
306 | connect (w, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
307 | connect (w, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
308 | connect (w, SIGNAL(redraw()), this, SIGNAL(redraw())); | ||
309 | connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | ||
310 | connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | ||
311 | this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); | ||
312 | |||
313 | |||
314 | w=new DateBookWeekLstView(ev2,d.addDays(7),onM,this); | ||
315 | layout->addWidget(w); | ||
316 | connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | ||
317 | connect (w, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
318 | connect (w, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
319 | connect (w, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
320 | connect (w, SIGNAL(redraw()), this, SIGNAL(redraw())); | ||
321 | connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | ||
322 | connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | ||
323 | this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); | ||
324 | } | ||
325 | |||
326 | DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDBHoliday *newDB, | ||
327 | QWidget *parent, | ||
328 | const char *name ) | ||
329 | : QWidget( parent, name ), | ||
330 | db( newDB ), | ||
331 | startTime( 0 ), | ||
332 | ampm( ap ), | ||
333 | bStartOnMonday(onM) | ||
334 | { | ||
335 | setFocusPolicy(StrongFocus); | ||
336 | layout = new QVBoxLayout( this ); | ||
337 | layout->setMargin(0); | ||
338 | |||
339 | header=new DateBookWeekLstHeader(onM, this); | ||
340 | layout->addWidget( header ); | ||
341 | connect(header, SIGNAL(dateChanged(QDate&)), this, SLOT(dateChanged(QDate&))); | ||
342 | connect(header, SIGNAL(setDbl(bool)), this, SLOT(setDbl(bool))); | ||
343 | |||
344 | scroll=new QScrollView(this); | ||
345 | scroll->setResizePolicy(QScrollView::AutoOneFit); | ||
346 | layout->addWidget(scroll); | ||
347 | |||
348 | view=NULL; | ||
349 | Config config("DateBook"); | ||
350 | config.setGroup("Main"); | ||
351 | dbl=config.readBoolEntry("weeklst_dbl", false); | ||
352 | header->dbl->setOn(dbl); | ||
353 | } | ||
354 | DateBookWeekLst::~DateBookWeekLst(){ | ||
355 | Config config("DateBook"); | ||
356 | config.setGroup("Main"); | ||
357 | config.writeEntry("weeklst_dbl", dbl); | ||
358 | } | ||
359 | |||
360 | void DateBookWeekLst::setDate(const QDate &d) { | ||
361 | bdate=d; | ||
362 | header->setDate(d); | ||
363 | } | ||
364 | |||
365 | void DateBookWeekLst::setDbl(bool on) { | ||
366 | dbl=on; | ||
367 | redraw(); | ||
368 | } | ||
369 | void DateBookWeekLst::redraw() {getEvents();} | ||
370 | |||
371 | QDate DateBookWeekLst::date() { | ||
372 | return bdate; | ||
373 | } | ||
374 | |||
375 | // return the date at the beginning of the week... | ||
376 | // copied from DateBookWeek | ||
377 | QDate DateBookWeekLst::weekDate() const | ||
378 | { | ||
379 | QDate d=bdate; | ||
380 | |||
381 | // Calculate offset to first day of week. | ||
382 | int dayoffset=d.dayOfWeek(); | ||
383 | if(bStartOnMonday) dayoffset--; | ||
384 | else if( dayoffset == 7 ) | ||
385 | dayoffset = 0; | ||
386 | |||
387 | return d.addDays(-dayoffset); | ||
388 | } | ||
389 | |||
390 | void DateBookWeekLst::getEvents() { | ||
391 | QDate start = weekDate(); //date(); | ||
392 | QDate stop = start.addDays(6); | ||
393 | QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop); | ||
394 | |||
395 | if (view) delete view; | ||
396 | if (dbl) { | ||
397 | QDate start2=start.addDays(7); | ||
398 | stop=start2.addDays(6); | ||
399 | QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop); | ||
400 | view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll); | ||
401 | } else { | ||
402 | view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll); | ||
403 | } | ||
404 | |||
405 | connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); | ||
406 | connect (view, SIGNAL(duplicateEvent(const Event &)), this, SIGNAL(duplicateEvent(const Event &))); | ||
407 | connect (view, SIGNAL(removeEvent(const Event &)), this, SIGNAL(removeEvent(const Event &))); | ||
408 | connect (view, SIGNAL(beamEvent(const Event &)), this, SIGNAL(beamEvent(const Event &))); | ||
409 | connect (view, SIGNAL(redraw()), this, SLOT(redraw())); | ||
410 | connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); | ||
411 | connect (view, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), | ||
412 | this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); | ||
413 | |||
414 | scroll->addChild(view); | ||
415 | view->show(); | ||
416 | scroll->updateScrollBars(); | ||
417 | } | ||
418 | |||
419 | void DateBookWeekLst::dateChanged(QDate &newdate) { | ||
420 | bdate=newdate; | ||
421 | getEvents(); | ||
422 | } | ||
423 | |||
424 | void DateBookWeekLst::keyPressEvent(QKeyEvent *e) | ||
425 | { | ||
426 | switch(e->key()) { | ||
427 | case Key_Up: | ||
428 | scroll->scrollBy(0, -20); | ||
429 | break; | ||
430 | case Key_Down: | ||
431 | scroll->scrollBy(0, 20); | ||
432 | break; | ||
433 | case Key_Left: | ||
434 | header->prevWeek(); | ||
435 | break; | ||
436 | case Key_Right: | ||
437 | header->nextWeek(); | ||
438 | break; | ||
439 | default: | ||
440 | e->ignore(); | ||
441 | } | ||
442 | } | ||