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