calendarui/views/inc/calenpreviewlabel.h
author Simon Howkins <simonh@symbian.org>
Mon, 22 Nov 2010 16:01:09 +0000
branchRCL_3
changeset 93 d216ae5a8733
parent 0 f979ecb2b13e
permissions -rw-r--r--
Adjusted to avoid exports, etc, from a top-level bld.inf

/*
* 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