calendarui/views/inc/calenpreviewlabel.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 27 Apr 2010 16:36:22 +0300
branchRCL_3
changeset 15 9711e452b5e9
parent 0 f979ecb2b13e
permissions -rw-r--r--
Revision: 201015 Kit: 201017

/*
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   Data storage for single lines of preview data.
 *
*/



#ifndef CALENPREVIEWLABEL_H
#define CALENPREVIEWLABEL_H

//  INCLUDES
#include "CalendarVariant.hrh"


#include <AknUtils.h>
#include <eiklabel.h>
#include <e32base.h>


// FORWARD DECLARATIONS
class CEikLabel;
class CGulIcon;
class MCalenPreviewLabelObserver;

// CLASS DECLARATION

/**
 * CCalenPreviewEntry is a storage class for single line of popup.
 * @lib Calendar.exe
 * @since 5.0
 */
NONSHARABLE_CLASS( CCalenPreviewLabel ) : public CEikLabel
    {
    public:
    enum TPreviewLabelType
        {
        ECalenPreviewTitleRow,
        ECalenPreviewPluginRow,
        ECalenPreviewFirstRow,
        ECalenPreviewMiddleRow,
        ECalenPreviewLastRow,
        ECalenPreviewEmptyRow,
        ECalenPreviewEmptyRow2,
        ECalenPreviewEmptyRowWithPlugin,
        ECalenPreviewEmptyRow2WithPlugin
        };
    enum TPreviewVisualisation
        {
        EAddVisualisation,
        ERemoveVisualisation
        };
    /**
     * Copy constructor
     */
    static CCalenPreviewLabel* NewL();

    /**
     * Destructor
     */
    virtual ~CCalenPreviewLabel();

    public:

    void HandleVisualisationL(TPreviewVisualisation aCommond);

    TPreviewLabelType LabelType() const;
    void SetLabelType(TPreviewLabelType aLabelType);

    void SetLabelObserver(MCalenPreviewLabelObserver* aObserver);

    void SetIconLayout(TAknLayoutRect aLayout);
    TRect IconRect() const;

    void SetMoreIconLayout(TAknLayoutRect aLayout);
    TRect MoreIconRect() const;

    void SetIcon(CGulIcon* aIcon);
    void SetMoreIcon(CGulIcon* aIcon);

    CGulIcon* Icon();
    CGulIcon* MoreIcon();
    TUint32 icolor; 

    private:
    /**
     * Constructor
     */
    CCalenPreviewLabel();

    MCalenPreviewLabelObserver* iObserver;
    TPreviewLabelType iType;

    CGulIcon* iIcon;
    CGulIcon* iMoreIcon;

    TAknLayoutRect iIconLayout;
    TAknLayoutRect iMoreIconLayout;
    };
   

#endif // CALENPREVIEWLABEL_H