calendarui/views/dayview/inc/calendayhourscrollarea.h
author hgs
Mon, 26 Jul 2010 13:54:38 +0530
changeset 55 2c54b51f39c4
parent 45 b6db4fd4947b
child 57 bb2d3e476f29
permissions -rw-r--r--
201029

/*
 * 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:  CalenDayHourScrollArea class definition.
 *
 */

#ifndef CALENDAYHOURSCROLLAREA_H_
#define CALENDAYHOURSCROLLAREA_H_

// System includes
#include <hbscrollarea.h>
#include <QDateTime>

// User includes
#include "calendaycommonheaders.h"

//forward declarations
class CalenDayHourElement;

#ifdef  CALENVIEWS_DLL
#define CALENDAYHOURSCROLLAREA_EXPORT Q_DECL_EXPORT
#else
#define CALENDAYHOURSCROLLAREA_EXPORT Q_DECL_IMPORT
#endif

// Class declaration
class CALENDAYHOURSCROLLAREA_EXPORT CalenDayHourScrollArea : public HbScrollArea
{
Q_OBJECT

public:
    CalenDayHourScrollArea(QGraphicsItem *parent = 0);
    virtual ~CalenDayHourScrollArea();
    void setDateTime(const QDateTime &dateTime);
    QDateTime dateTime() const;
    
    void scrollToHour(int hour);

public slots:
    void scrollVertically(const QPointF &newPosition);
    
private:
    QDateTime mDateTime;
    QList<CalenDayHourElement*> mHourElements;
};

#endif /* CALENDAYHOURSCROLLAREA_H_ */