|
1 /* |
|
2 * Copyright (c) 2002 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: Static utility functions. |
|
15 * - date utils to help comparisions and calculations witg |
|
16 * dates and times. |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef CALENAGENDAUTILS_H |
|
22 #define CALENAGENDAUTILS_H |
|
23 |
|
24 // INCLUDES |
|
25 |
|
26 #include <agendaentry.h> |
|
27 #include <qglobal.h> // Q_DECL_EXPORT macro |
|
28 |
|
29 #ifdef CALENDATEUTILS_DLL |
|
30 #define CALENAGENDAUTIL_EXPORT Q_DECL_EXPORT |
|
31 #else |
|
32 #define CALENAGENDAUTIL_EXPORT Q_DECL_IMPORT |
|
33 #endif |
|
34 |
|
35 // FORWARD DECLARATIONS |
|
36 class CCalInstance; |
|
37 class CCalEntryView; |
|
38 class CCalInstanceView; |
|
39 |
|
40 // CLASS DECLARATION |
|
41 NONSHARABLE_CLASS( CALENAGENDAUTIL_EXPORT CalenAgendaUtils ) |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Checks that if entry ends at starting midnight of the day, |
|
47 * but has started earlier. |
|
48 * Such entries are not shown in day that they end, because end time |
|
49 * is just marking the end of previous day. |
|
50 * @returns ETrue, if entry ends at starting midnight of day, but starts before that |
|
51 * EFalse, otherwise |
|
52 **/ |
|
53 static bool endsAtStartOfDay( AgendaEntry& entry, |
|
54 const QDateTime& day ); |
|
55 |
|
56 /** |
|
57 * Checks if the given entry is an all-day |
|
58 * Need to call this API only for entry types other than EEvent |
|
59 * @param entry Entry for which all-day attribute is being queried |
|
60 * @returns True, If entry is an all-day else False |
|
61 */ |
|
62 static bool CalenAgendaUtils::isAlldayEvent( const AgendaEntry& entry ); |
|
63 |
|
64 }; |
|
65 |
|
66 #endif // CALENAGENDAUTILS_H |
|
67 |
|
68 |
|
69 // End of File |