calendarui/views/dayview/tsrc/unittests/unittest_calendaymodelmanager/calendaymodel.h
equal
deleted
inserted
replaced
|
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: Single day item view model |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CALENDAYMODEL_H |
|
19 #define CALENDAYMODEL_H |
|
20 |
|
21 //System includes |
|
22 #include <QAbstractItemModel> |
|
23 #include <QVariant> |
|
24 #include <QDateTime> |
|
25 |
|
26 #include <agendaentry.h> |
|
27 |
|
28 //User includes |
|
29 |
|
30 //Forward declarations |
|
31 class MCalenServices; |
|
32 |
|
33 //Constantss |
|
34 const int CalenDayEntry = Qt::UserRole + 1; |
|
35 |
|
36 Q_DECLARE_METATYPE(AgendaEntry) |
|
37 |
|
38 class CalenDayModel : public QAbstractListModel |
|
39 { |
|
40 Q_OBJECT |
|
41 public: |
|
42 CalenDayModel(const QDateTime &date, MCalenServices &services, |
|
43 QObject *parent = 0){ |
|
44 Q_UNUSED(date); |
|
45 Q_UNUSED(services); |
|
46 Q_UNUSED(parent); |
|
47 } |
|
48 |
|
49 // from QAbstractListModel |
|
50 int rowCount(const QModelIndex &parent = QModelIndex()) const{ |
|
51 Q_UNUSED(parent); |
|
52 return 0; |
|
53 } |
|
54 QVariant data(const QModelIndex &index, int role) const{ |
|
55 Q_UNUSED(index); |
|
56 Q_UNUSED(role); |
|
57 return 0; |
|
58 } |
|
59 |
|
60 void refreshModel(const QDateTime &date){ |
|
61 Q_UNUSED(date); |
|
62 } |
|
63 |
|
64 QDateTime modelDate(){ |
|
65 return QDateTime(QDate(2000, 10, 10)); |
|
66 } |
|
67 }; |
|
68 |
|
69 #endif //CALENDAYMODEL_H |
|
70 |