summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
Unidiff
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp38
1 files changed, 22 insertions, 16 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index f88403c..bfe930f 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -1,173 +1,179 @@
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 19
20#include <qlayout.h> 20#include <qlayout.h>
21#include <qtextbrowser.h> 21#include <q3textbrowser.h>
22#include <qtextcodec.h> 22#include <qtextcodec.h>
23#include <qfileinfo.h> 23#include <qfileinfo.h>
24#include <qlabel.h> 24#include <qlabel.h>
25 25
26#include <qapplication.h> 26#include <qapplication.h>
27#include <QDesktopWidget>
27#ifdef DESKTOP_VERSION 28#ifdef DESKTOP_VERSION
28#include <qpaintdevicemetrics.h> 29#include <q3paintdevicemetrics.h>
30//Added by qt3to4:
31#include <Q3PtrList>
32#include <QHideEvent>
33#include <Q3VBoxLayout>
34#include <QShowEvent>
29#endif 35#endif
30#include <kglobal.h> 36#include <kglobal.h>
31#include <klocale.h> 37#include <klocale.h>
32#include <kdebug.h> 38#include <kdebug.h>
33#include <kiconloader.h> 39#include <kiconloader.h>
34#include <kmessagebox.h> 40#include <kmessagebox.h>
35 41
36#include <libkcal/calendar.h> 42#include <libkcal/calendar.h>
37 43
38#ifndef KORG_NOPRINTER 44#ifndef KORG_NOPRINTER
39#include "calprinter.h" 45#include "calprinter.h"
40#endif 46#endif
41#include "koglobals.h" 47#include "koglobals.h"
42#include "koprefs.h" 48#include "koprefs.h"
43#include "koeventviewerdialog.h" 49#include "koeventviewerdialog.h"
44#include "koeventviewer.h" 50#include "koeventviewer.h"
45#include <qstylesheet.h> 51#include <q3stylesheet.h>
46#include "kowhatsnextview.h" 52#include "kowhatsnextview.h"
47using namespace KOrg; 53using namespace KOrg;
48 54
49void WhatsNextTextBrowser::setSource(const QString& n) 55void WhatsNextTextBrowser::setSource(const QString& n)
50{ 56{
51 57
52 if (n.startsWith("event:")) { 58 if (n.startsWith("event:")) {
53 emit showIncidence(n); 59 emit showIncidence(n);
54 return; 60 return;
55 } else if (n.startsWith("todo:")) { 61 } else if (n.startsWith("todo:")) {
56 emit showIncidence(n); 62 emit showIncidence(n);
57 return; 63 return;
58 } else { 64 } else {
59 QTextBrowser::setSource(n); 65 Q3TextBrowser::setSource(n);
60 } 66 }
61} 67}
62void WhatsNextTextBrowser::printMe() 68void WhatsNextTextBrowser::printMe()
63{ 69{
64#ifdef DESKTOP_VERSION 70#ifdef DESKTOP_VERSION
65 KOPrintPrefs pp ( this ); 71 KOPrintPrefs pp ( this );
66 if (!pp.exec() ) 72 if (!pp.exec() )
67 return; 73 return;
68 int scaleval = pp.printMode() ; 74 int scaleval = pp.printMode() ;
69 75
70 QPrinter printer; 76 QPrinter printer;
71 if (!printer.setup() ) 77 if (!printer.setup() )
72 return; 78 return;
73 QPainter p; 79 QPainter p;
74 p.begin ( &printer ); 80 p.begin ( &printer );
75 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer ); 81 Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( &printer );
76 float dx, dy; 82 float dx, dy;
77 int wid = (m.width() * 9)/10; 83 int wid = (m.width() * 9)/10;
78 dx = (float) wid/(float)contentsWidth (); 84 dx = (float) wid/(float)contentsWidth ();
79 dy = (float)(m.height()) / (float)contentsHeight (); 85 dy = (float)(m.height()) / (float)contentsHeight ();
80 float scale; 86 float scale;
81 // scale to fit the width or height of the paper 87 // scale to fit the width or height of the paper
82 if ( dx < dy ) 88 if ( dx < dy )
83 scale = dx; 89 scale = dx;
84 else 90 else
85 scale = dy; 91 scale = dy;
86 p.translate( m.width()/10,0 ); 92 p.translate( m.width()/10,0 );
87 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) { 93 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
88 p.scale( scale, scale ); 94 p.scale( scale, scale );
89 } 95 }
90 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () ); 96 drawContents ( &p, 0,0, contentsWidth (), contentsHeight () );
91 p.end(); 97 p.end();
92#endif 98#endif
93} 99}
94 100
95KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, 101KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent,
96 const char *name) 102 const char *name)
97 : KOrg::BaseView(calendar, parent, name) 103 : KOrg::BaseView(calendar, parent, name)
98{ 104{
99 // mDateLabel = 105 // mDateLabel =
100 // new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this); 106 // new QLabel(KGlobal::locale()->formatDate(QDate::currentDate()),this);
101 // mDateLabel->setMargin(2); 107 // mDateLabel->setMargin(2);
102 // mDateLabel->setAlignment(AlignCenter); 108 // mDateLabel->setAlignment(AlignCenter);
103 setFont( KOPrefs::instance()->mWhatsNextFont ); 109 setFont( KOPrefs::instance()->mWhatsNextFont );
104 mView = new WhatsNextTextBrowser(this); 110 mView = new WhatsNextTextBrowser(this);
105 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &))); 111 connect(mView,SIGNAL(showIncidence(const QString &)),SLOT(showIncidence(const QString &)));
106 QStyleSheet* stsh = mView->styleSheet(); 112 Q3StyleSheet* stsh = mView->styleSheet();
107 QStyleSheetItem * style ; 113 Q3StyleSheetItem * style ;
108 style = stsh->item ("h2" ); 114 style = stsh->item ("h2" );
109 if ( style ) { 115 if ( style ) {
110 style->setMargin(QStyleSheetItem::MarginAll,0); 116 style->setMargin(Q3StyleSheetItem::MarginAll,0);
111 } 117 }
112 style = stsh->item ("h3" ); 118 style = stsh->item ("h3" );
113 if ( style ) { 119 if ( style ) {
114 style->setMargin(QStyleSheetItem::MarginAll,0); 120 style->setMargin(Q3StyleSheetItem::MarginAll,0);
115 } 121 }
116 mEventViewer = 0; 122 mEventViewer = 0;
117 123
118 QBoxLayout *topLayout = new QVBoxLayout(this); 124 Q3BoxLayout *topLayout = new Q3VBoxLayout(this);
119 // topLayout->addWidget(mDateLabel); 125 // topLayout->addWidget(mDateLabel);
120 topLayout->addWidget(mView); 126 topLayout->addWidget(mView);
121 mTimer = new QTimer( this ); 127 mTimer = new QTimer( this );
122 connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView())); 128 connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView()));
123 129
124 connect(mView->horizontalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); 130 connect(mView->horizontalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer()));
125 connect(mView->verticalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); 131 connect(mView->verticalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer()));
126} 132}
127 133
128KOWhatsNextView::~KOWhatsNextView() 134KOWhatsNextView::~KOWhatsNextView()
129{ 135{
130} 136}
131 137
132int KOWhatsNextView::maxDatesHint() 138int KOWhatsNextView::maxDatesHint()
133{ 139{
134 return 0; 140 return 0;
135} 141}
136 142
137int KOWhatsNextView::currentDateCount() 143int KOWhatsNextView::currentDateCount()
138{ 144{
139 return 0; 145 return 0;
140} 146}
141 147
142void KOWhatsNextView::clearList() 148void KOWhatsNextView::clearList()
143{ 149{
144 mTimer->stop(); 150 mTimer->stop();
145 mView->setText(" "); 151 mView->setText(" ");
146} 152}
147QPtrList<Incidence> KOWhatsNextView::selectedIncidences() 153Q3PtrList<Incidence> KOWhatsNextView::selectedIncidences()
148{ 154{
149 QPtrList<Incidence> eventList; 155 Q3PtrList<Incidence> eventList;
150 156
151 return eventList; 157 return eventList;
152} 158}
153 159
154void KOWhatsNextView::printMe() 160void KOWhatsNextView::printMe()
155{ 161{
156#ifdef DESKTOP_VERSION 162#ifdef DESKTOP_VERSION
157 mView->printMe(); 163 mView->printMe();
158#endif 164#endif
159} 165}
160void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd, 166void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd,
161 const QDate &td) 167 const QDate &td)
162{ 168{
163#ifndef KORG_NOPRINTER 169#ifndef KORG_NOPRINTER
164 calPrinter->preview(CalPrinter::Day, fd, td); 170 calPrinter->preview(CalPrinter::Day, fd, td);
165#endif 171#endif
166} 172}
167void KOWhatsNextView::updateConfig() 173void KOWhatsNextView::updateConfig()
168{ 174{
169 setFont( KOPrefs::instance()->mWhatsNextFont ); 175 setFont( KOPrefs::instance()->mWhatsNextFont );
170 updateView(); 176 updateView();
171 177
172} 178}
173void KOWhatsNextView::showEvent ( QShowEvent * e ) 179void KOWhatsNextView::showEvent ( QShowEvent * e )
@@ -198,50 +204,50 @@ void KOWhatsNextView::updateView()
198 // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate())); 204 // mDateLabel->setText(KGlobal::locale()->formatDate(QDate::currentDate()));
199 KIconLoader kil("korganizer"); 205 KIconLoader kil("korganizer");
200 QString ipath;// = new QString(); 206 QString ipath;// = new QString();
201 // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath); 207 // kil.loadIcon("korganizer",KIcon::NoGroup,32,KIcon::DefaultState,&ipath);
202 //<big><big><strong>" + date + "</strong></big></big>\n"; 208 //<big><big><strong>" + date + "</strong></big></big>\n";
203 mText = "<table width=\"100%\">\n"; 209 mText = "<table width=\"100%\">\n";
204 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>"; 210 //mText += "<tr bgcolor=\"#3679AD\"><td><h2>";
205#ifdef DESKTOP_VERSION 211#ifdef DESKTOP_VERSION
206 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h1>"; 212 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h1>";
207#else 213#else
208 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>"; 214 mText += "<tr bgcolor=\"#5699CD\"><td align=\"center\"><h2>";
209#endif 215#endif
210 // mText += "<img src=\""; 216 // mText += "<img src=\"";
211 // mText += ipath; 217 // mText += ipath;
212 // mText += "\">"; 218 // mText += "\">";
213 mEventDate = QDate::currentDate(); 219 mEventDate = QDate::currentDate();
214#ifdef DESKTOP_VERSION 220#ifdef DESKTOP_VERSION
215 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h1>"; 221 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h1>";
216#else 222#else
217 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h2>"; 223 mText += "<font color=\"#FFFFFF\"> <em>" + KGlobal::locale()->formatDate( mEventDate , false )+"</em></font></h2>";
218#endif 224#endif
219 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>"; 225 mText += "</td></tr>\n<tr bgcolor=\"#EAF8FA\"><td>";
220 int iii; 226 int iii;
221 mTodos.clear(); 227 mTodos.clear();
222 QPtrList<Event> events; 228 Q3PtrList<Event> events;
223 QPtrList<Todo> todos = calendar()->todos(); 229 Q3PtrList<Todo> todos = calendar()->todos();
224 Todo * todo; 230 Todo * todo;
225 //mText += "<h2>" + i18n("Events: ") + "</h2>\n"; 231 //mText += "<h2>" + i18n("Events: ") + "</h2>\n";
226 int daysToShow = KOPrefs::instance()->mWhatsNextDays ; 232 int daysToShow = KOPrefs::instance()->mWhatsNextDays ;
227 bool itemAdded = false; 233 bool itemAdded = false;
228 for ( iii = 0; iii < daysToShow; ++iii ) { 234 for ( iii = 0; iii < daysToShow; ++iii ) {
229 QString date; 235 QString date;
230 itemAdded = false; 236 itemAdded = false;
231 events = calendar()->events( mEventDate, true ); 237 events = calendar()->events( mEventDate, true );
232 238
233 if ( iii == 0 ) { // today !!! 239 if ( iii == 0 ) { // today !!!
234 todo = todos.first(); 240 todo = todos.first();
235 while(todo) { 241 while(todo) {
236 if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() < mEventDate ) { 242 if ( !todo->isCompleted() &&todo->hasDueDate() && todo->dtDue().date() < mEventDate ) {
237 if ( ! itemAdded ) { 243 if ( ! itemAdded ) {
238 appendDay ( iii, mEventDate ); 244 appendDay ( iii, mEventDate );
239 //itemAdded = true; 245 //itemAdded = true;
240 246
241 } //bool reply=false, bool notRed = true, bool appendTable = false); 247 } //bool reply=false, bool notRed = true, bool appendTable = false);
242 appendEvent(todo, false, false, !itemAdded ); 248 appendEvent(todo, false, false, !itemAdded );
243 itemAdded = true; 249 itemAdded = true;
244 } 250 }
245 todo = todos.next(); 251 todo = todos.next();
246 } 252 }
247 } 253 }
@@ -433,49 +439,49 @@ void KOWhatsNextView::appendDay( int i, QDate eventDate )
433#ifdef DESKTOP_VERSION 439#ifdef DESKTOP_VERSION
434 else if ( i == 1 ) { 440 else if ( i == 1 ) {
435 date = "<h2><em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em></h2>" ; 441 date = "<h2><em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em></h2>" ;
436 } 442 }
437 else date = "<h2><em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em></h2>"; 443 else date = "<h2><em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em></h2>";
438#else 444#else
439 else if ( i == 1 ) { 445 else if ( i == 1 ) {
440 date = "<em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em>" ; 446 date = "<em><font color=\"#000080\">" + i18n("Tomorrow: ") + day +"</font></em>" ;
441 } 447 }
442 else date = "<em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em>"; 448 else date = "<em><font color=\"#000080\">" + i18n("In %1 days: ").arg( i ) +day + "</font></em>";
443 449
444#endif 450#endif
445 mText += "<h2>" + date + "</h2>\n"; 451 mText += "<h2>" + date + "</h2>\n";
446 //mText += "<big><big><strong>" + date + "</strong></big></big>\n"; 452 //mText += "<big><big><strong>" + date + "</strong></big></big>\n";
447 mText += "<table>\n"; 453 mText += "<table>\n";
448 } 454 }
449} 455}
450 456
451 457
452void KOWhatsNextView::showDates(const QDate &, const QDate &) 458void KOWhatsNextView::showDates(const QDate &, const QDate &)
453{ 459{
454 updateView(); 460 updateView();
455} 461}
456 462
457void KOWhatsNextView::showEvents(QPtrList<Event>) 463void KOWhatsNextView::showEvents(Q3PtrList<Event>)
458{ 464{
459} 465}
460 466
461void KOWhatsNextView::changeEventDisplay(Event *, int action) 467void KOWhatsNextView::changeEventDisplay(Event *, int action)
462{ 468{
463 switch(action) { 469 switch(action) {
464 case KOGlobals::EVENTADDED: 470 case KOGlobals::EVENTADDED:
465 updateView(); 471 updateView();
466 break; 472 break;
467 case KOGlobals::EVENTEDITED: 473 case KOGlobals::EVENTEDITED:
468 updateView(); 474 updateView();
469 break; 475 break;
470 case KOGlobals::EVENTDELETED: 476 case KOGlobals::EVENTDELETED:
471 updateView(); 477 updateView();
472 break; 478 break;
473 default: 479 default:
474 updateView(); 480 updateView();
475 kdDebug() << "KOWhatsNextView::changeEventDisplay(): Illegal action " << action << endl; 481 kdDebug() << "KOWhatsNextView::changeEventDisplay(): Illegal action " << action << endl;
476 } 482 }
477} 483}
478 484
479bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool appendTable ) 485bool KOWhatsNextView::appendEvent(Incidence *ev, bool reply, bool notRed, bool appendTable )
480{ 486{
481 if ( !KOPrefs::instance()->mShowSyncEvents && ev->uid().left(15) == QString("last-syncEvent-") ) 487 if ( !KOPrefs::instance()->mShowSyncEvents && ev->uid().left(15) == QString("last-syncEvent-") )
@@ -720,49 +726,49 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub )
720 mText += i18n("-no summary-"); 726 mText += i18n("-no summary-");
721 mText += "</a>"; 727 mText += "</a>";
722 if ( ((Todo*)ev)->hasDueDate () ) { 728 if ( ((Todo*)ev)->hasDueDate () ) {
723 QString year = ""; 729 QString year = "";
724 int ye = ((Todo*)ev)->dtDue().date().year(); 730 int ye = ((Todo*)ev)->dtDue().date().year();
725 if ( QDateTime::currentDateTime().date().year() != ye ) 731 if ( QDateTime::currentDateTime().date().year() != ye )
726 year = QString::number( ye ); 732 year = QString::number( ye );
727 QString dfs = KGlobal::locale()->dateFormatShort(); 733 QString dfs = KGlobal::locale()->dateFormatShort();
728 KGlobal::locale()->setDateFormatShort("%d.%b"); 734 KGlobal::locale()->setDateFormatShort("%d.%b");
729 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>"; 735 mText +="<font color=\"#00A000\"> [" + KGlobal::locale()->formatDate(((Todo*)ev)->dtDue().date(), true, KLocale::Userdefined) + "."+ year +"]</font>";
730 KGlobal::locale()->setDateFormatShort(dfs); 736 KGlobal::locale()->setDateFormatShort(dfs);
731 } 737 }
732 if ( KOPrefs::instance()->mWNViewShowLocation ) 738 if ( KOPrefs::instance()->mWNViewShowLocation )
733 if ( !ev->location().isEmpty() ) 739 if ( !ev->location().isEmpty() )
734 mText += " ("+ev->location() +")"; 740 mText += " ("+ev->location() +")";
735 if ( !isSub ) { 741 if ( !isSub ) {
736 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents) 742 if ( ((Todo*)ev)->relatedTo()&& KOPrefs::instance()->mWNViewShowsParents)
737 mText += " ["+ev->relatedTo()->summary() +"]"; 743 mText += " ["+ev->relatedTo()->summary() +"]";
738 mText += "</p>\n"; 744 mText += "</p>\n";
739 } 745 }
740 else { 746 else {
741 ind += "-"; 747 ind += "-";
742 mText += "</li>\n"; 748 mText += "</li>\n";
743 } 749 }
744 QPtrList<Incidence> Relations = ev->relations(); 750 Q3PtrList<Incidence> Relations = ev->relations();
745 Incidence *to; 751 Incidence *to;
746 for (to=Relations.first();to;to=Relations.next()) { 752 for (to=Relations.first();to;to=Relations.next()) {
747 if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio ) 753 if (!((Todo*)to)->isCompleted() && ((Todo*)to)->priority() <= mCurrentMaxPrio )
748 appendTodo( to, ind , true ); 754 appendTodo( to, ind , true );
749 } 755 }
750 756
751 return true; 757 return true;
752} 758}
753 759
754/* 760/*
755 void KOWhatsNextView::createEventViewer() 761 void KOWhatsNextView::createEventViewer()
756 { 762 {
757 if (!mEventViewer) { 763 if (!mEventViewer) {
758 764
759 mEventViewer = new KOEventViewerDialog(this); 765 mEventViewer = new KOEventViewerDialog(this);
760 } 766 }
761 } 767 }
762*/ 768*/
763void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v ) 769void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v )
764{ 770{
765 mEventViewer = v; 771 mEventViewer = v;
766} 772}
767 773
768// TODO: Create this function in CalendarView and remove it from here 774// TODO: Create this function in CalendarView and remove it from here