45
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-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: Mocked classes for testing CalenDayInfo class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef CALENDAYINFO_H
|
|
19 |
#define CALENDAYINFO_H
|
|
20 |
|
|
21 |
#include <calinstance.h>
|
|
22 |
#include "caleninstanceid.h"
|
|
23 |
|
|
24 |
const int KFSCalMaxDescriptionLength = 100;
|
|
25 |
|
|
26 |
/*!
|
|
27 |
Mocked struct SCalenApptInfo
|
|
28 |
*/
|
|
29 |
struct SCalenApptInfo
|
|
30 |
{
|
|
31 |
QModelIndex iIndex;
|
|
32 |
QDateTime iStartTime;
|
|
33 |
QDateTime iEndTime;
|
|
34 |
bool iAllDay;
|
|
35 |
TCalenInstanceId iId;
|
|
36 |
AgendaEntry::Status iStatus;
|
|
37 |
TBufC<KFSCalMaxDescriptionLength> iSummary;
|
|
38 |
TUint32 iColor;
|
|
39 |
};
|
|
40 |
|
|
41 |
/*!
|
|
42 |
Mocked class CalenTimeColumn
|
|
43 |
*/
|
|
44 |
class CalenTimeColumn
|
|
45 |
{
|
|
46 |
public:
|
|
47 |
CalenTimeColumn() {
|
|
48 |
|
|
49 |
}
|
|
50 |
|
|
51 |
~CalenTimeColumn() {
|
|
52 |
|
|
53 |
}
|
|
54 |
};
|
|
55 |
|
|
56 |
/*!
|
|
57 |
Mocked class CalenTimeRegion
|
|
58 |
*/
|
|
59 |
class CalenTimeRegion
|
|
60 |
{
|
|
61 |
public:
|
|
62 |
CalenTimeRegion() {
|
|
63 |
|
|
64 |
}
|
|
65 |
|
|
66 |
~CalenTimeRegion() {
|
|
67 |
|
|
68 |
}
|
|
69 |
|
|
70 |
QList<CalenTimeColumn> iColumns;
|
|
71 |
|
|
72 |
int iStartSlot;
|
|
73 |
int iEndSlot;
|
|
74 |
};
|
|
75 |
|
|
76 |
/*!
|
|
77 |
Mocked class CalenDayInfo
|
|
78 |
*/
|
|
79 |
class CalenDayInfo
|
|
80 |
{
|
|
81 |
public:
|
|
82 |
enum TSlotsInHour
|
|
83 |
{
|
|
84 |
EOne = 1, ETwo, EThree, EFour
|
|
85 |
};
|
|
86 |
|
|
87 |
public:
|
|
88 |
|
57
|
89 |
CalenDayInfo(TSlotsInHour aSlotsInHour)
|
|
90 |
{
|
45
|
91 |
Q_UNUSED(aSlotsInHour)
|
|
92 |
}
|
57
|
93 |
virtual ~CalenDayInfo()
|
|
94 |
{
|
|
95 |
|
|
96 |
}
|
45
|
97 |
|
|
98 |
void GetLocation( const SCalenApptInfo& aItemInfo, int& aStartSlot,
|
57
|
99 |
int& aEndSlot, int& aColumnIndex, int& aColumns )
|
|
100 |
{
|
45
|
101 |
Q_UNUSED(aItemInfo)
|
|
102 |
Q_UNUSED(aStartSlot)
|
|
103 |
Q_UNUSED(aEndSlot)
|
|
104 |
Q_UNUSED(aColumnIndex)
|
|
105 |
Q_UNUSED(aColumns)
|
|
106 |
}
|
|
107 |
|
57
|
108 |
int AlldayCount()
|
|
109 |
{
|
45
|
110 |
return 0;
|
|
111 |
}
|
|
112 |
|
57
|
113 |
const QList<CalenTimeRegion>& RegionList() const
|
|
114 |
{
|
45
|
115 |
return mList;
|
|
116 |
}
|
|
117 |
|
57
|
118 |
void InsertAlldayEvent( const SCalenApptInfo& aItemInfo )
|
|
119 |
{
|
|
120 |
Q_UNUSED(aItemInfo)
|
|
121 |
|
|
122 |
CalenTimeRegion region;
|
|
123 |
|
|
124 |
region.iStartSlot = 10;
|
|
125 |
region.iEndSlot = 13;
|
|
126 |
region.iColumns << CalenTimeColumn();
|
|
127 |
|
|
128 |
mList << region;
|
|
129 |
}
|
|
130 |
|
45
|
131 |
public:
|
|
132 |
QList<CalenTimeRegion> mList;
|
|
133 |
};
|
|
134 |
|
|
135 |
#endif // CALENDAYINFO_H
|
|
136 |
|
|
137 |
// End of File
|