calendarui/agendaeventviewer/src/agendaeventview.cpp
changeset 57 bb2d3e476f29
parent 55 2c54b51f39c4
child 63 a3cb48f6c889
equal deleted inserted replaced
55:2c54b51f39c4 57:bb2d3e476f29
    43 
    43 
    44 // User includes
    44 // User includes
    45 #include <maptileservice.h>//maptile service
    45 #include <maptileservice.h>//maptile service
    46 #include <agendautil.h>
    46 #include <agendautil.h>
    47 #include <NotesEditorInterface>
    47 #include <NotesEditorInterface>
    48 #include <caleneditor.h>
    48 #include <CalenEditor>
       
    49 
       
    50 #include "calenagendautils.h"
    49 #include "agendaeventview.h"
    51 #include "agendaeventview.h"
    50 #include "agendaeventviewerdocloader.h"
    52 #include "agendaeventviewerdocloader.h"
    51 #include "agendaeventviewercommon.h"
    53 #include "agendaeventviewercommon.h"
    52 #include "agendaeventviewer_p.h"
    54 #include "agendaeventviewer_p.h"
    53 #include "agendaeventvieweritem.h"
    55 #include "agendaeventvieweritem.h"
   307 /*!
   309 /*!
   308 	Add the menu item depends up on entry type
   310 	Add the menu item depends up on entry type
   309  */
   311  */
   310 void AgendaEventView::addMenuItem()
   312 void AgendaEventView::addMenuItem()
   311 {
   313 {
   312     OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDMENUITEM_ENTRY );
   314 	OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDMENUITEM_ENTRY );
   313 
   315 
   314 	if (mAgendaEntry.type() == AgendaEntry::TypeTodo) {
   316 	if (mAgendaEntry.type() == AgendaEntry::TypeTodo) {
   315 
   317 
   316 		HbMenu *menu = qobject_cast<HbMenu *> (
   318 		HbMenu *menu = qobject_cast<HbMenu *> (
   317 				mDocLoader->findWidget(AGENDA_EVENT_VIEWER_MENU));
   319 				mDocLoader->findWidget(AGENDA_EVENT_VIEWER_MENU));
   380 			mDocLoader->findWidget(AGENDA_EVENT_VIEWER_GROUPBOX));
   382 			mDocLoader->findWidget(AGENDA_EVENT_VIEWER_GROUPBOX));
   381 
   383 
   382 	AgendaEntry::Type entryType = mAgendaEntry.type();
   384 	AgendaEntry::Type entryType = mAgendaEntry.type();
   383 	if (entryType == AgendaEntry::TypeTodo) {
   385 	if (entryType == AgendaEntry::TypeTodo) {
   384 		groupBox->setHeading(hbTrId("txt_calendar_subhead_to_do"));
   386 		groupBox->setHeading(hbTrId("txt_calendar_subhead_to_do"));
       
   387 	} else if (CalenAgendaUtils::isAlldayEvent(mAgendaEntry)) {
       
   388         groupBox->setHeading(hbTrId("txt_calendar_subhead_all_day_event"));
   385 	} else if (entryType == AgendaEntry::TypeAppoinment) {
   389 	} else if (entryType == AgendaEntry::TypeAppoinment) {
   386 		groupBox->setHeading(hbTrId("txt_calendar_subhead_meeting"));
   390 		groupBox->setHeading(hbTrId("txt_calendar_subhead_meeting"));
   387 	}else if (entryType == AgendaEntry::TypeEvent) {
   391 	} 
   388 		groupBox->setHeading(hbTrId("txt_calendar_subhead_all_day_event"));
       
   389 	}
       
   390 		
   392 		
   391 	OstTraceFunctionExit0( AGENDAEVENTVIEW_ADDGROUPBOXDATA_EXIT );
   393 	OstTraceFunctionExit0( AGENDAEVENTVIEW_ADDGROUPBOXDATA_EXIT );
   392 }
   394 }
   393 
   395 
   394 /*!
   396 /*!
   437     
   439     
   438     itemData.append(QString::null);
   440     itemData.append(QString::null);
   439     itemData.append(QString::null);
   441     itemData.append(QString::null);
   440     itemData.append("qtg_small_calendar");
   442     itemData.append("qtg_small_calendar");
   441 
   443 
   442     mDateTimeWidget->setProperty(primaryLeftIconItem, false);  
   444     mDateTimeWidget->setProperty(primaryLeftIconItem, false);
   443 
   445 
   444     mDateTimeWidget->setEventViewerItemData(itemData, Qt::DecorationRole);
   446     mDateTimeWidget->setEventViewerItemData(itemData, Qt::DecorationRole);
   445     itemData.clear();
   447     itemData.clear();
   446     itemData.append(QString::null);
   448     itemData.append(QString::null);
   447     
   449     
   450     QString startDateText;
   452     QString startDateText;
   451     QString dateTimeText;
   453     QString dateTimeText;
   452     QString data;
   454     QString data;
   453     
   455     
   454     // Add agenda entry specific fields to the viewer
   456     // Add agenda entry specific fields to the viewer
       
   457     
   455     switch (mAgendaEntry.type()) {
   458     switch (mAgendaEntry.type()) {
   456     	case AgendaEntry::TypeAppoinment:
   459     	case AgendaEntry::TypeAppoinment:
   457 
   460     	case AgendaEntry::TypeEvent:
   458     		startTimeText.append(systemLocale.format(
   461     	    // Check if entry is an all-day
   459 							startDateTime.time(), r_qtn_time_usual_with_zero));
   462     	    if (CalenAgendaUtils::isAlldayEvent(mAgendaEntry)) {
   460 
   463                 dateTimeText.append(systemLocale.format(startDateTime.date(),
   461     		endTimeText.append(systemLocale.format(endDateTime.time(),
   464     	                                                        r_qtn_date_usual_with_zero));
   462 												r_qtn_time_usual_with_zero));
   465                 if (CalenDateUtils::onSameDay(startDateTime, endDateTime.addSecs(-60))) {
   463     		startDateText.append(
   466                     data.append(dateTimeText);
   464     				systemLocale.format(startDateTime.date(),
   467                 } else {
   465 												r_qtn_date_usual_with_zero));
   468                     QString endDate;
   466     		if (CalenDateUtils::onSameDay(startDateTime, endDateTime)) {
   469                     endDate.append(
   467     			data.append(startTimeText);
   470                             systemLocale.format(endDateTime.addSecs(-60).date(),
   468     			data.append(CHARACTER_HYPHEN);
   471                                                 r_qtn_date_usual_with_zero));
   469     			data.append(endTimeText);
   472                     data.append(dateTimeText);
   470     			data.append(CHARACTER_SPACE);
   473                     data.append(" - ");
   471     			data.append(startDateText);
   474                     data.append(endDate);
   472     		} else {
   475                 }
   473     			// If both start and end time of a meeting are on different dates
   476     	    } else {
   474     			data.append(startTimeText);
   477                 startTimeText.append(systemLocale.format(
   475     			data.append(CHARACTER_SPACE);
   478                                 startDateTime.time(), r_qtn_time_usual_with_zero));
   476 				data.append(startDateText);
   479     
   477     			QString endDateText;
   480                 endTimeText.append(systemLocale.format(endDateTime.time(),
   478     			endDateText.append(
   481                                                     r_qtn_time_usual_with_zero));
   479     					systemLocale.format(endDateTime.date(),
   482                 startDateText.append(
   480     					                    r_qtn_date_usual_with_zero));
   483                         systemLocale.format(startDateTime.date(),
   481     			data.append(CHARACTER_HYPHEN);
   484                                                     r_qtn_date_usual_with_zero));
   482     			data.append(endTimeText);
   485                 if (CalenDateUtils::onSameDay(startDateTime, endDateTime)) {
   483     			data.append(CHARACTER_SPACE);
   486                     data.append(startTimeText);
   484     			data.append(endDateText);
   487                     data.append(CHARACTER_HYPHEN);
   485     		}
   488                     data.append(endTimeText);
       
   489                     data.append(CHARACTER_SPACE);
       
   490                     data.append(startDateText);
       
   491                 } else {
       
   492                     // If both start and end time of a meeting are on different dates
       
   493                     data.append(startTimeText);
       
   494                     data.append(CHARACTER_SPACE);
       
   495                     data.append(startDateText);
       
   496                     QString endDateText;
       
   497                     endDateText.append(
       
   498                             systemLocale.format(endDateTime.date(),
       
   499                                                 r_qtn_date_usual_with_zero));
       
   500                     data.append(CHARACTER_HYPHEN);
       
   501                     data.append(endTimeText);
       
   502                     data.append(CHARACTER_SPACE);
       
   503                     data.append(endDateText);
       
   504                 }
       
   505     	    }
   486     		break;
   506     		break;
   487     	case AgendaEntry::TypeAnniversary:
   507     	case AgendaEntry::TypeAnniversary:
   488     	case AgendaEntry::TypeTodo:
   508     	case AgendaEntry::TypeTodo:
   489     		dateTimeText.append(systemLocale.format(endDateTime.date(),
   509     		dateTimeText.append(systemLocale.format(endDateTime.date(),
   490     											r_qtn_date_usual_with_zero));
   510     											r_qtn_date_usual_with_zero));
   491     		data.append(dateTimeText);
   511     		data.append(dateTimeText);
   492     		break;
   512     		break;
   493     	case AgendaEntry::TypeEvent:
       
   494 
       
   495     		dateTimeText.append(systemLocale.format(startDateTime.date(),
       
   496     		                                        r_qtn_date_usual_with_zero));
       
   497     		if (CalenDateUtils::onSameDay(startDateTime, endDateTime.addSecs(-60))) {
       
   498     			data.append(dateTimeText);
       
   499     		} else {
       
   500     			QString endDate;
       
   501     			endDate.append(
       
   502     					systemLocale.format(endDateTime.addSecs(-60).date(),
       
   503     					                    r_qtn_date_usual_with_zero));
       
   504     			data.append(dateTimeText);
       
   505     			data.append(" - ");
       
   506     			data.append(endDate);
       
   507     		}
       
   508     		break;
       
   509     	default:
   513     	default:
   510     		break;
   514     		break;
   511     }
   515     }
   512 	itemData.append(data);
   516 	itemData.append(data);
   513     mDateTimeWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
   517     mDateTimeWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
   522 {
   526 {
   523 	OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDLOCATIONDATA_ENTRY );
   527 	OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDLOCATIONDATA_ENTRY );
   524 	QStringList itemData;
   528 	QStringList itemData;
   525 	QString progressIcon(QString::null);	
   529 	QString progressIcon(QString::null);	
   526 	if ( mLocationFeatureEnabled ) {
   530 	if ( mLocationFeatureEnabled ) {
   527 	    getProgressIndicatorstatus(progressIcon);	   
   531 	    getProgressIndicatorstatus(progressIcon);
   528 	}
   532 	}
   529 	 if( progressIcon.isNull() ) {
   533 	 if( progressIcon.isNull() ) {
   530 	     itemData.append(QString::null);
   534 	     itemData.append(QString::null);
   531 	     itemData.append(QString::null);
   535 	     itemData.append(QString::null);
   532 	     itemData.append("qtg_small_location");
   536 	     itemData.append("qtg_small_location");
   578 	mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole);
   582 	mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole);
   579 	itemData.clear();
   583 	itemData.clear();
   580 	itemData.append(QString::null);
   584 	itemData.append(QString::null);
   581 	itemData.append(alarmTimeText());
   585 	itemData.append(alarmTimeText());
   582 	mReminderWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
   586 	mReminderWidget->setEventViewerItemData(itemData, Qt::DisplayRole);
   583     OstTraceFunctionExit0( AGENDAEVENTVIEW_ADDREMINDERDATA_EXIT );
   587 	mReminderWidgetAdded = true;
   584     }
   588 	OstTraceFunctionExit0( AGENDAEVENTVIEW_ADDREMINDERDATA_EXIT );
       
   589 }
   585 
   590 
   586 /*!
   591 /*!
   587 	Add completed to-do data to Event viewer
   592 	Add completed to-do data to Event viewer
   588  */
   593  */
   589 void AgendaEventView::addCompletedTodoData()
   594 void AgendaEventView::addCompletedTodoData()
   590 {
   595 {
   591 	OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDCOMPLETEDTODODATA_ENTRY );
   596 	OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDCOMPLETEDTODODATA_ENTRY );
   592 	QStringList itemData;
   597 	QStringList itemData;
   593 	QString     completedText;
   598 	QString completedText;
   594     HbExtendedLocale systemLocale = HbExtendedLocale::system();;
   599 	HbExtendedLocale systemLocale = HbExtendedLocale::system();;
   595     itemData.append(QString::null);
       
   596 	itemData.append(QString::null);
   600 	itemData.append(QString::null);
   597 	itemData.append(QString::null);
   601 	itemData.append(QString::null);
   598     mReminderWidget->setProperty(primaryLeftIconItem, true);
   602 	itemData.append(QString::null);
       
   603 	mReminderWidget->setProperty(primaryLeftIconItem, true);
   599 	mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole);
   604 	mReminderWidget->setEventViewerItemData(itemData, Qt::DecorationRole);
   600 	itemData.clear();
   605 	itemData.clear();
   601 	completedText = systemLocale.format(mAgendaEntry.completedDateTime().date(),
   606 	completedText = systemLocale.format(mAgendaEntry.completedDateTime().date(),
   602 					                    r_qtn_date_usual_with_zero);
   607 					                    r_qtn_date_usual_with_zero);
   603 	itemData.append(hbTrId("txt_calendar_dblist_completed_date"));
   608 	itemData.append(hbTrId("txt_calendar_dblist_completed_date"));
   779 		mLocationWidget->hide();
   784 		mLocationWidget->hide();
   780 		mLinearLayout->removeItem(mLocationWidget);
   785 		mLinearLayout->removeItem(mLocationWidget);
   781 	}
   786 	}
   782 	
   787 	
   783 	QFile file(mMaptilePath);
   788 	QFile file(mMaptilePath);
   784     if ( !mLocationFeatureEnabled || !file.exists()
   789     if (!mLocationFeatureEnabled || !file.exists()
   785             || mAgendaEntry.location().isEmpty()){        
   790             || mAgendaEntry.location().isEmpty()) {
   786         //code added to hide and remove maptile image   
   791         //code added to hide and remove maptile image
   787         mMaptileLabel->hide();
   792         mMaptileLabel->hide();
   788         mLinearLayout->removeItem(mMaptileLabel);
   793         mLinearLayout->removeItem(mMaptileLabel);
   789     }
   794     }
   790     file.close();
   795     file.close();
   791         
   796         
   801 			mLinearLayout->removeItem(mReminderWidget);
   806 			mLinearLayout->removeItem(mReminderWidget);
   802 			mReminderWidgetAdded = false;
   807 			mReminderWidgetAdded = false;
   803 		}
   808 		}
   804 	}
   809 	}
   805 	
   810 	
       
   811 	// Check whether the entry is a completed To-do. if so then remove the 
       
   812 	// time and date widget.
       
   813 	if (mAgendaEntry.type() == AgendaEntry::TypeTodo &&
       
   814 			AgendaEntry::TodoCompleted == mAgendaEntry.status()) {
       
   815 		mDateTimeWidget->hide();
       
   816 		mLinearLayout->removeItem(mDateTimeWidget);
       
   817 	}
       
   818 	
   806 	if ((mAgendaEntry.repeatRule().type() == AgendaRepeatRule::InvalidRule) &&
   819 	if ((mAgendaEntry.repeatRule().type() == AgendaRepeatRule::InvalidRule) &&
   807 	        (mAgendaEntry.recurrenceId().isNull())) { 
   820 			(mAgendaEntry.recurrenceId().isNull())) { 
   808 		mRepeatWidget->hide();
   821 		mRepeatWidget->hide();
   809 		mLinearLayout->removeItem(mRepeatWidget);
   822 		mLinearLayout->removeItem(mRepeatWidget);
   810 	}
   823 	}
   811 	
   824 	
   812 	if (mAgendaEntry.description().isEmpty()) { 
   825 	if (mAgendaEntry.description().isEmpty()) { 
   819 	
   832 	
   820 	OstTraceFunctionExit0( AGENDAEVENTVIEW_REMOVEWIDGET_EXIT );
   833 	OstTraceFunctionExit0( AGENDAEVENTVIEW_REMOVEWIDGET_EXIT );
   821 }
   834 }
   822 
   835 
   823 /*!
   836 /*!
   824 	Update the completed to-do or reminder data to event viewer.
   837 	Update all the fields according to to-do status change..
   825  */
   838  */
   826 void AgendaEventView::updateCompletedReminderData()
   839 void AgendaEventView::updateFieldsforTodoStatus()
   827 {
   840 {
   828     OstTraceFunctionEntry0( AGENDAEVENTVIEW_UPDATECOMPLETEDREMINDERDATA_ENTRY );
   841 	OstTraceFunctionEntry0( AGENDAEVENTVIEW_UPDATEFIELDSFORTODOSTATUS_ENTRY );
   829 
   842 
   830 	if (AgendaEntry::TodoCompleted == mAgendaEntry.status()) {
   843 	if (AgendaEntry::TodoCompleted == mAgendaEntry.status()) {
       
   844 		
       
   845 		// For completed to-do due date and time should be removed.
       
   846 		mDateTimeWidget->hide();
       
   847 		mLinearLayout->removeItem(mDateTimeWidget);
       
   848 		
       
   849 		// Fill the completed data information.
   831 		addCompletedTodoData();
   850 		addCompletedTodoData();
       
   851 		
       
   852 		// Add the completed date to thte viewer.
   832 		if (!mReminderWidgetAdded) {
   853 		if (!mReminderWidgetAdded) {
   833 			mReminderWidget->show();
   854 			mReminderWidget->show();
   834 			mLinearLayout->insertItem(2, mReminderWidget);
   855 			mLinearLayout->insertItem(2, mReminderWidget);
   835 			mReminderWidgetAdded = true;
   856 			mReminderWidgetAdded = true;
   836 		}
   857 		}
   837 
   858 
   838 	} else {
   859 	} else {
       
   860 			// Add the date and time widget to the viewer.
       
   861 			mDateTimeWidget->show();
       
   862 			mLinearLayout->insertItem(1, mDateTimeWidget);
       
   863 			
   839 		if (!mAgendaEntry.alarm().isNull()) {
   864 		if (!mAgendaEntry.alarm().isNull()) {
   840 			addReminderData();
   865 			addReminderData();
   841 			if (!mReminderWidgetAdded) {
   866 			if (!mReminderWidgetAdded) {
   842 				mReminderWidget->show();
   867 				mReminderWidget->show();
   843 				mLinearLayout->insertItem(2, mReminderWidget);
   868 				mLinearLayout->insertItem(2, mReminderWidget);
   844 				mReminderWidgetAdded = true;
   869 				mReminderWidgetAdded = true;
   845 			}
   870 			}
   846 		} else {
   871 		} else {
       
   872 			// Remove the completed date from the viewer.
   847 			if (mReminderWidgetAdded) {
   873 			if (mReminderWidgetAdded) {
   848 				mReminderWidget->hide();
   874 				mReminderWidget->hide();
   849 				mLinearLayout->removeItem(mReminderWidget);
   875 				mLinearLayout->removeItem(mReminderWidget);
   850 				mReminderWidgetAdded = false;
   876 				mReminderWidgetAdded = false;
   851 			}
   877 			}
   852 		}
   878 		}
   853 
   879 
   854 	}
   880 	}
       
   881 	// The To-do icon changes according to the To-do status change.
       
   882 	updateSubjectandPriorityData();
   855 	
   883 	
   856 	mLinearLayout->invalidate();
   884 	mLinearLayout->invalidate();
   857 	mLinearLayout->activate();
   885 	mLinearLayout->activate();
   858 	OstTraceFunctionExit0( AGENDAEVENTVIEW_UPDATECOMPLETEDREMINDERDATA_EXIT );
   886 	OstTraceFunctionExit0( AGENDAEVENTVIEW_UPDATEFIELDSFORTODOSTATUS_EXIT );
   859 }
   887 }
   860 
   888 
   861 /*!
   889 /*!
   862 	Remove all widgets from layout.
   890 	Remove all widgets from layout.
   863  */
   891  */
   955     QString text = 0;
   983     QString text = 0;
   956 
   984 
   957     switch (mAgendaEntry.type()) {
   985     switch (mAgendaEntry.type()) {
   958         case AgendaEntry::TypeAppoinment:
   986         case AgendaEntry::TypeAppoinment:
   959         case AgendaEntry::TypeEvent: {
   987         case AgendaEntry::TypeEvent: {
   960         text.append(hbTrId("txt_calendar_info_delete_meeting"));
   988 			// Check for all-day
   961         break;
   989         	if (CalenAgendaUtils::isAlldayEvent(mAgendaEntry)) {
   962         }
   990 				text.append(hbTrId("txt_calendar_info_delete_allday_event"));
       
   991         	} else {
       
   992 				text.append(hbTrId("txt_calendar_info_delete_meeting"));
       
   993 			}
       
   994 
       
   995 			break;
       
   996 		}
   963         case AgendaEntry::TypeAnniversary: {
   997         case AgendaEntry::TypeAnniversary: {
   964         text.append(hbTrId("txt_calendar_info_delete_anniversary"));
   998         text.append(hbTrId("txt_calendar_info_delete_anniversary"));
   965         break;
   999         break;
   966         }
  1000         }
   967         case AgendaEntry::TypeTodo: {
  1001         case AgendaEntry::TypeTodo: {
  1028 		mMarkTodoAction->setText(hbTrId("txt_calendar_menu_mark_as_done"));
  1062 		mMarkTodoAction->setText(hbTrId("txt_calendar_menu_mark_as_done"));
  1029 		mAgendaEntry.setStatus(AgendaEntry::TodoNeedsAction);
  1063 		mAgendaEntry.setStatus(AgendaEntry::TodoNeedsAction);
  1030 		mOwner->mAgendaUtil->setCompleted(mAgendaEntry, false, currentDateTime);
  1064 		mOwner->mAgendaUtil->setCompleted(mAgendaEntry, false, currentDateTime);
  1031 	}
  1065 	}
  1032 
  1066 
  1033 	updateCompletedReminderData();
  1067 	updateFieldsforTodoStatus();
  1034 	
  1068 	
  1035 	OstTraceFunctionExit0( AGENDAEVENTVIEW_MARKTODOSTATUS_EXIT );
  1069 	OstTraceFunctionExit0( AGENDAEVENTVIEW_MARKTODOSTATUS_EXIT );
  1036 }
  1070 }
  1037 
  1071 
  1038 /*!
  1072 /*!
  1282 void AgendaEventView::getSubjectIcon(AgendaEntry::Type type, QString &subjectIcon)
  1316 void AgendaEventView::getSubjectIcon(AgendaEntry::Type type, QString &subjectIcon)
  1283     {
  1317     {
  1284     OstTraceFunctionEntry0( AGENDAEVENTVIEW_GETSUBJECTICON_ENTRY );
  1318     OstTraceFunctionEntry0( AGENDAEVENTVIEW_GETSUBJECTICON_ENTRY );
  1285     switch(type) {
  1319     switch(type) {
  1286         case AgendaEntry::TypeAppoinment:
  1320         case AgendaEntry::TypeAppoinment:
       
  1321         case AgendaEntry::TypeEvent:
  1287             {
  1322             {
  1288             subjectIcon.append("qtg_small_meeting");
  1323             // Check for all-day
       
  1324             if (CalenAgendaUtils::isAlldayEvent(mAgendaEntry)) {
       
  1325                 subjectIcon.append("qtg_small_day");
       
  1326             } else {
       
  1327                 subjectIcon.append("qtg_small_meeting");
       
  1328             }
  1289             }
  1329             }
  1290             break;
  1330             break;
  1291         case AgendaEntry::TypeTodo:
  1331         case AgendaEntry::TypeTodo:
  1292             {
  1332             {
  1293             if (AgendaEntry::TodoCompleted == mAgendaEntry.status()) {
  1333             if (AgendaEntry::TodoCompleted == mAgendaEntry.status()) {
  1294                 subjectIcon.append("qtg_small_todo_done");
  1334                 subjectIcon.append("qtg_small_todo_done");
  1295             } else {
  1335             } else {
  1296                 subjectIcon.append("qtg_small_todo");
  1336                 subjectIcon.append("qtg_small_todo");
  1297             }
  1337             }
  1298             }
       
  1299             break;
       
  1300         case AgendaEntry::TypeEvent:
       
  1301             {
       
  1302             subjectIcon.append("qtg_small_day");
       
  1303             }
  1338             }
  1304             break;
  1339             break;
  1305         case AgendaEntry::TypeAnniversary:
  1340         case AgendaEntry::TypeAnniversary:
  1306             {
  1341             {
  1307             subjectIcon.append("qtg_small_anniversary");
  1342             subjectIcon.append("qtg_small_anniversary");
  1422                 int ,int)), this, SLOT(receiveMapTileStatus(int,int,int)));
  1457                 int ,int)), this, SLOT(receiveMapTileStatus(int,int,int)));
  1423         progressIcon.append(QString::null);
  1458         progressIcon.append(QString::null);
  1424     }
  1459     }
  1425     OstTraceFunctionExit0( AGENDAEVENTVIEW_GETPROGRESSINDICATORSTATUS_EXIT );
  1460     OstTraceFunctionExit0( AGENDAEVENTVIEW_GETPROGRESSINDICATORSTATUS_EXIT );
  1426 }
  1461 }
       
  1462 
       
  1463 /*!
       
  1464 	Updates the To-do icon for the changes in to-do status.
       
  1465  */
       
  1466 void AgendaEventView::updateSubjectandPriorityData()
       
  1467 {
       
  1468 	OstTraceFunctionEntry0( AGENDAEVENTVIEW_UPDATESUBJECTANDPRIORITYDATA_ENTRY );
       
  1469 	QStringList itemList;
       
  1470     QString priorityIcon(QString::null);
       
  1471     QString subjectIcon(QString::null);
       
  1472     getPriorityIcon(mAgendaEntry.priority(), priorityIcon);
       
  1473     getSubjectIcon(mAgendaEntry.type(),subjectIcon);
       
  1474     itemList.append(subjectIcon);
       
  1475     itemList.append(priorityIcon);
       
  1476     itemList.append(QString::null);
       
  1477 
       
  1478 	mSubjectWidget->setEventViewerItemData(itemList, Qt::DecorationRole);
       
  1479 	OstTraceFunctionExit0( AGENDAEVENTVIEW_UPDATESUBJECTANDPRIORITYDATA_EXIT );
       
  1480 }
       
  1481 
  1427 /*!
  1482 /*!
  1428     Reload the maptile image on system orientation change.
  1483     Reload the maptile image on system orientation change.
  1429  */
  1484  */
  1430 void AgendaEventView::changedOrientation(Qt::Orientation orientation)
  1485 void AgendaEventView::changedOrientation(Qt::Orientation orientation)
  1431 {
  1486 {