calendarui/views/inc/calenweekhour.h
branchRCL_3
changeset 66 bd7edf625bdd
parent 0 f979ecb2b13e
equal deleted inserted replaced
65:12af337248b1 66:bd7edf625bdd
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  TCalenWeekHour has data by one hour.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef     CALENWEEKHOUR_H
       
    20 #define     CALENWEEKHOUR_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 // CONSTANTS
       
    26 const TInt KEventsInHour(6); // Event indicators in a hour
       
    27 
       
    28 //FIXME, inside class namespace ?
       
    29 enum TEventColor
       
    30     {
       
    31     ENoEvent,
       
    32     EPublicEvent,
       
    33     EPrivateEvent,
       
    34     ENoSyncEvent,
       
    35     EManyEvents,
       
    36     EBlackColoredEvent
       
    37     };
       
    38 
       
    39 //  CLASS DEFINITIONS
       
    40 
       
    41 /**
       
    42  *  TCalenWeekHour has data by one hour
       
    43  */
       
    44 NONSHARABLE_CLASS( TCalenWeekHour )
       
    45     {
       
    46 public :
       
    47     enum TDataType
       
    48         {
       
    49         ENoData,
       
    50         EHasIcon,
       
    51         EHasBar
       
    52         };
       
    53 public:  // Constructors and destructor
       
    54 
       
    55     /**
       
    56      * C++ default constructor.
       
    57      */
       
    58     TCalenWeekHour();
       
    59 
       
    60 public:     // New funcitons
       
    61     /**
       
    62      * Flag of No data or Timed or Non-timed note
       
    63      * @return ENoData:  No data
       
    64      *         EHasIcon: Non-timed note data
       
    65      *         EHasBar:  Timed note data
       
    66      */
       
    67     TDataType DataType() const;
       
    68 
       
    69     /**
       
    70      * Return event type
       
    71      * @param ?arg1 aMinutes : 0-9minutes 1: 10-19minutes...,
       
    72      * @return ENoEvent          : No event
       
    73      *         EPublicEvent      : public event
       
    74      *         EPrivateEvent     : Private event
       
    75      *         EPublic2Event     : Overlapped public event
       
    76      *         EPrivate2Event    : Overlapped private event
       
    77      *         EPublicPrivateEvent: Overlapped public and private event
       
    78      */
       
    79     TUint32 Event(TInt aMinutes) const;
       
    80     /**
       
    81      * Set a event type
       
    82      * @param aMinutes 0 : 0-9minutes 1: 10-19minutes...,
       
    83      * @param aType 0 : ENoEvent | EPublicEvent | etc...
       
    84      */
       
    85     void SetEvent(TInt aMinutes, TUint32 aType);
       
    86 
       
    87     /**
       
    88      * Return a Icon index
       
    89      * @return icon index
       
    90      */
       
    91     TInt IconIndex() const;
       
    92     /**
       
    93      * Set a Icon index
       
    94      * @param aIconIndex Icon index
       
    95      */
       
    96     void SetIconIndex(TInt aIconIndex);
       
    97 
       
    98 private:    // New data
       
    99     TDataType iDataType;
       
   100     union
       
   101         {
       
   102         TUint32 iEvent[KEventsInHour];
       
   103         TInt iIconIndex;
       
   104         };
       
   105     };
       
   106 
       
   107 #endif      //  CALENWEEKHOUR_H
       
   108 
       
   109 
       
   110 // End of File