diff -r fd30d51f876b -r b6db4fd4947b calendarui/views/dayview/inc/calendaycontentwidget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/calendarui/views/dayview/inc/calendaycontentwidget.h Mon Jun 28 15:22:02 2010 +0530 @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2010 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: CalenDayContentWidget class definition. + * + */ + +#ifndef CALENDAYCONTENTWIDGET_H_ +#define CALENDAYCONTENTWIDGET_H_ + +// System includes +#include + +// User includes +#include "calendaycommonheaders.h" + +// Forward declarations +class QGraphicsLinearLayout; +class CalenDayModelManager; + + +class CalenDayContentWidget : public HbWidget +{ +Q_OBJECT + +public: + /*! + \enum CalenWidgetPosition + \brief Enumeration identifies widget position if queue. + */ + enum CalenWidgetPosition + { + ECalenLastWidget = 0, + ECalenFirstWidget + }; + +public: + CalenDayContentWidget(CalenDayModelManager &modelManager, + QGraphicsItem *parent = 0); + ~CalenDayContentWidget(); + + void add(HbWidget* item, CalenWidgetPosition where = ECalenLastWidget); + HbWidget* take(CalenWidgetPosition which); + void remove(CalenWidgetPosition which); + +signals: + void widgetsRelayoutFinished(CalenScrollDirection scrollTo); + void scrollPositionChanged(const QPointF &newPos); + +public slots: + void relayoutWidgets(CalenScrollDirection scrollTo); + void widgetScrolled(const QPointF &newPos); + +private: + void initializeViews(QGraphicsItem *parent); + +private: + QGraphicsLinearLayout* mLayout; //!< Linear layout for day views + + QList mWidgets; //!< List of widget instances + + CalenDayModelManager &mModelManager; //!< Reference to model manager +}; + +#endif /* CALENDAYCONTENTWIDGET_H_ */