calendarui/views/inc/calenpreviewlabel.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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:   Data storage for single lines of preview data.
       
    15  *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CALENPREVIEWLABEL_H
       
    21 #define CALENPREVIEWLABEL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include "CalendarVariant.hrh"
       
    25 
       
    26 
       
    27 #include <AknUtils.h>
       
    28 #include <eiklabel.h>
       
    29 #include <e32base.h>
       
    30 
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CEikLabel;
       
    34 class CGulIcon;
       
    35 class MCalenPreviewLabelObserver;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40  * CCalenPreviewEntry is a storage class for single line of popup.
       
    41  * @lib Calendar.exe
       
    42  * @since 5.0
       
    43  */
       
    44 NONSHARABLE_CLASS( CCalenPreviewLabel ) : public CEikLabel
       
    45     {
       
    46     public:
       
    47     enum TPreviewLabelType
       
    48         {
       
    49         ECalenPreviewTitleRow,
       
    50         ECalenPreviewPluginRow,
       
    51         ECalenPreviewFirstRow,
       
    52         ECalenPreviewMiddleRow,
       
    53         ECalenPreviewLastRow,
       
    54         ECalenPreviewEmptyRow,
       
    55         ECalenPreviewEmptyRow2,
       
    56         ECalenPreviewEmptyRowWithPlugin,
       
    57         ECalenPreviewEmptyRow2WithPlugin
       
    58         };
       
    59     enum TPreviewVisualisation
       
    60         {
       
    61         EAddVisualisation,
       
    62         ERemoveVisualisation
       
    63         };
       
    64     /**
       
    65      * Copy constructor
       
    66      */
       
    67     static CCalenPreviewLabel* NewL();
       
    68 
       
    69     /**
       
    70      * Destructor
       
    71      */
       
    72     virtual ~CCalenPreviewLabel();
       
    73 
       
    74     public:
       
    75 
       
    76     void HandleVisualisationL(TPreviewVisualisation aCommond);
       
    77 
       
    78     TPreviewLabelType LabelType() const;
       
    79     void SetLabelType(TPreviewLabelType aLabelType);
       
    80 
       
    81     void SetLabelObserver(MCalenPreviewLabelObserver* aObserver);
       
    82 
       
    83     void SetIconLayout(TAknLayoutRect aLayout);
       
    84     TRect IconRect() const;
       
    85 
       
    86     void SetMoreIconLayout(TAknLayoutRect aLayout);
       
    87     TRect MoreIconRect() const;
       
    88 
       
    89     void SetIcon(CGulIcon* aIcon);
       
    90     void SetMoreIcon(CGulIcon* aIcon);
       
    91 
       
    92     CGulIcon* Icon();
       
    93     CGulIcon* MoreIcon();
       
    94     TUint32 icolor; 
       
    95 
       
    96     private:
       
    97     /**
       
    98      * Constructor
       
    99      */
       
   100     CCalenPreviewLabel();
       
   101 
       
   102     MCalenPreviewLabelObserver* iObserver;
       
   103     TPreviewLabelType iType;
       
   104 
       
   105     CGulIcon* iIcon;
       
   106     CGulIcon* iMoreIcon;
       
   107 
       
   108     TAknLayoutRect iIconLayout;
       
   109     TAknLayoutRect iMoreIconLayout;
       
   110     };
       
   111    
       
   112 
       
   113 #endif // CALENPREVIEWLABEL_H