diff -r 96907930389d -r 12af337248b1 calendarui/views/inc/calenpreviewpane.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calendarui/views/inc/calenpreviewpane.h Tue Aug 31 15:13:43 2010 +0300 @@ -0,0 +1,95 @@ +/* +* Copyright (c) 2009 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: CalenPreviewPane class definition. +* +*/ + + + +#ifndef CALENPREVIEWPANE_H_ +#define CALENPREVIEWPANE_H_ + +// System includes +#include +#include + +// Forward declarations +class HbLabel; +class MCalenServices; +class AgendaEntry; +class CalenMonthView; + +#ifdef CALENVIEWS_DLL +#define CALENPREVIEW_EXPORT Q_DECL_EXPORT +#else +#define CALENPREVIEW_EXPORT Q_DECL_IMPORT +#endif + +class CALENPREVIEW_EXPORT CalenPreviewPane : public HbScrollArea +{ + Q_OBJECT + +public: + CalenPreviewPane(MCalenServices& services, QGraphicsItem *parent=0); + ~CalenPreviewPane(); + +public: + void setNoEntriesLabel(HbLabel* label); + void populateLabel( QDateTime date); + QDateTime Date(); + void startAutoScroll(); + void setView(CalenMonthView* view); + void stopScrolling(); + void effectStarted(); + void effectFinished(); + +protected: + void gestureEvent(QGestureEvent *event); + +private: + void GetInstanceListL(); + void checkStartTimeOfEvent(QDateTime &dateTime); + +public slots: + void onTwoSecondsTimeout(); + void scrollingFinished(); + void handleThemeChange(); + +private: + enum scrollDirection{ + up, + down, + invalid + }; + + CalenMonthView* mView; + MCalenServices &mServices; + QDateTime mDate; + QList mInstanceArray; + QPointF mPressedPos; + QList mLabelList; + QTimer* mTwoSecTimer; + scrollDirection mScrollDirection; + int mNumOfScrolls; + HbLabel* mNoEntriesLabel; + bool mIsNoEntriesAdded; + bool mIsGestureHandled; + qreal mHtDiff; + int mScrollDuration; + QColor mPreviewTextColor; +}; + +#endif /* CALENPREVIEWPANE_H_ */ + +// End of file --Don't remove this.