calendarui/views/src/calenmonthdata.cpp
changeset 18 c198609911f9
parent 0 f979ecb2b13e
child 51 0b38fc5b94c6
equal deleted inserted replaced
0:f979ecb2b13e 18:c198609911f9
     1 /*
     1 /*
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:   For data of MonthView by one day.
    14 * Description:  CalenMonthData implementation.
    15  *
    15 *
    16 */
    16 */
    17 
       
    18 
    17 
    19 
    18 
    20 //debug
    19 //debug
    21 #include "calendarui_debug.h"
    20 #include "calendarui_debug.h"
    22 
    21 
    24 #include "calenmonthdata.h"
    23 #include "calenmonthdata.h"
    25 
    24 
    26 
    25 
    27 // ================= MEMBER FUNCTIONS =======================
    26 // ================= MEMBER FUNCTIONS =======================
    28 
    27 
    29 // C++ default constructor can NOT contain any code, that
    28 // ----------------------------------------------------------------------------
    30 // might leave.
    29 // CalenMonthData::CalenMonthData
       
    30 // 
       
    31 // (other items were commented in a header).
       
    32 // ----------------------------------------------------------------------------
    31 //
    33 //
    32 TCalenMonthData::TCalenMonthData()
    34 CalenMonthData::CalenMonthData()
    33     : iDay(TInt64(0)), iHasEvents(EFalse)
    35     : mDay(QDateTime()), mHasEvents(false)
    34     {
    36     {
    35     TRACE_ENTRY_POINT;
    37     TRACE_ENTRY_POINT;
    36     TRACE_EXIT_POINT;
    38     TRACE_EXIT_POINT;
    37     }
    39     }
    38 
    40 
    39 // C++ constructor can NOT contain any code, that
    41 // ----------------------------------------------------------------------------
    40 // might leave.
    42 // CalenMonthData::CalenMonthData
       
    43 // 
       
    44 // (other items were commented in a header).
       
    45 // ----------------------------------------------------------------------------
    41 //
    46 //
    42 // -----------------------------------------------------------------------------
    47 CalenMonthData::CalenMonthData
    43 // ?classname::?member_function
    48 (QDateTime day)
    44 // ?implementation_description
    49     : mDay(day), mHasEvents(false)
    45 // (other items were commented in a header).
       
    46 // -----------------------------------------------------------------------------
       
    47 //
       
    48 TCalenMonthData::TCalenMonthData
       
    49 (TTime aDay)
       
    50     : iDay(aDay), iHasEvents(EFalse)
       
    51     {
    50     {
    52     TRACE_ENTRY_POINT;
    51     TRACE_ENTRY_POINT;
    53     TRACE_EXIT_POINT;
    52     TRACE_EXIT_POINT;
    54     }
    53     }
    55 
    54 
    56 // Destructor
    55 // ----------------------------------------------------------------------------
    57 // -----------------------------------------------------------------------------
    56 // CalenMonthData::~CalenMonthData
    58 // ?classname::?member_function
    57 // 
    59 // ?implementation_description
       
    60 // (other items were commented in a header).
    58 // (other items were commented in a header).
    61 // -----------------------------------------------------------------------------
    59 // ----------------------------------------------------------------------------
    62 //
    60 //
    63 TCalenMonthData::~TCalenMonthData()
    61 CalenMonthData::~CalenMonthData()
    64     {
    62     {
    65     TRACE_ENTRY_POINT;
    63     TRACE_ENTRY_POINT;
    66     TRACE_EXIT_POINT;
    64     TRACE_EXIT_POINT;
    67     }
    65     }
    68 
    66 
    69 // ---------------------------------------------------------
    67 // ---------------------------------------------------------
    70 // TCalenMonthData::Day
    68 // CalenMonthData::Day
    71 // return day
    69 // return day
    72 // (other items were commented in a header).
    70 // (other items were commented in a header).
    73 // ---------------------------------------------------------
    71 // ---------------------------------------------------------
    74 //
    72 //
    75 TTime TCalenMonthData::Day()
    73 QDateTime CalenMonthData::Day()
    76     {
    74     {
    77     TRACE_ENTRY_POINT;
    75     TRACE_ENTRY_POINT;
    78     
    76     
    79     TRACE_EXIT_POINT;
    77     TRACE_EXIT_POINT;
    80     return iDay;
    78     return mDay;
    81     }
    79     }
    82 
    80 
    83 // -----------------------------------------------------------------------------
    81 // -----------------------------------------------------------------------------
    84 // ?classname::?member_function
    82 // ?classname::SetHasEvents
    85 // ?implementation_description
    83 // ?implementation_description
    86 // (other items were commented in a header).
    84 // (other items were commented in a header).
    87 // -----------------------------------------------------------------------------
    85 // -----------------------------------------------------------------------------
    88 //
    86 //
    89 void TCalenMonthData::SetHasEvents(TBool aHasEvents)
    87 void CalenMonthData::SetHasEvents(bool hasEvents)
    90     {
    88     {
    91     TRACE_ENTRY_POINT;
    89     TRACE_ENTRY_POINT;
    92     
    90     
    93     iHasEvents = aHasEvents;
    91     mHasEvents = hasEvents;
    94     
    92     
    95     TRACE_EXIT_POINT;
    93     TRACE_EXIT_POINT;
    96     }
    94     }
    97 
    95 
    98 // -----------------------------------------------------------------------------
    96 // -----------------------------------------------------------------------------
    99 // ?classname::?member_function
    97 // ?classname::HasEvents
   100 // ?implementation_description
    98 // ?implementation_description
   101 // (other items were commented in a header).
    99 // (other items were commented in a header).
   102 // -----------------------------------------------------------------------------
   100 // -----------------------------------------------------------------------------
   103 //
   101 //
   104 TBool TCalenMonthData::HasEvents()
   102 bool CalenMonthData::HasEvents()
   105     {
   103     {
   106     TRACE_ENTRY_POINT;
   104     TRACE_ENTRY_POINT;
   107           
   105     
   108     TRACE_EXIT_POINT;
   106     TRACE_EXIT_POINT;
   109     return iHasEvents;
   107     return mHasEvents;
   110     }
   108     }
   111 
   109 
       
   110 void CalenMonthData::setActive(bool isActive)
       
   111     {
       
   112     mIsActive = isActive;
       
   113     }
   112 
   114 
       
   115 bool CalenMonthData::isActive()
       
   116     {
       
   117     return mIsActive;
       
   118     }
   113 // End of File
   119 // End of File