--- a/calendarui/views/src/calenagendaviewwidget.cpp Tue Jul 06 14:14:56 2010 +0300
+++ b/calendarui/views/src/calenagendaviewwidget.cpp Wed Aug 18 09:47:38 2010 +0300
@@ -41,10 +41,16 @@
#include "calenservices.h"
#include "calencontext.h"
#include "calendateutils.h"
+#include "calenagendautils.h"
#include "CalenUid.h"
#include "caleneventlistviewitem.h"
#include "calenpluginlabel.h"
#include "calendarprivatecrkeys.h"
+#include "OstTraceDefinitions.h"
+#ifdef OST_TRACE_COMPILER_IN_USE
+#include "calenagendaviewwidgetTraces.h"
+#endif
+
// Constants
const QString singleSpace(" ");
@@ -58,8 +64,7 @@
const QString locationIcon("qtg_mono_location");
const QString repeatIcon("qtg_mono_repeat");
// TODO: Replace with actual image name once its available
-//const QString allDayIcon("qtg_small_allday");
-const QString allDayIcon(":/qgn_indi_cdr_meeting_layer0.svg");
+const QString allDayIcon("qtg_small_day");
const QString exceptionIcon("qtg_mono_repeat_exception");
const int singleColumn(1);
@@ -74,8 +79,12 @@
mDocLoader(docLoader),
mRegionalInfoGroupBox(NULL),
mLongTapEventFlag(false),
-mNotesPluginLoaded(false)
+mNotesPluginLoaded(false),
+mIndex(0),
+mIconCheck(false)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_CALENAGENDAVIEWWIDGET_ENTRY );
+
// Construct the list view prototype
mListViewPrototype = new CalenEventListViewItem(this);
@@ -87,6 +96,8 @@
//Create the setting manager
mSettingsManager = new XQSettingsManager(this);
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_CALENAGENDAVIEWWIDGET_EXIT );
}
// ----------------------------------------------------------------------------
@@ -96,6 +107,8 @@
//
EXPORT_C CalenAgendaViewWidget::~CalenAgendaViewWidget()
{
+ OstTraceFunctionEntry0( DUP1_CALENAGENDAVIEWWIDGET_CALENAGENDAVIEWWIDGET_ENTRY );
+
// Unload notes editor if loaded.
if (mNotesEditorPluginLoader) {
mNotesEditorPluginLoader->unload();
@@ -103,18 +116,12 @@
mNotesEditorPluginLoader = 0;
}
- if (mListViewPrototype) {
- delete mListViewPrototype;
- mListViewPrototype = NULL;
- }
- if (mListModel) {
- // Do not delete the model since its owned by the view
- mListModel->clear();
- }
if (mSettingsManager) {
delete mSettingsManager;
mSettingsManager = NULL;
}
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_CALENAGENDAVIEWWIDGET_EXIT );
}
// ----------------------------------------------------------------------------
@@ -124,16 +131,20 @@
//
void CalenAgendaViewWidget::setupWidget(CalenAgendaView *view)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_SETUPWIDGET_ENTRY );
+
// Store the view for future reference
mView = view;
if (!mDocLoader) {
// Nothing much can be done. Simply return
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_SETUPWIDGET_EXIT );
return;
}
// Initialize the child widgets
initChildWidgets();
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_SETUPWIDGET_EXIT );
}
// ----------------------------------------------------------------------------
@@ -143,6 +154,8 @@
//
void CalenAgendaViewWidget::showWidget()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_SHOWWIDGET_ENTRY );
+
// Get the date for which this view has been launched
mDate = mServices.Context().focusDateAndTime();
@@ -194,6 +207,8 @@
// Now populate the list with the events
populateListWidget();
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_SHOWWIDGET_EXIT );
}
// ----------------------------------------------------------------------------
@@ -203,6 +218,8 @@
//
void CalenAgendaViewWidget::orientationChanged(Qt::Orientation orientation)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_ORIENTATIONCHANGED_ENTRY );
+
// Load the appropriate section based on the number of events for the day
if (0 == mInstanceArray.count()) {
// There are no entries for the day
@@ -238,6 +255,8 @@
}
handleListItemStretching(orientation);
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_ORIENTATIONCHANGED_EXIT );
}
// ----------------------------------------------------------------------------
@@ -247,7 +266,9 @@
//
void CalenAgendaViewWidget::handleLocaleChange()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_HANDLELOCALECHANGE_ENTRY );
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_HANDLELOCALECHANGE_EXIT );
}
// ----------------------------------------------------------------------------
@@ -257,6 +278,8 @@
//
void CalenAgendaViewWidget::setContextFromHighlight(AgendaEntry entry)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_SETCONTEXTFROMHIGHLIGHT_ENTRY );
+
if (entry.isTimedEntry()) {
// Timed entry.
QDateTime start = entry.startTime();
@@ -275,6 +298,8 @@
TCalenInstanceId::create(entry));
}
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_SETCONTEXTFROMHIGHLIGHT_EXIT );
}
// ----------------------------------------------------------------------------
@@ -284,6 +309,8 @@
//
void CalenAgendaViewWidget::initChildWidgets()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_INITCHILDWIDGETS_ENTRY );
+
// Get the pointer to the events list
mEventsList = static_cast<HbListView*> (mDocLoader->findWidget(CALEN_AGENDAVIEW_LISTWIDGET));
if (!mEventsList) {
@@ -317,6 +344,7 @@
mRegionalPluginLayout = static_cast<QGraphicsLinearLayout*>(headingPluginWidget->layout());
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_INITCHILDWIDGETS_EXIT );
}
// ----------------------------------------------------------------------------
@@ -326,6 +354,8 @@
//
void CalenAgendaViewWidget::populateListWidget()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_POPULATELISTWIDGET_ENTRY );
+
// Recycle the list items so that only needed rows
// are added or removed
if (mInstanceArray.count() == 0) {
@@ -333,6 +363,7 @@
mEventsList->reset();
// Clear the model to ensure it does not have any old items
mListModel->clear();
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_POPULATELISTWIDGET_EXIT );
return;
} else if (mInstanceArray.count() > mListModel->rowCount()) {
// There are more events than the number of items
@@ -343,8 +374,12 @@
// of items in the list. Remove the extra rows
mListModel->removeRows(0, mListModel->rowCount() - mInstanceArray.count());
}
+ //to set the index to first item of the list , when view refresh
+ mIndex = 0;
+ //status reset for not setting any property
+ mIconCheck = false;
mListModel->setColumnCount(singleColumn);
-
+ mIconCheck = true;
// Add all the events to the list
for (int index = 0; index < mInstanceArray.count(); index++) {
// Get each of the entry details
@@ -361,6 +396,8 @@
// Scroll to the index only if index is valid
mEventsList->scrollTo(mListModel->index(scrollToIndex, 0));
}
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_POPULATELISTWIDGET_EXIT );
}
// ----------------------------------------------------------------------------
@@ -370,6 +407,8 @@
//
void CalenAgendaViewWidget::getInstanceList()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_GETINSTANCELIST_ENTRY );
+
// Clear the previous instance list
mInstanceArray.clear();
@@ -388,6 +427,7 @@
// Fetch the instance list from the agenda interface
mInstanceArray = mServices.agendaInterface()->createEntryIdListForDay(mDate, filter);
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_GETINSTANCELIST_EXIT );
}
// ----------------------------------------------------------------------------
@@ -397,6 +437,8 @@
//
void CalenAgendaViewWidget::setHeadingText()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_SETHEADINGTEXT_ENTRY );
+
// Format the date as per the device locale settings
HbExtendedLocale systemLocale = HbExtendedLocale::system();
@@ -409,6 +451,8 @@
mHeadingLabel->setHeading(hbTrId(
"txt_calendar_subhead_1_2").arg(dayString).arg(
systemLocale.format(mDate.date(), r_qtn_date_usual_with_zero)));
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_SETHEADINGTEXT_EXIT );
}
// ----------------------------------------------------------------------------
@@ -418,19 +462,23 @@
//
void CalenAgendaViewWidget::createListItem(int index, AgendaEntry entry)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_CREATELISTITEM_ENTRY );
+
if (index < 0 || entry.isNull()) {
// Not a valid index or entry. Dont do anything
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_CREATELISTITEM_EXIT );
return;
}
- // Check if the entry is a timed entry
- // TODO: Right now, only appointment/meeting type is being handled
- // Handle other timed entry types like reminder etc
- if (entry.isTimedEntry()) {
+ // Check if the entry is a timed entry and not all day event
+ // an all-day event when it is synched from OUTLOOK then entry type will be EAppt
+ if (!CalenAgendaUtils::isAlldayEvent(entry) && entry.isTimedEntry()) {
// Get the text and icon data for the entry
addTimedEventToList(index, entry);
} else {
addNonTimedEventToList(index, entry);
}
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_CREATELISTITEM_EXIT );
}
// ----------------------------------------------------------------------------
@@ -440,6 +488,8 @@
//
void CalenAgendaViewWidget::addTimedEventToList(int index, AgendaEntry entry)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_ADDTIMEDEVENTTOLIST_ENTRY );
+
// Create text and icon list to set to the model
QVariantList textData;
QVariantList iconData;
@@ -567,7 +617,7 @@
iconData << HbIcon(locationIcon);
}
else {
- iconData << HbIcon();
+ iconData << QVariant();
}
textData << entry.location();
}
@@ -581,7 +631,9 @@
}
// Get the list model index and set the text and icon data
QModelIndex listIndex = mListModel->index(index, 0);
+ mNextEntry = false;
mListModel->setData(listIndex, textData, Qt::DisplayRole);
+ mNextEntry = true;
mListModel->setData(listIndex, iconData, Qt::DecorationRole);
// Disable item stretching by removing the dynamic property
@@ -590,6 +642,8 @@
if (listViewItem) {
listViewItem->setProperty(stretchLayout, false);
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_ADDTIMEDEVENTTOLIST_EXIT );
}
// ----------------------------------------------------------------------------
@@ -599,6 +653,8 @@
//
void CalenAgendaViewWidget::addNonTimedEventToList(int index, AgendaEntry entry)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_ADDNONTIMEDEVENTTOLIST_ENTRY );
+
QVariantList textData;
QVariantList iconData;
@@ -637,7 +693,7 @@
// Nothing to do as of now as anniversary events
// cannot be created
// TODO: To be handled in case of sync
- } else if (entryType == AgendaEntry::TypeEvent) {
+ } else if (CalenAgendaUtils::isAlldayEvent(entry)) {
// This is an all day event
// Append the all-day icon
iconData << HbIcon(allDayIcon);
@@ -645,12 +701,12 @@
// Check if alarm is enabled for the entry
if (entry.alarm().isNull()) {
// Insert a blank icon. Else next text item will get shifted to left
- iconData << HbIcon();
+ iconData << QVariant();
} else {
// if entry is not repeating in place of reminder icon put a blank
// icon and move reminder icon to the place of repeating icon
if (!entry.isRepeating()) {
- iconData << HbIcon();
+ iconData << QVariant();
}
iconData << HbIcon(reminderIcon);
}
@@ -658,11 +714,14 @@
// Check if the entry is recurring
if (entry.isRepeating()) {
iconData << HbIcon(repeatIcon);
+ } else if (!entry.recurrenceId().isNull()) {
+ // This is an exceptional entry
+ iconData << HbIcon(exceptionIcon);
} else {
// put the blank icon only when both reminder and repeating icons
// are not there
if (entry.alarm().isNull()) {
- iconData << HbIcon();
+ iconData << QVariant();
}
}
@@ -674,7 +733,8 @@
if (!entry.geoValue().isNull()){
iconData << HbIcon(locationIcon);
}else {
- iconData << HbIcon();
+ iconData << QVariant();
+
}
} else {
textData << QVariant();
@@ -714,12 +774,12 @@
// Check if alarm is enabled for the entry
if (entry.alarm().isNull()) {
// Insert a blank icon. Else next text item will get shifted to left
- iconData << HbIcon();
+ iconData << QVariant();
} else {
// if entry is not repeating in place of reminder icon put a blank
// icon and move reminder icon to the place of repeating icon
if (!entry.isRepeating()) {
- iconData << HbIcon();
+ iconData << QVariant();
}
iconData << HbIcon(reminderIcon);
}
@@ -731,14 +791,16 @@
// Insert the blank icon only when both reminder and repeating icons
// are not there
if (entry.alarm().isNull()) {
- iconData << HbIcon();
+ iconData << QVariant();
}
}
}
// Get the list model index and set the text and icon data
QModelIndex listIndex = mListModel->index(index, 0);
+ mNextEntry = false;
mListModel->setData(listIndex, textData, Qt::DisplayRole);
+ mNextEntry = true;
mListModel->setData(listIndex, iconData, Qt::DecorationRole);
// Enable item stretching by adding the dynamic property
@@ -753,6 +815,8 @@
listViewItem->setProperty(stretchLayout, false);
}
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_ADDNONTIMEDEVENTTOLIST_EXIT );
}
// ----------------------------------------------------------------------------
@@ -762,14 +826,24 @@
//
void CalenAgendaViewWidget::handleListItemStretching(Qt::Orientation orientation)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_HANDLELISTITEMSTRETCHING_ENTRY );
+
if (mInstanceArray.count() == 0) {
// Nothing much to do. Simply return
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_HANDLELISTITEMSTRETCHING_EXIT );
return;
}
for(int index = 0; index < mInstanceArray.count() ; index ++) {
AgendaEntry entry = mInstanceArray[index];
if (!entry.isNull()) {
AgendaEntry::Type eventType = entry.type();
+ // Need to check explicitly for Appt that got synched from OUTLOOK
+ // that can be an all-day event
+ if (AgendaEntry::TypeAppoinment == eventType) {
+ if (CalenAgendaUtils::isAlldayEvent(entry)) {
+ eventType = AgendaEntry::TypeEvent;
+ }
+ }
switch(eventType) {
// Apply the stretching to only to-do's,
// anniversary and all-day event types
@@ -803,6 +877,8 @@
}
}
}
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_HANDLELISTITEMSTRETCHING_EXIT );
}
// ----------------------------------------------------------------------------
@@ -812,10 +888,13 @@
//
int CalenAgendaViewWidget::getIndexToScrollTo()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_GETINDEXTOSCROLLTO_ENTRY );
+
int scrollIndex = 0;
TCalenInstanceId instanceId = mServices.Context().instanceId();
if (instanceId == TCalenInstanceId::nullInstanceId()) {
// If the instance is not set, then scroll to zero index
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_GETINDEXTOSCROLLTO_EXIT );
return scrollIndex;
}
@@ -827,6 +906,7 @@
break;
}
}
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_GETINDEXTOSCROLLTO_EXIT );
return scrollIndex;
}
@@ -837,6 +917,8 @@
//
void CalenAgendaViewWidget::showHideRegionalInformation()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_SHOWHIDEREGIONALINFORMATION_ENTRY );
+
if (mView->pluginEnabled()) {
XQSettingsKey regionalInfo(XQSettingsKey::TargetCentralRepository,
KCRUidCalendar, KCalendarShowRegionalInfo);
@@ -865,6 +947,8 @@
mRegionalInfoGroupBox = NULL;
}
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_SHOWHIDEREGIONALINFORMATION_EXIT );
}
// ----------------------------------------------------------------------------
@@ -874,9 +958,13 @@
//
void CalenAgendaViewWidget::createNewEvent()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_CREATENEWEVENT_ENTRY );
+
// Issue a command to launch editor to create
// a new event
mServices.IssueCommandL(ECalenNewMeeting);
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_CREATENEWEVENT_EXIT );
}
// ----------------------------------------------------------------------------
@@ -886,8 +974,11 @@
//
void CalenAgendaViewWidget::editEntry()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_EDITENTRY_ENTRY );
+
// Check if the selected index is valid
if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_EDITENTRY_EXIT );
return;
}
@@ -924,6 +1015,8 @@
// Issue a command to launch the editor to edit this entry
mServices.IssueCommandL(ECalenEditCurrentEntry);
}
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_EDITENTRY_EXIT );
}
// ----------------------------------------------------------------------------
@@ -933,14 +1026,20 @@
//
void CalenAgendaViewWidget::viewEntry()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_VIEWENTRY_ENTRY );
+
// Get the entry details first
AgendaEntry entry = mInstanceArray[mSelectedIndex];
// Set the context
setContextFromHighlight(entry);
-
+
+ //for not setting any property again
+ mIconCheck = false;
// Launch the event viewer.
mServices.IssueCommandL(ECalenEventView);
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_VIEWENTRY_EXIT );
}
@@ -951,8 +1050,11 @@
//
void CalenAgendaViewWidget::deleteEntry()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_DELETEENTRY_ENTRY );
+
// Check if the selected index is valid
if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_DELETEENTRY_EXIT );
return;
}
@@ -962,6 +1064,8 @@
setContextFromHighlight(entry);
// Issue the command to delete the entry
mServices.IssueCommandL(ECalenDeleteCurrentEntry);
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_DELETEENTRY_EXIT );
}
// ----------------------------------------------------------------------------
@@ -971,8 +1075,11 @@
//
void CalenAgendaViewWidget::markAsDone()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_MARKASDONE_ENTRY );
+
// Check if the selected index is valid
if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_MARKASDONE_EXIT );
return;
}
@@ -990,6 +1097,8 @@
mServices.agendaInterface()->setCompleted(entry, true, mDate);
mServices.IssueCommandL(ECalenStartActiveStep);
}
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_MARKASDONE_EXIT );
}
// ----------------------------------------------------------------------------
@@ -1000,12 +1109,15 @@
void CalenAgendaViewWidget::itemLongPressed(HbAbstractViewItem* listViewItem,
const QPointF& coords)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_ITEMLONGPRESSED_ENTRY );
+
mLongTapEventFlag = true;
// Update the selection index first
mSelectedIndex = listViewItem->modelIndex().row();
if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
// Invalid index
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_ITEMLONGPRESSED_EXIT );
return;
}
@@ -1043,6 +1155,8 @@
SLOT(contextMenuClosed()));
contextMenu->open(this, SLOT(contextManuTriggered(HbAction *)));
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_ITEMLONGPRESSED_EXIT );
}
// ----------------------------------------------------------------------------
@@ -1052,17 +1166,22 @@
//
void CalenAgendaViewWidget::itemActivated(const QModelIndex &index)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_ITEMACTIVATED_ENTRY );
+
// Update the selection index first
mSelectedIndex = index.row();
// Check if the selected index is valid
if (mSelectedIndex < 0 || mSelectedIndex > mInstanceArray.count()) {
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_ITEMACTIVATED_EXIT );
return;
}
if( !mLongTapEventFlag ) {
// Open the event for viewing
viewEntry();
}
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_ITEMACTIVATED_EXIT );
}
// ----------------------------------------------------------------------------
@@ -1072,6 +1191,8 @@
//
void CalenAgendaViewWidget::noteEditingCompleted(bool status)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_NOTEEDITINGCOMPLETED_ENTRY );
+
// We need to refresh the list since user
// might have marked the to-do as complete or
// edited it or deleted it. So get the instance
@@ -1079,6 +1200,8 @@
if (status) {
mServices.IssueCommandL(ECalenStartActiveStep);
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_NOTEEDITINGCOMPLETED_EXIT );
}
// ----------------------------------------------------------------------------
@@ -1088,9 +1211,12 @@
//
void CalenAgendaViewWidget::goToToday()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_GOTOTODAY_ENTRY );
+
// First check if we are not already
// showing today's agenda
if (mDate == CalenDateUtils::today()) {
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_GOTOTODAY_EXIT );
return;
}
@@ -1098,6 +1224,8 @@
mServices.Context().setFocusDate(CalenDateUtils::today());
mView->refreshViewOnGoToDate();
+
+ OstTraceFunctionExit0( DUP1_CALENAGENDAVIEWWIDGET_GOTOTODAY_EXIT );
}
// ----------------------------------------------------------------------------
@@ -1107,7 +1235,11 @@
//
void CalenAgendaViewWidget::contextMenuClosed()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_CONTEXTMENUCLOSED_ENTRY );
+
mLongTapEventFlag = false;
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_CONTEXTMENUCLOSED_EXIT );
}
// ----------------------------------------------------------------------------
@@ -1117,6 +1249,8 @@
//
void CalenAgendaViewWidget::contextManuTriggered(HbAction *action)
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_CONTEXTMANUTRIGGERED_ENTRY );
+
if (action->text() == hbTrId("txt_common_menu_open")) {
viewEntry();
} else if (action->text() == hbTrId("txt_calendar_menu_mark_as_done")) {
@@ -1128,6 +1262,8 @@
deleteEntry();
}
}
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_CONTEXTMANUTRIGGERED_EXIT );
}
// ----------------------------------------------------------------------------
// CalenAgendaViewWidget::clearListModel
@@ -1136,7 +1272,73 @@
//
void CalenAgendaViewWidget::clearListModel()
{
+ OstTraceFunctionEntry0( CALENAGENDAVIEWWIDGET_CLEARLISTMODEL_ENTRY );
+
mListModel->clear();
+
+ OstTraceFunctionExit0( CALENAGENDAVIEWWIDGET_CLEARLISTMODEL_EXIT );
+ }
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::hasAllDayIcon
+// return true if property for all day icon to set
+// ----------------------------------------------------------------------------
+//
+bool CalenAgendaViewWidget::hasAllDayIcon()
+ {
+ return mIconCheck;
}
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::checkEntryIcons
+// check if all day icon is present
+// ----------------------------------------------------------------------------
+//
+void CalenAgendaViewWidget::checkEntryIcons()
+ {
+ int index = 0;
+ //check the number of entries
+ index = mInstanceArray.count();
+ // Get each of the entry details
+ AgendaEntry entry;
+ if(mIndex < index )
+ entry = mInstanceArray[mIndex];
+
+ mLeftAllDayIcon = false;
+ mLocationData = false;
+
+ if(!entry.isTimedEntry() || CalenAgendaUtils::isAlldayEvent(entry)){
+ //all day icon is not there if its a timed entry
+ mLeftAllDayIcon = true;
+ }
+
+ if (!entry.location().isEmpty()) {
+ mLocationData = true ;
+ }
+ //check if shift to next entry
+ if(mNextEntry)
+ mIndex++;
+
+ }
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::isAllDayIcon
+// retirn true if all day icon is present
+// ----------------------------------------------------------------------------
+//
+bool CalenAgendaViewWidget::isAllDayIcon()
+ {
+ return mLeftAllDayIcon;
+ }
+
+// ----------------------------------------------------------------------------
+// CalenAgendaViewWidget::isLocationData
+// return true if location entry is present
+// ----------------------------------------------------------------------------
+//
+bool CalenAgendaViewWidget::isLocationData()
+ {
+ return mLocationData;
+ }
// End of file --Don't remove this.