calendarui/views/src/caleneventlistviewitem.cpp
changeset 58 ef813d54df51
parent 32 ea672fcb0ea0
child 68 a5a1242fd2e8
equal deleted inserted replaced
50:579cc610882e 58:ef813d54df51
    18 // System includes
    18 // System includes
    19 #include <hbextendedlocale.h>
    19 #include <hbextendedlocale.h>
    20 
    20 
    21 // User includes
    21 // User includes
    22 #include "caleneventlistviewitem.h"
    22 #include "caleneventlistviewitem.h"
       
    23 #include "OstTraceDefinitions.h"
       
    24 #ifdef OST_TRACE_COMPILER_IN_USE
       
    25 #include "caleneventlistviewitemTraces.h"
       
    26 #endif
    23 
    27 
    24 CalenEventListViewItem::CalenEventListViewItem(QGraphicsItem *parent) :
    28 // ----------------------------------------------------------------------------
    25 HbListViewItem(parent)
    29 // CalenEventListViewItem::CalenEventListViewItem
       
    30 // constructor
       
    31 // ----------------------------------------------------------------------------
       
    32 // 
       
    33 CalenEventListViewItem::CalenEventListViewItem(CalenAgendaViewWidget *parent) :
       
    34 HbListViewItem(parent),mAllDayIcon(false),mLocationEntry(false),mParent(parent)
    26 {
    35 {
       
    36     OstTraceFunctionEntry0( CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_ENTRY );
       
    37     
       
    38     OstTraceFunctionExit0( CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_EXIT );
    27 }
    39 }
    28 
    40 
       
    41 // ----------------------------------------------------------------------------
       
    42 // CalenEventListViewItem::~CalenEventListViewItem
       
    43 // constructor
       
    44 // ----------------------------------------------------------------------------
       
    45 // 
    29 CalenEventListViewItem::~CalenEventListViewItem()
    46 CalenEventListViewItem::~CalenEventListViewItem()
    30 {
    47 {
       
    48     OstTraceFunctionEntry0( DUP1_CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_ENTRY );
       
    49     
    31     // No implementation yet
    50     // No implementation yet
       
    51     OstTraceFunctionExit0( DUP1_CALENEVENTLISTVIEWITEM_CALENEVENTLISTVIEWITEM_EXIT );
    32 }
    52 }
    33 
    53 
       
    54 // ----------------------------------------------------------------------------
       
    55 // CalenEventListViewItem::createItem
       
    56 // creates the instance of class
       
    57 // ----------------------------------------------------------------------------
       
    58 // 
    34 HbAbstractViewItem* CalenEventListViewItem::createItem()
    59 HbAbstractViewItem* CalenEventListViewItem::createItem()
    35 {
    60 {
       
    61     OstTraceFunctionEntry0( CALENEVENTLISTVIEWITEM_CREATEITEM_ENTRY );
       
    62     
       
    63     OstTraceFunctionExit0( CALENEVENTLISTVIEWITEM_CREATEITEM_EXIT );
    36     return new CalenEventListViewItem(*this);
    64     return new CalenEventListViewItem(*this);
    37 }
    65 }
    38 
    66 
       
    67 // ----------------------------------------------------------------------------
       
    68 // CalenEventListViewItem::updateChildItems
       
    69 // creates the child items
       
    70 // ----------------------------------------------------------------------------
       
    71 // 
    39 void CalenEventListViewItem::updateChildItems()
    72 void CalenEventListViewItem::updateChildItems()
    40 {
    73 {
       
    74     OstTraceFunctionEntry0( CALENEVENTLISTVIEWITEM_UPDATECHILDITEMS_ENTRY );
       
    75     if(mParent->hasAllDayIcon())
       
    76         {
       
    77         mParent->checkEntryIcons();
       
    78         mAllDayIcon = mParent->isAllDayIcon();
       
    79         mLocationEntry =  mParent->isLocationData();
       
    80         }
       
    81     
    41     HbListViewItem::updateChildItems();
    82     HbListViewItem::updateChildItems();
       
    83     
       
    84     OstTraceFunctionExit0( CALENEVENTLISTVIEWITEM_UPDATECHILDITEMS_EXIT );
    42 }
    85 }
    43 
    86 
       
    87 // ----------------------------------------------------------------------------
       
    88 // CalenEventListViewItem::hasAllDayIcon
       
    89 // check if all day icon is there in item
       
    90 // ----------------------------------------------------------------------------
       
    91 // 
       
    92 bool CalenEventListViewItem::hasAllDayIcon()
       
    93     {
       
    94     return mAllDayIcon ;
       
    95     }
       
    96 
       
    97 // ----------------------------------------------------------------------------
       
    98 // CalenEventListViewItem::setAllDayLeftIcon
       
    99 // set the all day icon 
       
   100 // ----------------------------------------------------------------------------
       
   101 // 
       
   102 void CalenEventListViewItem::setAllDayLeftIcon(bool icon)
       
   103     {
       
   104     mAllDayIcon = icon;
       
   105     }
       
   106 
       
   107 // ----------------------------------------------------------------------------
       
   108 // CalenEventListViewItem::hasAllDayIcon
       
   109 // check if location entry is there in item
       
   110 // ----------------------------------------------------------------------------
       
   111 // 
       
   112 bool CalenEventListViewItem::locationEntryLayout()
       
   113     {
       
   114     if(mAllDayIcon && !mLocationEntry)
       
   115         return true;
       
   116     else
       
   117         return false;
       
   118     }
       
   119 
       
   120 // ----------------------------------------------------------------------------
       
   121 // CalenEventListViewItem::setAllDayLeftIcon
       
   122 // set the location entry status 
       
   123 // ----------------------------------------------------------------------------
       
   124 // 
       
   125 void CalenEventListViewItem::setLocationEntry(bool icon)
       
   126     {
       
   127     mLocationEntry = icon;
       
   128     }
       
   129 
    44 // End of file
   130 // End of file