diff -r 000000000000 -r f979ecb2b13e calendarui/views/inc/calenpreviewlabel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calendarui/views/inc/calenpreviewlabel.h Tue Feb 02 10:12:19 2010 +0200 @@ -0,0 +1,113 @@ +/* +* 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 +#include +#include + + +// 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