calendarui/views/dayview/tsrc/unittests/unittest_calendayitemview/calendayinfo.h
changeset 45 b6db4fd4947b
child 57 bb2d3e476f29
equal deleted inserted replaced
23:fd30d51f876b 45:b6db4fd4947b
       
     1 /*
       
     2  * Copyright (c) 2009 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:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef  CALENDAYINFO_H
       
    19 #define  CALENDAYINFO_H
       
    20 
       
    21 #include <QtGlobal>
       
    22 #include "caleninstanceid.h"
       
    23 #include <QtGui>
       
    24 
       
    25 //from hb_calencommands.hrh
       
    26 
       
    27 enum TCalenCommandId
       
    28     {
       
    29     ECalenMonthView,
       
    30     ECalenWeekView,
       
    31     ECalenAgendaView,
       
    32     ECalenDayView,
       
    33     ECalenTodoEditor,
       
    34     ECalenTodoEditorDone,
       
    35     ECalenForwardsToDayView,
       
    36     ECalenNextView,
       
    37     ECalenPrevView,
       
    38     ECalenSwitchView,
       
    39     ECalenShowToolbar,
       
    40     ECalenHideToolbar,
       
    41     ECalenUpdateToolbar,
       
    42     ECalenHidePreview,
       
    43     ECalenShowPreview,
       
    44     ECalenStartActiveStep,
       
    45     ECalenGotoToday,
       
    46     ECalenGotoDate,
       
    47     ECalenEventView,
       
    48     ECalenCmdPromptThenEdit,    
       
    49     ECalenFasterAppExit,
       
    50     ECalenShowNextDay,
       
    51     ECalenShowPrevDay,
       
    52     ECalenNewMeeting,
       
    53     ECalenNewAnniv,
       
    54     ECalenNewDayNote,
       
    55     ECalenNewReminder,
       
    56     ECalenNewMeetingRequest,
       
    57     ECalenNewEntry, 
       
    58     ECalenEditCurrentEntry,
       
    59     ECalenEditSeries,
       
    60     ECalenEditOccurrence,
       
    61     ECalenEditEntryFromViewer,
       
    62     ECalenViewCurrentEntry,
       
    63     ECalenNotifyFocusChange,
       
    64     ECalenCompleteTodo,
       
    65     ECalenRestoreTodo,
       
    66     ECalenSend,
       
    67     ECalenDeleteCurrentEntry,
       
    68     ECalenDeleteEntryWithoutQuery,
       
    69     ECalenDeleteSeries,
       
    70     ECalenDeleteCurrentOccurrence,
       
    71     ECalenDeleteAllEntries,
       
    72     ECalenDeleteEntriesBeforeDate,
       
    73     ECalenCancelDelete,
       
    74     ECalenDeleteEntryFromViewer,
       
    75     ECalenShowSettings,
       
    76     ECalenGetLocation,
       
    77     ECalenShowLocation,
       
    78     ECalenGetLocationAndSave,
       
    79     ECalenMissedAlarmsView,
       
    80     ECalenMissedEventView,
       
    81     ECalenCmdClear,
       
    82     ECalenCmdClearAll,                          
       
    83     ECalenCmdGotoCalendar,
       
    84     ECalenMissedAlarmsViewFromIdle,
       
    85     ECalenMissedEventViewFromIdle,
       
    86     ECalenLastCommand,
       
    87     ECalenRegionalPluginTapEvent
       
    88     };
       
    89 
       
    90 //////////////////end of hb_calencommands.hrh
       
    91 
       
    92 struct SCalenApptInfo
       
    93     {
       
    94     QModelIndex iIndex;
       
    95     QDateTime iStartTime;
       
    96     QDateTime iEndTime;
       
    97     bool iAllDay;
       
    98     TCalenInstanceId iId;
       
    99 //    AgendaEntry::Status iStatus;
       
   100 //    AgendaEntry::TReplicationStatus iReplicationStatus;
       
   101  //   TBufC<KFSCalMaxDescriptionLength> iSummary;
       
   102     TUint32 iColor;
       
   103     };
       
   104 
       
   105 class CalenDayInfo
       
   106 {
       
   107 public:
       
   108 
       
   109     enum TSlotsInHour
       
   110         {
       
   111         EOne = 1,
       
   112         ETwo,
       
   113         EThree,
       
   114         EFour
       
   115         };
       
   116 
       
   117 public:  // Constructors and destructor
       
   118 
       
   119     /**
       
   120      * C++ default constructor.
       
   121      */
       
   122     CalenDayInfo( TSlotsInHour aSlotsInHour ) {Q_UNUSED(aSlotsInHour);}
       
   123     
       
   124 public:     
       
   125 
       
   126     void Reset() {}
       
   127 
       
   128     void InsertTimedEvent( const SCalenApptInfo& aItemInfo ) {Q_UNUSED(aItemInfo);}
       
   129 
       
   130     //void InsertUntimedEvent( AgendaEntry::Type aType,
       
   131     //                         const TCalenInstanceId& aId );
       
   132 
       
   133     void InsertAlldayEvent( const SCalenApptInfo& aItemInfo ){Q_UNUSED(aItemInfo);}
       
   134 
       
   135     //static bool IsAlldayEvent( QDateTime aStart, QDateTime aEnd );
       
   136 
       
   137 
       
   138     //int SuggestedUntimedSlotPos();
       
   139 
       
   140     //int NeededUntimedSlotCount();
       
   141 
       
   142     //int UpdateUntimedPos( int aSlot = -1, int aUntimedCount = 0 );
       
   143 
       
   144     //int FirstOccupiedSlot();
       
   145 
       
   146     //int LastOccupiedSlot();
       
   147 
       
   148     //int EarliestEndSlot();
       
   149     //int LastStartSlot();
       
   150 
       
   151 
       
   152     //int SlotIndexForStartTime( QDateTime aStartTime );
       
   153 
       
   154     //int SlotIndexForEndTime( QDateTime aStartTime );
       
   155 
       
   156     //void GetLocation( const SCalenApptInfo& aItemInfo,
       
   157     //                  int& aStartSlot,
       
   158     //                  int& aEndSlot,
       
   159     //                  int& aColumnIndex,
       
   160     //                  int& aColumns );
       
   161 
       
   162     //int AlldayCount();
       
   163 
       
   164     //int TodoCount();
       
   165 
       
   166     //bool IsHourStartSlot( const int& aSlotIndex ) const;
       
   167 
       
   168     //bool IsExtraSlot( const int& aSlotIndex ) const;
       
   169 
       
   170     //int HourFromSlotIndex( const int& aSlotIndex ) const;
       
   171 
       
   172     //int SlotIndexFromHour( int aHour );
       
   173 
       
   174     //int RoundHourUp( int aSlot );
       
   175 
       
   176     //int RoundHourDown( int aSlot );
       
   177 
       
   178     //void GetSelectedSlot( int& aSlot, int& aRegion, int& aColumnIndex, int& aColumns );
       
   179 
       
   180     //bool MoveSelection( TScrollDirection aDirection );
       
   181 
       
   182     //void MoveSelectionInEvent( TScrollDirection aDirection );
       
   183 
       
   184     //void UpdateSelectionInEvent();
       
   185 
       
   186     //bool IsEventSelected() const;
       
   187 
       
   188    // bool IsMultipleEventsSelected() const;
       
   189 
       
   190     //bool IsAlldayEventSelected() const;
       
   191 
       
   192     //TCalenInstanceId SelectedEvent();
       
   193 
       
   194     //int SelectEvent( const TCalenInstanceId& aId );
       
   195 
       
   196     //TCalenInstanceId UntimedEvent( int aIndex );
       
   197 
       
   198     //const CalenTimedEventInfo& AlldayEvent( int aIndex );
       
   199 
       
   200     //void SelectSlot( int aSlot );
       
   201 
       
   202 
       
   203     //const QList<CalenTimeRegion>& RegionList() const;
       
   204 
       
   205 
       
   206     //void GetEventIntervals( QList<CalenEventInterval>& aArray ) const;
       
   207 
       
   208 
       
   209    // CalenSlotInterval SelectedInterval();
       
   210     
       
   211    // bool SetSelectionInRegion( int aRegion, int aColumn, int aSlot );
       
   212 };
       
   213 
       
   214 #endif