diff -r 579cc610882e -r ef813d54df51 calendarui/views/src/caleneventlistviewitem.cpp --- a/calendarui/views/src/caleneventlistviewitem.cpp Tue Jul 06 14:14:56 2010 +0300 +++ b/calendarui/views/src/caleneventlistviewitem.cpp Wed Aug 18 09:47:38 2010 +0300 @@ -20,25 +20,111 @@ // User includes #include "caleneventlistviewitem.h" +#include "OstTraceDefinitions.h" +#ifdef OST_TRACE_COMPILER_IN_USE +#include "caleneventlistviewitemTraces.h" +#endif -CalenEventListViewItem::CalenEventListViewItem(QGraphicsItem *parent) : -HbListViewItem(parent) +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::CalenEventListViewItem +// constructor +// ---------------------------------------------------------------------------- +// +CalenEventListViewItem::CalenEventListViewItem(CalenAgendaViewWidget *parent) : +HbListViewItem(parent),mAllDayIcon(false),mLocationEntry(false),mParent(parent) { + OstTraceFunctionEntry0( CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_ENTRY ); + + OstTraceFunctionExit0( CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_EXIT ); } +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::~CalenEventListViewItem +// constructor +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::~CalenEventListViewItem() { + OstTraceFunctionEntry0( DUP1_CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_ENTRY ); + // No implementation yet + OstTraceFunctionExit0( DUP1_CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_EXIT ); } +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::createItem +// creates the instance of class +// ---------------------------------------------------------------------------- +// HbAbstractViewItem* CalenEventListViewItem::createItem() { + OstTraceFunctionEntry0( CALENEVENTLISTVIEWITEM_CREATEITEM_ENTRY ); + + OstTraceFunctionExit0( CALENEVENTLISTVIEWITEM_CREATEITEM_EXIT ); return new CalenEventListViewItem(*this); } +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::updateChildItems +// creates the child items +// ---------------------------------------------------------------------------- +// void CalenEventListViewItem::updateChildItems() { + OstTraceFunctionEntry0( CALENEVENTLISTVIEWITEM_UPDATECHILDITEMS_ENTRY ); + if(mParent->hasAllDayIcon()) + { + mParent->checkEntryIcons(); + mAllDayIcon = mParent->isAllDayIcon(); + mLocationEntry = mParent->isLocationData(); + } + HbListViewItem::updateChildItems(); + + OstTraceFunctionExit0( CALENEVENTLISTVIEWITEM_UPDATECHILDITEMS_EXIT ); } +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::hasAllDayIcon +// check if all day icon is there in item +// ---------------------------------------------------------------------------- +// +bool CalenEventListViewItem::hasAllDayIcon() + { + return mAllDayIcon ; + } + +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::setAllDayLeftIcon +// set the all day icon +// ---------------------------------------------------------------------------- +// +void CalenEventListViewItem::setAllDayLeftIcon(bool icon) + { + mAllDayIcon = icon; + } + +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::hasAllDayIcon +// check if location entry is there in item +// ---------------------------------------------------------------------------- +// +bool CalenEventListViewItem::locationEntryLayout() + { + if(mAllDayIcon && !mLocationEntry) + return true; + else + return false; + } + +// ---------------------------------------------------------------------------- +// CalenEventListViewItem::setAllDayLeftIcon +// set the location entry status +// ---------------------------------------------------------------------------- +// +void CalenEventListViewItem::setLocationEntry(bool icon) + { + mLocationEntry = icon; + } + // End of file