calendarui/views/dayview/inc/calendayinfo.h
author hgs
Wed, 25 Aug 2010 14:02:13 +0530
changeset 63 a3cb48f6c889
parent 45 b6db4fd4947b
permissions -rw-r--r--
201033
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  Storage class for day and week views.
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
hgs
parents:
diff changeset
    18
#ifndef  CALENDAYINFO_H
hgs
parents:
diff changeset
    19
#define  CALENDAYINFO_H
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
//  INCLUDES
hgs
parents:
diff changeset
    22
#include <e32std.h>
hgs
parents:
diff changeset
    23
#include <QList>
hgs
parents:
diff changeset
    24
#include <QDateTime>
hgs
parents:
diff changeset
    25
#include <QAbstractItemModel>
hgs
parents:
diff changeset
    26
hgs
parents:
diff changeset
    27
#include <calinstance.h>
hgs
parents:
diff changeset
    28
#include "caleninstanceid.h"
hgs
parents:
diff changeset
    29
hgs
parents:
diff changeset
    30
hgs
parents:
diff changeset
    31
//
hgs
parents:
diff changeset
    32
/** Scrolling directions **/
hgs
parents:
diff changeset
    33
enum TScrollDirection
hgs
parents:
diff changeset
    34
    {
hgs
parents:
diff changeset
    35
    EScrollUp,
hgs
parents:
diff changeset
    36
    EScrollDown,
hgs
parents:
diff changeset
    37
    EScrollLeft,
hgs
parents:
diff changeset
    38
    EScrollRight
hgs
parents:
diff changeset
    39
    };
hgs
parents:
diff changeset
    40
hgs
parents:
diff changeset
    41
//Constants
hgs
parents:
diff changeset
    42
const int KFSCalMaxDescriptionLength = 100;
hgs
parents:
diff changeset
    43
const int KFSCalStartingHour = 8;
hgs
parents:
diff changeset
    44
const int KFSCalSlotsInHour = 2;
hgs
parents:
diff changeset
    45
hgs
parents:
diff changeset
    46
/**
hgs
parents:
diff changeset
    47
 * An interval containing a start and end slot.
hgs
parents:
diff changeset
    48
 * The start slot belongs to the interval, the end slot
hgs
parents:
diff changeset
    49
 * is the first slot outside of the interval. If the end slot
hgs
parents:
diff changeset
    50
 * is before or at the same slot as the start slot, the interval
hgs
parents:
diff changeset
    51
 * is considered empty.
hgs
parents:
diff changeset
    52
 */
hgs
parents:
diff changeset
    53
class CalenSlotInterval
hgs
parents:
diff changeset
    54
    {
hgs
parents:
diff changeset
    55
public:
hgs
parents:
diff changeset
    56
    /**
hgs
parents:
diff changeset
    57
     * Check if this interval overlaps the second interval.
hgs
parents:
diff changeset
    58
     */
hgs
parents:
diff changeset
    59
    bool Overlaps( const CalenSlotInterval& aInterval ) const;
hgs
parents:
diff changeset
    60
hgs
parents:
diff changeset
    61
    /**
hgs
parents:
diff changeset
    62
     * Add aOffset to all slot coordinates later than aPos
hgs
parents:
diff changeset
    63
     */
hgs
parents:
diff changeset
    64
    void AddOffset( int aOffset, int aPos );
hgs
parents:
diff changeset
    65
hgs
parents:
diff changeset
    66
    /**
hgs
parents:
diff changeset
    67
     * Set this interval to be the minimum interval
hgs
parents:
diff changeset
    68
     * containing both this original interval and aInterval.
hgs
parents:
diff changeset
    69
     */
hgs
parents:
diff changeset
    70
    void Union( const CalenSlotInterval& aInterval );
hgs
parents:
diff changeset
    71
hgs
parents:
diff changeset
    72
    /**
hgs
parents:
diff changeset
    73
     * Check if aInterval lies directly next to this interval.
hgs
parents:
diff changeset
    74
     */
hgs
parents:
diff changeset
    75
    bool Adjacent( const CalenSlotInterval& aInterval ) const;
hgs
parents:
diff changeset
    76
hgs
parents:
diff changeset
    77
    /**
hgs
parents:
diff changeset
    78
     * Check if this interval is empty.
hgs
parents:
diff changeset
    79
     */
hgs
parents:
diff changeset
    80
    bool IsEmpty() const;
hgs
parents:
diff changeset
    81
hgs
parents:
diff changeset
    82
    /**
hgs
parents:
diff changeset
    83
     * Set this interval to be the area contained in both
hgs
parents:
diff changeset
    84
     * this interval and to aInterval.
hgs
parents:
diff changeset
    85
     */
hgs
parents:
diff changeset
    86
    void Intersect( const CalenSlotInterval& aInterval );
hgs
parents:
diff changeset
    87
hgs
parents:
diff changeset
    88
    /**
hgs
parents:
diff changeset
    89
     * Remove aInterval from this interval. If aInterval lies
hgs
parents:
diff changeset
    90
     * within this interval, the result is two separate intervals.
hgs
parents:
diff changeset
    91
     * This object contains one of them, aSecondPart contains the other one.
hgs
parents:
diff changeset
    92
     * If the result is just one single interval, this interval contains that
hgs
parents:
diff changeset
    93
     * and aSecondPart is set to an empty interval.
hgs
parents:
diff changeset
    94
     */
hgs
parents:
diff changeset
    95
    void Subtract( const CalenSlotInterval& aInterval, CalenSlotInterval& aSecondPart );
hgs
parents:
diff changeset
    96
hgs
parents:
diff changeset
    97
    /**
hgs
parents:
diff changeset
    98
     * Check if this interval starts later than aInterval.
hgs
parents:
diff changeset
    99
     */
hgs
parents:
diff changeset
   100
    bool operator>( const CalenSlotInterval& aInterval ) const;
hgs
parents:
diff changeset
   101
hgs
parents:
diff changeset
   102
    /**
hgs
parents:
diff changeset
   103
     * The starting slot of the interval. This is the first slot
hgs
parents:
diff changeset
   104
     * that belongs to the interval.
hgs
parents:
diff changeset
   105
     */
hgs
parents:
diff changeset
   106
    int iStartSlot;
hgs
parents:
diff changeset
   107
    
hgs
parents:
diff changeset
   108
    /**
hgs
parents:
diff changeset
   109
     * The ending slot of the interval. This is the first slot
hgs
parents:
diff changeset
   110
     * that doesn't belong to the interval.
hgs
parents:
diff changeset
   111
     */
hgs
parents:
diff changeset
   112
    int iEndSlot;
hgs
parents:
diff changeset
   113
    };
hgs
parents:
diff changeset
   114
hgs
parents:
diff changeset
   115
hgs
parents:
diff changeset
   116
/**
hgs
parents:
diff changeset
   117
 * Class for storing a calendar instance and the range it occupies.
hgs
parents:
diff changeset
   118
 */
hgs
parents:
diff changeset
   119
struct CalenTimedEventInfo : public CalenSlotInterval
hgs
parents:
diff changeset
   120
    {
hgs
parents:
diff changeset
   121
public:
hgs
parents:
diff changeset
   122
    /**
hgs
parents:
diff changeset
   123
     * The id of the calendar instance
hgs
parents:
diff changeset
   124
     */
hgs
parents:
diff changeset
   125
    TCalenInstanceId iId;
hgs
parents:
diff changeset
   126
    
hgs
parents:
diff changeset
   127
    /**
hgs
parents:
diff changeset
   128
     * Status of the entry, needed for setting the displayed color later
hgs
parents:
diff changeset
   129
     */
hgs
parents:
diff changeset
   130
    AgendaEntry::Status iStatus;
hgs
parents:
diff changeset
   131
    
hgs
parents:
diff changeset
   132
    /**
hgs
parents:
diff changeset
   133
     * Replication status of the entry, needed for setting the displayed color
hgs
parents:
diff changeset
   134
     * later.
hgs
parents:
diff changeset
   135
     */
hgs
parents:
diff changeset
   136
//    AgendaEntry::TReplicationStatus iReplicationStatus;
hgs
parents:
diff changeset
   137
    };
hgs
parents:
diff changeset
   138
hgs
parents:
diff changeset
   139
/**
hgs
parents:
diff changeset
   140
 * Class for storing general time intervals and their associated
hgs
parents:
diff changeset
   141
 * status (needed for displaying the interval).
hgs
parents:
diff changeset
   142
 */
hgs
parents:
diff changeset
   143
struct CalenEventInterval : public CalenSlotInterval
hgs
parents:
diff changeset
   144
    {
hgs
parents:
diff changeset
   145
public:
hgs
parents:
diff changeset
   146
    /**
hgs
parents:
diff changeset
   147
     * The status of this interval, if it represents only one calendar
hgs
parents:
diff changeset
   148
     * instance.
hgs
parents:
diff changeset
   149
     */
hgs
parents:
diff changeset
   150
    AgendaEntry::Status iStatus;
hgs
parents:
diff changeset
   151
    
hgs
parents:
diff changeset
   152
    /**
hgs
parents:
diff changeset
   153
     * The replication status of this interval, if it represents only one
hgs
parents:
diff changeset
   154
     * calendar instance.
hgs
parents:
diff changeset
   155
     */
hgs
parents:
diff changeset
   156
//    AgendaEntry::TReplicationStatus iReplicationStatus;
hgs
parents:
diff changeset
   157
    
hgs
parents:
diff changeset
   158
    /**
hgs
parents:
diff changeset
   159
     * A flag saying that this interval represents a conflict between two or
hgs
parents:
diff changeset
   160
     * more calendar instances.
hgs
parents:
diff changeset
   161
     */
hgs
parents:
diff changeset
   162
    bool iOverlap;
hgs
parents:
diff changeset
   163
    };
hgs
parents:
diff changeset
   164
hgs
parents:
diff changeset
   165
hgs
parents:
diff changeset
   166
hgs
parents:
diff changeset
   167
/**
hgs
parents:
diff changeset
   168
 * A class containing a sequence of non-overlapping events,
hgs
parents:
diff changeset
   169
 * visualised as a column.
hgs
parents:
diff changeset
   170
 */
hgs
parents:
diff changeset
   171
class CalenTimeColumn : public CalenSlotInterval
hgs
parents:
diff changeset
   172
    {
hgs
parents:
diff changeset
   173
public:
hgs
parents:
diff changeset
   174
hgs
parents:
diff changeset
   175
    /**
hgs
parents:
diff changeset
   176
     * Explicitly frees the memory used by the event array.
hgs
parents:
diff changeset
   177
     */
hgs
parents:
diff changeset
   178
    void Close();
hgs
parents:
diff changeset
   179
hgs
parents:
diff changeset
   180
    /**
hgs
parents:
diff changeset
   181
     * Add a new event to this column. Events must be added sequentially,
hgs
parents:
diff changeset
   182
     * and must not overlap earlier events in this column.
hgs
parents:
diff changeset
   183
     */
hgs
parents:
diff changeset
   184
    void AddEvent( const CalenTimedEventInfo& aEvent );
hgs
parents:
diff changeset
   185
hgs
parents:
diff changeset
   186
    /**
hgs
parents:
diff changeset
   187
     * Check if a new event can be added to this column.
hgs
parents:
diff changeset
   188
     */
hgs
parents:
diff changeset
   189
    bool CanFitEvent( const CalenTimedEventInfo& aEvent );
hgs
parents:
diff changeset
   190
hgs
parents:
diff changeset
   191
    /**
hgs
parents:
diff changeset
   192
     * Check if this column contains an event with the id aId.
hgs
parents:
diff changeset
   193
     */
hgs
parents:
diff changeset
   194
    bool ContainsEvent( const TCalenInstanceId& aId );
hgs
parents:
diff changeset
   195
hgs
parents:
diff changeset
   196
    /**
hgs
parents:
diff changeset
   197
     * Add aOffset to all slot coordinates later than aPos
hgs
parents:
diff changeset
   198
     */
hgs
parents:
diff changeset
   199
    void AddOffset( int aOffset, int aPos );
hgs
parents:
diff changeset
   200
hgs
parents:
diff changeset
   201
    /**
hgs
parents:
diff changeset
   202
     * Event array.
hgs
parents:
diff changeset
   203
     */
hgs
parents:
diff changeset
   204
    QList<CalenTimedEventInfo> iEventArray;
hgs
parents:
diff changeset
   205
    };
hgs
parents:
diff changeset
   206
hgs
parents:
diff changeset
   207
hgs
parents:
diff changeset
   208
/**
hgs
parents:
diff changeset
   209
 * A class containing one or more columns with events,
hgs
parents:
diff changeset
   210
 * where every event overlaps at least one event in some other
hgs
parents:
diff changeset
   211
 * column. (Otherwise that event should be added to a separate region.)
hgs
parents:
diff changeset
   212
 */
hgs
parents:
diff changeset
   213
class CalenTimeRegion : public CalenSlotInterval
hgs
parents:
diff changeset
   214
    {
hgs
parents:
diff changeset
   215
public:
hgs
parents:
diff changeset
   216
    
hgs
parents:
diff changeset
   217
    /**
hgs
parents:
diff changeset
   218
     * Explicitly frees the memory used by data structures.
hgs
parents:
diff changeset
   219
     */
hgs
parents:
diff changeset
   220
    void Close();
hgs
parents:
diff changeset
   221
hgs
parents:
diff changeset
   222
    /**
hgs
parents:
diff changeset
   223
     * Check if the given interval overlaps with this region.
hgs
parents:
diff changeset
   224
     */
hgs
parents:
diff changeset
   225
    bool Overlaps( const CalenSlotInterval& aInterval ) const;
hgs
parents:
diff changeset
   226
hgs
parents:
diff changeset
   227
    /**
hgs
parents:
diff changeset
   228
     * Add an event to this region. Events must be added sequentially,
hgs
parents:
diff changeset
   229
     * and must overlap this region (unless it's the first event of the region).
hgs
parents:
diff changeset
   230
     */
hgs
parents:
diff changeset
   231
    void AddEvent( const CalenTimedEventInfo& aEvent );
hgs
parents:
diff changeset
   232
hgs
parents:
diff changeset
   233
    /**
hgs
parents:
diff changeset
   234
     * Add aOffset to all slot coordinates later than aPos
hgs
parents:
diff changeset
   235
     */
hgs
parents:
diff changeset
   236
    void AddOffset( int aOffset, int aPos );
hgs
parents:
diff changeset
   237
hgs
parents:
diff changeset
   238
private:
hgs
parents:
diff changeset
   239
    
hgs
parents:
diff changeset
   240
    /**
hgs
parents:
diff changeset
   241
     * Add the event to the bookkeeping of overlapping/nonoverlapping
hgs
parents:
diff changeset
   242
     * intervals.
hgs
parents:
diff changeset
   243
     */
hgs
parents:
diff changeset
   244
    void AddInterval( const CalenTimedEventInfo& aEvent );
hgs
parents:
diff changeset
   245
    
hgs
parents:
diff changeset
   246
public:
hgs
parents:
diff changeset
   247
hgs
parents:
diff changeset
   248
    QList<CalenTimeColumn> iColumns;
hgs
parents:
diff changeset
   249
    QList<CalenEventInterval> iIntervals;
hgs
parents:
diff changeset
   250
    };
hgs
parents:
diff changeset
   251
hgs
parents:
diff changeset
   252
hgs
parents:
diff changeset
   253
/**
hgs
parents:
diff changeset
   254
 * A container struct, used by the clients of the slot info storage,
hgs
parents:
diff changeset
   255
 * to provide data in.
hgs
parents:
diff changeset
   256
 */
hgs
parents:
diff changeset
   257
struct SCalenApptInfo
hgs
parents:
diff changeset
   258
    {
hgs
parents:
diff changeset
   259
    QModelIndex iIndex;
hgs
parents:
diff changeset
   260
    QDateTime iStartTime;
hgs
parents:
diff changeset
   261
    QDateTime iEndTime;
hgs
parents:
diff changeset
   262
    bool iAllDay;
hgs
parents:
diff changeset
   263
    TCalenInstanceId iId;
hgs
parents:
diff changeset
   264
    AgendaEntry::Status iStatus;
hgs
parents:
diff changeset
   265
//    AgendaEntry::TReplicationStatus iReplicationStatus;
hgs
parents:
diff changeset
   266
    TBufC<KFSCalMaxDescriptionLength> iSummary;
hgs
parents:
diff changeset
   267
    TUint32 iColor;
hgs
parents:
diff changeset
   268
    };
hgs
parents:
diff changeset
   269
hgs
parents:
diff changeset
   270
hgs
parents:
diff changeset
   271
/**
hgs
parents:
diff changeset
   272
 * Storage class for storing all calendar instances within one day. This
hgs
parents:
diff changeset
   273
 * class organises the data according to the way it will be needed in the
hgs
parents:
diff changeset
   274
 * day and week view.
hgs
parents:
diff changeset
   275
 */
hgs
parents:
diff changeset
   276
class CalenDayInfo
hgs
parents:
diff changeset
   277
    {
hgs
parents:
diff changeset
   278
public:
hgs
parents:
diff changeset
   279
hgs
parents:
diff changeset
   280
    enum TSlotsInHour
hgs
parents:
diff changeset
   281
        {
hgs
parents:
diff changeset
   282
        EOne = 1,
hgs
parents:
diff changeset
   283
        ETwo,
hgs
parents:
diff changeset
   284
        EThree,
hgs
parents:
diff changeset
   285
        EFour
hgs
parents:
diff changeset
   286
        };
hgs
parents:
diff changeset
   287
hgs
parents:
diff changeset
   288
public:  // Constructors and destructor
hgs
parents:
diff changeset
   289
hgs
parents:
diff changeset
   290
    /**
hgs
parents:
diff changeset
   291
     * C++ default constructor.
hgs
parents:
diff changeset
   292
     */
hgs
parents:
diff changeset
   293
    CalenDayInfo( TSlotsInHour aSlotsInHour );
hgs
parents:
diff changeset
   294
    
hgs
parents:
diff changeset
   295
    /**
hgs
parents:
diff changeset
   296
     * Destructor
hgs
parents:
diff changeset
   297
     */
hgs
parents:
diff changeset
   298
    virtual ~CalenDayInfo();
hgs
parents:
diff changeset
   299
hgs
parents:
diff changeset
   300
hgs
parents:
diff changeset
   301
public:     // New functions
hgs
parents:
diff changeset
   302
hgs
parents:
diff changeset
   303
    /**
hgs
parents:
diff changeset
   304
     * Reset the storage, remove all data and set the state back to normal.
hgs
parents:
diff changeset
   305
     */
hgs
parents:
diff changeset
   306
    void Reset();
hgs
parents:
diff changeset
   307
hgs
parents:
diff changeset
   308
    /**
hgs
parents:
diff changeset
   309
     * Add a timed event. All timed events must be added in increasing
hgs
parents:
diff changeset
   310
     * order (sorted by starting time).
hgs
parents:
diff changeset
   311
     */
hgs
parents:
diff changeset
   312
    void InsertTimedEvent( const SCalenApptInfo& aItemInfo );
hgs
parents:
diff changeset
   313
    
hgs
parents:
diff changeset
   314
    /**
hgs
parents:
diff changeset
   315
     * Add an untimed event.
hgs
parents:
diff changeset
   316
     */
hgs
parents:
diff changeset
   317
//    void InsertUntimedEventL( const CCalInstance& aInstance );
hgs
parents:
diff changeset
   318
    
hgs
parents:
diff changeset
   319
    /**
hgs
parents:
diff changeset
   320
     * Add an untimed event. (Nonleaving version, useful for testing.)
hgs
parents:
diff changeset
   321
     */
hgs
parents:
diff changeset
   322
    void InsertUntimedEvent( AgendaEntry::Type aType,
hgs
parents:
diff changeset
   323
                             const TCalenInstanceId& aId );
hgs
parents:
diff changeset
   324
    /**
hgs
parents:
diff changeset
   325
     * Add an allday event.
hgs
parents:
diff changeset
   326
     */
hgs
parents:
diff changeset
   327
    void InsertAlldayEvent( const SCalenApptInfo& aItemInfo );
hgs
parents:
diff changeset
   328
hgs
parents:
diff changeset
   329
    /**
hgs
parents:
diff changeset
   330
     * Is the given event allday event
hgs
parents:
diff changeset
   331
     * @param aStart time to be checked
hgs
parents:
diff changeset
   332
     * @param aEnd time to be checked
hgs
parents:
diff changeset
   333
     * @return true if this is allday event, false otherwise
hgs
parents:
diff changeset
   334
     */
hgs
parents:
diff changeset
   335
    static bool IsAlldayEvent( QDateTime aStart, QDateTime aEnd );
hgs
parents:
diff changeset
   336
hgs
parents:
diff changeset
   337
    /**
hgs
parents:
diff changeset
   338
     * Is the given event allday event
hgs
parents:
diff changeset
   339
     * @param aInstance Instance to be checked
hgs
parents:
diff changeset
   340
     * @return true if this is allday event, false otherwise
hgs
parents:
diff changeset
   341
     */
hgs
parents:
diff changeset
   342
//    static bool IsAlldayEvent( const CCalInstance& aInstance );
hgs
parents:
diff changeset
   343
hgs
parents:
diff changeset
   344
    /**
hgs
parents:
diff changeset
   345
     * Return the slot number where this class would insert the
hgs
parents:
diff changeset
   346
     * untimed events if nothing else is specified.
hgs
parents:
diff changeset
   347
     */
hgs
parents:
diff changeset
   348
    int SuggestedUntimedSlotPos();
hgs
parents:
diff changeset
   349
    
hgs
parents:
diff changeset
   350
    /**
hgs
parents:
diff changeset
   351
     * Return how many untimed slots is needed for this day.
hgs
parents:
diff changeset
   352
     */
hgs
parents:
diff changeset
   353
    int NeededUntimedSlotCount();
hgs
parents:
diff changeset
   354
hgs
parents:
diff changeset
   355
    /**
hgs
parents:
diff changeset
   356
     * Update the indexing to take the current amount of untimed slots
hgs
parents:
diff changeset
   357
     * into account. This must be called after all untimed events
hgs
parents:
diff changeset
   358
     * have been added.
hgs
parents:
diff changeset
   359
     *
hgs
parents:
diff changeset
   360
     * @param aSlot the slot where the untimed events are to be added.
hgs
parents:
diff changeset
   361
     *              If negative, uses the default, otherwise aSlot must
hgs
parents:
diff changeset
   362
     *              be less than or equal to the default position as
hgs
parents:
diff changeset
   363
     *              returned by SuggestedUntimedSlotPos().
hgs
parents:
diff changeset
   364
     * @param aUntimedCount the number of slots to insert for untimed events. If
hgs
parents:
diff changeset
   365
     *                      aSlot is specified, this must be larger or equal
hgs
parents:
diff changeset
   366
     *                      to NeededUntimedSlotCount().
hgs
parents:
diff changeset
   367
     */
hgs
parents:
diff changeset
   368
    int UpdateUntimedPos( int aSlot = -1, int aUntimedCount = 0 );
hgs
parents:
diff changeset
   369
hgs
parents:
diff changeset
   370
    /**
hgs
parents:
diff changeset
   371
     * Return the first slot containing a non-allday event.
hgs
parents:
diff changeset
   372
     * If this class doesn't contain any data, returns KErrNotFound.
hgs
parents:
diff changeset
   373
     */
hgs
parents:
diff changeset
   374
    int FirstOccupiedSlot();
hgs
parents:
diff changeset
   375
    
hgs
parents:
diff changeset
   376
    /**
hgs
parents:
diff changeset
   377
     * Return the last slot containing a non-allday event.
hgs
parents:
diff changeset
   378
     * If this class doesn't contain any data, returns KErrNotFound.
hgs
parents:
diff changeset
   379
     */
hgs
parents:
diff changeset
   380
    int LastOccupiedSlot();
hgs
parents:
diff changeset
   381
hgs
parents:
diff changeset
   382
    int EarliestEndSlot();
hgs
parents:
diff changeset
   383
    int LastStartSlot();
hgs
parents:
diff changeset
   384
hgs
parents:
diff changeset
   385
hgs
parents:
diff changeset
   386
    /**
hgs
parents:
diff changeset
   387
     * Convert a starting time into a slot index.
hgs
parents:
diff changeset
   388
     */
hgs
parents:
diff changeset
   389
    int SlotIndexForStartTime( QDateTime aStartTime );
hgs
parents:
diff changeset
   390
    
hgs
parents:
diff changeset
   391
    /**
hgs
parents:
diff changeset
   392
     * Convert an ending time into a slot index.
hgs
parents:
diff changeset
   393
     */
hgs
parents:
diff changeset
   394
    int SlotIndexForEndTime( QDateTime aStartTime );
hgs
parents:
diff changeset
   395
hgs
parents:
diff changeset
   396
    /**
hgs
parents:
diff changeset
   397
     * Get information about where the item aItemInfo
hgs
parents:
diff changeset
   398
     * should be displayed. The parameters are filled
hgs
parents:
diff changeset
   399
     * on return.
hgs
parents:
diff changeset
   400
     *
hgs
parents:
diff changeset
   401
     * @param aStartSlot    the first slot of the event
hgs
parents:
diff changeset
   402
     * @param aEndSlot      the first slot after the event
hgs
parents:
diff changeset
   403
     * @param aColumnIndex  the column in which this event is located
hgs
parents:
diff changeset
   404
     * @param aColumns      the total number of columns in the region
hgs
parents:
diff changeset
   405
     *                      this event belongs to
hgs
parents:
diff changeset
   406
     */
hgs
parents:
diff changeset
   407
    void GetLocation( const SCalenApptInfo& aItemInfo,
hgs
parents:
diff changeset
   408
                      int& aStartSlot,
hgs
parents:
diff changeset
   409
                      int& aEndSlot,
hgs
parents:
diff changeset
   410
                      int& aColumnIndex,
hgs
parents:
diff changeset
   411
                      int& aColumns );
hgs
parents:
diff changeset
   412
hgs
parents:
diff changeset
   413
    /**
hgs
parents:
diff changeset
   414
     * Get the number of allday events
hgs
parents:
diff changeset
   415
     */
hgs
parents:
diff changeset
   416
    int AlldayCount();
hgs
parents:
diff changeset
   417
    
hgs
parents:
diff changeset
   418
    /**
hgs
parents:
diff changeset
   419
     * Get the number of todo events
hgs
parents:
diff changeset
   420
     */
hgs
parents:
diff changeset
   421
    int TodoCount();
hgs
parents:
diff changeset
   422
hgs
parents:
diff changeset
   423
    /**
hgs
parents:
diff changeset
   424
     * Check if a slot is the first slot of an hour.
hgs
parents:
diff changeset
   425
     */
hgs
parents:
diff changeset
   426
    bool IsHourStartSlot( const int& aSlotIndex ) const;
hgs
parents:
diff changeset
   427
    
hgs
parents:
diff changeset
   428
    /**
hgs
parents:
diff changeset
   429
     * Check if a slot is an extra slot (for untimed events).
hgs
parents:
diff changeset
   430
     */
hgs
parents:
diff changeset
   431
    bool IsExtraSlot( const int& aSlotIndex ) const;
hgs
parents:
diff changeset
   432
    
hgs
parents:
diff changeset
   433
    /**
hgs
parents:
diff changeset
   434
     * Convert a slot index into a hour
hgs
parents:
diff changeset
   435
     */
hgs
parents:
diff changeset
   436
    int HourFromSlotIndex( const int& aSlotIndex ) const;
hgs
parents:
diff changeset
   437
    
hgs
parents:
diff changeset
   438
    /**
hgs
parents:
diff changeset
   439
     * Convert a hour into a slot index.
hgs
parents:
diff changeset
   440
     */
hgs
parents:
diff changeset
   441
    int SlotIndexFromHour( int aHour );
hgs
parents:
diff changeset
   442
hgs
parents:
diff changeset
   443
    /**
hgs
parents:
diff changeset
   444
     * Rounds the slot number up (towards earlier hours) to an even hour
hgs
parents:
diff changeset
   445
     */
hgs
parents:
diff changeset
   446
    int RoundHourUp( int aSlot );
hgs
parents:
diff changeset
   447
hgs
parents:
diff changeset
   448
    /**
hgs
parents:
diff changeset
   449
     * Rounds the slot number down (towards later hours) to an even hour
hgs
parents:
diff changeset
   450
     */
hgs
parents:
diff changeset
   451
    int RoundHourDown( int aSlot );
hgs
parents:
diff changeset
   452
hgs
parents:
diff changeset
   453
    /**
hgs
parents:
diff changeset
   454
     * Get the starting slot of the current selection
hgs
parents:
diff changeset
   455
     */
hgs
parents:
diff changeset
   456
    void GetSelectedSlot( int& aSlot, int& aRegion, int& aColumnIndex, int& aColumns );
hgs
parents:
diff changeset
   457
    
hgs
parents:
diff changeset
   458
    /**
hgs
parents:
diff changeset
   459
     * Try to move the selection in the given direction
hgs
parents:
diff changeset
   460
     *
hgs
parents:
diff changeset
   461
     * @return true if able to move the selection, false if
hgs
parents:
diff changeset
   462
     *         unable to move (indicating that the selection should move
hgs
parents:
diff changeset
   463
     *         to the next/previous day).
hgs
parents:
diff changeset
   464
     */
hgs
parents:
diff changeset
   465
    bool MoveSelection( TScrollDirection aDirection );
hgs
parents:
diff changeset
   466
hgs
parents:
diff changeset
   467
    /**
hgs
parents:
diff changeset
   468
     * Move the selected slot within the currently selected event.
hgs
parents:
diff changeset
   469
     */
hgs
parents:
diff changeset
   470
    void MoveSelectionInEvent( TScrollDirection aDirection );
hgs
parents:
diff changeset
   471
hgs
parents:
diff changeset
   472
    /**
hgs
parents:
diff changeset
   473
     * Make sure the selected slot within the currently selected event is valid.
hgs
parents:
diff changeset
   474
     */
hgs
parents:
diff changeset
   475
    void UpdateSelectionInEvent();
hgs
parents:
diff changeset
   476
hgs
parents:
diff changeset
   477
    /**
hgs
parents:
diff changeset
   478
     * Check if any event currently is selected.
hgs
parents:
diff changeset
   479
     */
hgs
parents:
diff changeset
   480
    bool IsEventSelected() const;
hgs
parents:
diff changeset
   481
    
hgs
parents:
diff changeset
   482
    /**
hgs
parents:
diff changeset
   483
     * Check if the current selection actually denotes
hgs
parents:
diff changeset
   484
     * more than one event (the todo event slot is selected,
hgs
parents:
diff changeset
   485
     * containing more than one todo).
hgs
parents:
diff changeset
   486
     */
hgs
parents:
diff changeset
   487
    bool IsMultipleEventsSelected() const;
hgs
parents:
diff changeset
   488
    
hgs
parents:
diff changeset
   489
    /**
hgs
parents:
diff changeset
   490
     * Check if an allday event currently is selected.
hgs
parents:
diff changeset
   491
     */
hgs
parents:
diff changeset
   492
    bool IsAlldayEventSelected() const;
hgs
parents:
diff changeset
   493
hgs
parents:
diff changeset
   494
    /**
hgs
parents:
diff changeset
   495
     * Get the instance id of the currently selected event.
hgs
parents:
diff changeset
   496
     */
hgs
parents:
diff changeset
   497
    TCalenInstanceId SelectedEvent();
hgs
parents:
diff changeset
   498
hgs
parents:
diff changeset
   499
    /**
hgs
parents:
diff changeset
   500
     * Update the state to make the given calendar instance selected
hgs
parents:
diff changeset
   501
     *
hgs
parents:
diff changeset
   502
     * @return KErrNotFound if the instance isn't found, KErrNone otherwise.
hgs
parents:
diff changeset
   503
     */
hgs
parents:
diff changeset
   504
    int SelectEvent( const TCalenInstanceId& aId );
hgs
parents:
diff changeset
   505
hgs
parents:
diff changeset
   506
    /**
hgs
parents:
diff changeset
   507
     * Get the instance id of an untimed event. Maximally one
hgs
parents:
diff changeset
   508
     * todo event is counted into this, i.e. aIndex = 1 never returns
hgs
parents:
diff changeset
   509
     * a todo event even though there are more than one.
hgs
parents:
diff changeset
   510
     */
hgs
parents:
diff changeset
   511
    TCalenInstanceId UntimedEvent( int aIndex );
hgs
parents:
diff changeset
   512
hgs
parents:
diff changeset
   513
    /**
hgs
parents:
diff changeset
   514
     * Get info about an allday event.
hgs
parents:
diff changeset
   515
     */
hgs
parents:
diff changeset
   516
    const CalenTimedEventInfo& AlldayEvent( int aIndex );
hgs
parents:
diff changeset
   517
hgs
parents:
diff changeset
   518
    /**
hgs
parents:
diff changeset
   519
     * Move the selection to the given slot, possibly selecting
hgs
parents:
diff changeset
   520
     * an event.
hgs
parents:
diff changeset
   521
     */
hgs
parents:
diff changeset
   522
    void SelectSlot( int aSlot );
hgs
parents:
diff changeset
   523
hgs
parents:
diff changeset
   524
    /**
hgs
parents:
diff changeset
   525
     * Return the list of regions.
hgs
parents:
diff changeset
   526
     */
hgs
parents:
diff changeset
   527
    const QList<CalenTimeRegion>& RegionList() const;
hgs
parents:
diff changeset
   528
hgs
parents:
diff changeset
   529
    /**
hgs
parents:
diff changeset
   530
     * Get the list of event intervals (for use in week view and ribbon).
hgs
parents:
diff changeset
   531
     */
hgs
parents:
diff changeset
   532
    void GetEventIntervals( QList<CalenEventInterval>& aArray ) const;
hgs
parents:
diff changeset
   533
hgs
parents:
diff changeset
   534
    /**
hgs
parents:
diff changeset
   535
     * Return the interval which is selected currently.
hgs
parents:
diff changeset
   536
     */
hgs
parents:
diff changeset
   537
    CalenSlotInterval SelectedInterval();
hgs
parents:
diff changeset
   538
    
hgs
parents:
diff changeset
   539
    /**
hgs
parents:
diff changeset
   540
     * Sets selection within a region
hgs
parents:
diff changeset
   541
     * 
hgs
parents:
diff changeset
   542
     * @param aRegion Region index.
hgs
parents:
diff changeset
   543
     * @param aColumn Column index.
hgs
parents:
diff changeset
   544
     * @param aSlot   Slot number (has to be aligned to full hour).
hgs
parents:
diff changeset
   545
     */
hgs
parents:
diff changeset
   546
    bool SetSelectionInRegion( int aRegion, int aColumn, int aSlot );
hgs
parents:
diff changeset
   547
hgs
parents:
diff changeset
   548
private:
hgs
parents:
diff changeset
   549
hgs
parents:
diff changeset
   550
    enum TMoveDirection
hgs
parents:
diff changeset
   551
        {
hgs
parents:
diff changeset
   552
        EMoveDirectionUp = -1,
hgs
parents:
diff changeset
   553
        EMoveDirectionDown = 1
hgs
parents:
diff changeset
   554
        };
hgs
parents:
diff changeset
   555
hgs
parents:
diff changeset
   556
    /**
hgs
parents:
diff changeset
   557
     * See if any region overlaps the given interval. Regions are searched
hgs
parents:
diff changeset
   558
     * in the direction specified by aDirection, e.g. if aDirection < 0,
hgs
parents:
diff changeset
   559
     * this returns the last overlapping region, if aDirection > 0, returns
hgs
parents:
diff changeset
   560
     * the first overlapping instead.
hgs
parents:
diff changeset
   561
     *
hgs
parents:
diff changeset
   562
     * @return the index of the found overlapping region, or -1 if no
hgs
parents:
diff changeset
   563
     *         matching region was found.
hgs
parents:
diff changeset
   564
     */
hgs
parents:
diff changeset
   565
    int FindRegion( const CalenSlotInterval& aInterval, int aDirection );
hgs
parents:
diff changeset
   566
hgs
parents:
diff changeset
   567
    /**
hgs
parents:
diff changeset
   568
     * See if any event overlaps the given interval within the current column.
hgs
parents:
diff changeset
   569
     * Events are searched in the direction specified by aDirection,
hgs
parents:
diff changeset
   570
     * e.g. if aDirection < 0, this returns the last overlapping event,
hgs
parents:
diff changeset
   571
     * if aDirection > 0, returns the first overlapping instead.
hgs
parents:
diff changeset
   572
     *
hgs
parents:
diff changeset
   573
     * @return the index within the column of the overlapping event, or -1 if no
hgs
parents:
diff changeset
   574
     *         matching event was found.
hgs
parents:
diff changeset
   575
     */
hgs
parents:
diff changeset
   576
    int FindEvent( const CalenSlotInterval& aInterval, int aDirection );
hgs
parents:
diff changeset
   577
hgs
parents:
diff changeset
   578
    /**
hgs
parents:
diff changeset
   579
     * Update the selection state by selecting the first event which ends at
hgs
parents:
diff changeset
   580
     * the end of the current region.
hgs
parents:
diff changeset
   581
     */
hgs
parents:
diff changeset
   582
    void EnterRegionFromBelow();
hgs
parents:
diff changeset
   583
    
hgs
parents:
diff changeset
   584
    /**
hgs
parents:
diff changeset
   585
     * Update the selection state by selecting the first event which starts
hgs
parents:
diff changeset
   586
     * at the start of the current region.
hgs
parents:
diff changeset
   587
     */
hgs
parents:
diff changeset
   588
    void EnterRegionFromAbove();
hgs
parents:
diff changeset
   589
hgs
parents:
diff changeset
   590
    /**
hgs
parents:
diff changeset
   591
     * Try to move the selection in the given direction, when an
hgs
parents:
diff changeset
   592
     * empty area is selected.
hgs
parents:
diff changeset
   593
     *
hgs
parents:
diff changeset
   594
     * @return true if able to move the selection, false if
hgs
parents:
diff changeset
   595
     *         unable to move (indicating that the selection should move
hgs
parents:
diff changeset
   596
     *         to the next/previous day).
hgs
parents:
diff changeset
   597
     */
hgs
parents:
diff changeset
   598
    bool MoveInEmptyArea( TScrollDirection aDirection );
hgs
parents:
diff changeset
   599
    
hgs
parents:
diff changeset
   600
    /**
hgs
parents:
diff changeset
   601
     * Try to move the selection in the given direction, when the
hgs
parents:
diff changeset
   602
     * selection is in a region.
hgs
parents:
diff changeset
   603
     *
hgs
parents:
diff changeset
   604
     * @return true if able to move the selection, false if
hgs
parents:
diff changeset
   605
     *         unable to move (indicating that the selection should move
hgs
parents:
diff changeset
   606
     *         to the next/previous day).
hgs
parents:
diff changeset
   607
     */
hgs
parents:
diff changeset
   608
    bool MoveInRegion( TScrollDirection aDirection );
hgs
parents:
diff changeset
   609
    
hgs
parents:
diff changeset
   610
    /**
hgs
parents:
diff changeset
   611
     * Try to move the selection in the given direction, when an
hgs
parents:
diff changeset
   612
     * allday event is selected
hgs
parents:
diff changeset
   613
     *
hgs
parents:
diff changeset
   614
     * @return true if able to move the selection, false if
hgs
parents:
diff changeset
   615
     *         unable to move (indicating that the selection should move
hgs
parents:
diff changeset
   616
     *         to the next/previous day).
hgs
parents:
diff changeset
   617
     */
hgs
parents:
diff changeset
   618
    bool MoveInAlldayEvent( TScrollDirection aDirection );
hgs
parents:
diff changeset
   619
hgs
parents:
diff changeset
   620
    /**
hgs
parents:
diff changeset
   621
     * Update the selection state by moving from one ordinary event column
hgs
parents:
diff changeset
   622
     * to another, in the given direction
hgs
parents:
diff changeset
   623
     */
hgs
parents:
diff changeset
   624
    void MoveBetweenColumns( TScrollDirection aDirection );
hgs
parents:
diff changeset
   625
hgs
parents:
diff changeset
   626
    /**
hgs
parents:
diff changeset
   627
     * Update the selection state by moving in the given direction
hgs
parents:
diff changeset
   628
     */
hgs
parents:
diff changeset
   629
    void MoveInColumn( int aDirection );
hgs
parents:
diff changeset
   630
    
hgs
parents:
diff changeset
   631
    /**
hgs
parents:
diff changeset
   632
     * The selection should be moved out of the current region (in the given
hgs
parents:
diff changeset
   633
     * direction), update the selection state according to what there is
hgs
parents:
diff changeset
   634
     * outside of the region.
hgs
parents:
diff changeset
   635
     */
hgs
parents:
diff changeset
   636
    void MoveOutFromRegion( int aDirection );
hgs
parents:
diff changeset
   637
hgs
parents:
diff changeset
   638
    /**
hgs
parents:
diff changeset
   639
     * Set the selected slot within the current event according to the selection
hgs
parents:
diff changeset
   640
     * direction.
hgs
parents:
diff changeset
   641
     */
hgs
parents:
diff changeset
   642
    void SetSelectionInEvent( int aDirection );
hgs
parents:
diff changeset
   643
hgs
parents:
diff changeset
   644
    /**
hgs
parents:
diff changeset
   645
     * Determines how large area to scan for new events/regions when moving in the
hgs
parents:
diff changeset
   646
     * given direction.
hgs
parents:
diff changeset
   647
     *
hgs
parents:
diff changeset
   648
     * I.e., if moving upwards, returns the whole interval from the start of aInterval
hgs
parents:
diff changeset
   649
     * up to the next slot which can be focused as an empty slot. If aInterval doesn't
hgs
parents:
diff changeset
   650
     * start on an even hour, the returned interval is from the start of the first whole
hgs
parents:
diff changeset
   651
     * hour before the interval, to the start of aInterval.
hgs
parents:
diff changeset
   652
     *
hgs
parents:
diff changeset
   653
     * If moving downwards, returns the whole interval from the end of aInterval to the
hgs
parents:
diff changeset
   654
     * end of the next whole hour after the interval.
hgs
parents:
diff changeset
   655
     *
hgs
parents:
diff changeset
   656
     */
hgs
parents:
diff changeset
   657
    CalenSlotInterval NextFocusArea( const CalenSlotInterval& aInterval, int aDirection );
hgs
parents:
diff changeset
   658
hgs
parents:
diff changeset
   659
    /**
hgs
parents:
diff changeset
   660
     * Return the next slot to focus if moving in the given direction from the interval
hgs
parents:
diff changeset
   661
     * and focusing an empty slot.
hgs
parents:
diff changeset
   662
     */
hgs
parents:
diff changeset
   663
    int NextEmptyFocusSlot( const CalenSlotInterval& aInterval, int aDirection );
hgs
parents:
diff changeset
   664
    
hgs
parents:
diff changeset
   665
    /**
hgs
parents:
diff changeset
   666
     * Return the interval which the current selection state represents, if
hgs
parents:
diff changeset
   667
     * an empty area is selected.
hgs
parents:
diff changeset
   668
     */
hgs
parents:
diff changeset
   669
    CalenSlotInterval EmptySelectionInterval();
hgs
parents:
diff changeset
   670
hgs
parents:
diff changeset
   671
    /**
hgs
parents:
diff changeset
   672
     * Backup the whole selection state.
hgs
parents:
diff changeset
   673
     */
hgs
parents:
diff changeset
   674
    void StoreOrigSelection();
hgs
parents:
diff changeset
   675
    
hgs
parents:
diff changeset
   676
    /**
hgs
parents:
diff changeset
   677
     * Check if the current selection state is valid, if not, reset it
hgs
parents:
diff changeset
   678
     * to the backed up copy
hgs
parents:
diff changeset
   679
     * @return true if selection state is valid, false if not.
hgs
parents:
diff changeset
   680
     */
hgs
parents:
diff changeset
   681
    bool ValidateSelection();
hgs
parents:
diff changeset
   682
hgs
parents:
diff changeset
   683
private:    // New data
hgs
parents:
diff changeset
   684
hgs
parents:
diff changeset
   685
    QList<CalenTimeRegion> iRegionList;
hgs
parents:
diff changeset
   686
    QList<TCalenInstanceId> iUntimedEvents;
hgs
parents:
diff changeset
   687
    QList<TCalenInstanceId> iTodoEvents;
hgs
parents:
diff changeset
   688
    QList<CalenTimedEventInfo> iAlldayEvents;
hgs
parents:
diff changeset
   689
hgs
parents:
diff changeset
   690
    int iLastStartSlot;
hgs
parents:
diff changeset
   691
    int iEarliestEndSlot;
hgs
parents:
diff changeset
   692
    /**
hgs
parents:
diff changeset
   693
     * The total number of untimed slots.
hgs
parents:
diff changeset
   694
     */
hgs
parents:
diff changeset
   695
    int iUntimedSlotCount;
hgs
parents:
diff changeset
   696
    /**
hgs
parents:
diff changeset
   697
     * The slot index of the first untimed slot.
hgs
parents:
diff changeset
   698
     */
hgs
parents:
diff changeset
   699
    int iFirstUntimedSlot;
hgs
parents:
diff changeset
   700
    /**
hgs
parents:
diff changeset
   701
     * The number of empty untimed slots.
hgs
parents:
diff changeset
   702
     */
hgs
parents:
diff changeset
   703
    int iEmptyUntimedSlots;
hgs
parents:
diff changeset
   704
    /**
hgs
parents:
diff changeset
   705
     * The number of slots per hour.
hgs
parents:
diff changeset
   706
     */
hgs
parents:
diff changeset
   707
    TSlotsInHour iSlotsInHour;
hgs
parents:
diff changeset
   708
hgs
parents:
diff changeset
   709
    /**
hgs
parents:
diff changeset
   710
     * Chooses which allday event is selected. If none currently is selected,
hgs
parents:
diff changeset
   711
     * this is negative. This variable overrides the rest selection variables.
hgs
parents:
diff changeset
   712
     * If this points to an allday event, the other variables are ignored,
hgs
parents:
diff changeset
   713
     * except iSelectedSlot which is used for returning to the original place
hgs
parents:
diff changeset
   714
     * if moving back to the ordinary events.
hgs
parents:
diff changeset
   715
     */
hgs
parents:
diff changeset
   716
    int iSelectedAlldayEvent;
hgs
parents:
diff changeset
   717
hgs
parents:
diff changeset
   718
    /**
hgs
parents:
diff changeset
   719
     * Chooses which region currently is selected. If none currently is selected,
hgs
parents:
diff changeset
   720
     * this is negative. If this points to a region, iSelectedColumn and
hgs
parents:
diff changeset
   721
     * iSelectedColumnEventIndex are taken into account.
hgs
parents:
diff changeset
   722
     */
hgs
parents:
diff changeset
   723
    int iSelectedRegion;
hgs
parents:
diff changeset
   724
hgs
parents:
diff changeset
   725
    /**
hgs
parents:
diff changeset
   726
     * Chooses which column is selected within the currently selected region.
hgs
parents:
diff changeset
   727
     * If this is equal to the number of columns, the last, implicit, empty column
hgs
parents:
diff changeset
   728
     * is selected.
hgs
parents:
diff changeset
   729
     */
hgs
parents:
diff changeset
   730
    int iSelectedColumn;
hgs
parents:
diff changeset
   731
    /**
hgs
parents:
diff changeset
   732
     * Chooses which event is selected within the currently selected column. If
hgs
parents:
diff changeset
   733
     * none is selected, this is negative.
hgs
parents:
diff changeset
   734
     */
hgs
parents:
diff changeset
   735
    int iSelectedColumnEventIndex;
hgs
parents:
diff changeset
   736
    /**
hgs
parents:
diff changeset
   737
     * Chooses which slot in the day currently is in focus. This must always point
hgs
parents:
diff changeset
   738
     * to a valid slot. If an event is selected within a column, it points to an
hgs
parents:
diff changeset
   739
     * slot within that event. If no event is selected, it points to the start
hgs
parents:
diff changeset
   740
     * of the currently selected empty time region (which is iSlotsInHour slots long).
hgs
parents:
diff changeset
   741
     * If an allday event is selected, this points to the last selected slot in the
hgs
parents:
diff changeset
   742
     * ordinary day area.
hgs
parents:
diff changeset
   743
     */
hgs
parents:
diff changeset
   744
    int iSelectedSlot;
hgs
parents:
diff changeset
   745
hgs
parents:
diff changeset
   746
    // copies of the current selection state, to be used for reverting to the original
hgs
parents:
diff changeset
   747
    // state if the selection is moved to an invalid position
hgs
parents:
diff changeset
   748
    int iOrigSelectedAlldayEvent;
hgs
parents:
diff changeset
   749
    int iOrigSelectedRegion;
hgs
parents:
diff changeset
   750
    int iOrigSelectedColumn;
hgs
parents:
diff changeset
   751
    int iOrigSelectedSlot;
hgs
parents:
diff changeset
   752
    int iOrigSelectedColumnEventIndex;
hgs
parents:
diff changeset
   753
hgs
parents:
diff changeset
   754
    };
hgs
parents:
diff changeset
   755
hgs
parents:
diff changeset
   756
#endif // CALENDAYINFO_H
hgs
parents:
diff changeset
   757
hgs
parents:
diff changeset
   758
hgs
parents:
diff changeset
   759
// End of File