|
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 * Removes entries ending aDay at midnight. |
|
47 **/ |
|
48 static void removeEntriesEndingAtMidnightL( QList<AgendaEntry>& list, |
|
49 const QDateTime& day ); |
|
50 |
|
51 /** |
|
52 * Checks that if entry ends at starting midnight of the day, |
|
53 * but has started earlier. |
|
54 * Such entries are not shown in day that they end, because end time |
|
55 * is just marking the end of previous day. |
|
56 * @returns ETrue, if entry ends at starting midnight of day, but starts before that |
|
57 * EFalse, otherwise |
|
58 **/ |
|
59 static bool endsAtStartOfDayL( AgendaEntry& entry, |
|
60 const QDateTime& day ); |
|
61 |
|
62 }; |
|
63 |
|
64 #endif // CALENAGENDAUTILS_H |
|
65 |
|
66 |
|
67 // End of File |