45
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: CalenDayHourScrollArea class definition.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CALENDAYHOURSCROLLAREA_H_
|
|
19 |
#define CALENDAYHOURSCROLLAREA_H_
|
|
20 |
|
|
21 |
// System includes
|
|
22 |
#include <QDateTime>
|
57
|
23 |
#include <HbScrollArea>
|
45
|
24 |
|
|
25 |
// User includes
|
|
26 |
#include "calendaycommonheaders.h"
|
|
27 |
|
57
|
28 |
// Forward declarations
|
45
|
29 |
class CalenDayHourElement;
|
|
30 |
|
57
|
31 |
#ifdef CALENVIEWS_DLL
|
55
|
32 |
#define CALENDAYHOURSCROLLAREA_EXPORT Q_DECL_EXPORT
|
|
33 |
#else
|
|
34 |
#define CALENDAYHOURSCROLLAREA_EXPORT Q_DECL_IMPORT
|
|
35 |
#endif
|
|
36 |
|
45
|
37 |
// Class declaration
|
55
|
38 |
class CALENDAYHOURSCROLLAREA_EXPORT CalenDayHourScrollArea : public HbScrollArea
|
45
|
39 |
{
|
57
|
40 |
Q_OBJECT
|
45
|
41 |
|
|
42 |
public:
|
|
43 |
CalenDayHourScrollArea(QGraphicsItem *parent = 0);
|
|
44 |
virtual ~CalenDayHourScrollArea();
|
57
|
45 |
|
45
|
46 |
void setDateTime(const QDateTime &dateTime);
|
|
47 |
QDateTime dateTime() const;
|
|
48 |
|
|
49 |
void scrollToHour(int hour);
|
|
50 |
|
|
51 |
public slots:
|
|
52 |
void scrollVertically(const QPointF &newPosition);
|
|
53 |
|
|
54 |
private:
|
|
55 |
QDateTime mDateTime;
|
|
56 |
QList<CalenDayHourElement*> mHourElements;
|
|
57 |
};
|
|
58 |
|
|
59 |
#endif /* CALENDAYHOURSCROLLAREA_H_ */
|