calendarui/views/dayview/tsrc/unittests/unittest_calendaycontainer/caleninstanceid.h
changeset 57 bb2d3e476f29
parent 45 b6db4fd4947b
equal deleted inserted replaced
55:2c54b51f39c4 57:bb2d3e476f29
    16 */
    16 */
    17 
    17 
    18 #ifndef CALENINSTANCEID_H
    18 #ifndef CALENINSTANCEID_H
    19 #define CALENINSTANCEID_H
    19 #define CALENINSTANCEID_H
    20 
    20 
       
    21 #include <agendaentry.h>
       
    22 
    21 /*!
    23 /*!
    22  Mocked class TCalenInstanceId
    24  Mocked class TCalenInstanceId
    23  */
    25  */
    24 class TCalenInstanceId
    26 class TCalenInstanceId
    25 {
    27 {
    30     
    32     
    31     static TCalenInstanceId nullInstanceId() {
    33     static TCalenInstanceId nullInstanceId() {
    32         return TCalenInstanceId();
    34         return TCalenInstanceId();
    33     }
    35     }
    34     
    36     
       
    37     static TCalenInstanceId create( const AgendaEntry& entry )
       
    38     {
       
    39         TCalenInstanceId id;
       
    40         id.mEntryLocalUid = entry.id();
       
    41         id.mInstanceTime = entry.startTime();
       
    42         id.mType = entry.type();
       
    43         return id;
       
    44     }
       
    45     
    35 public: // data members
    46 public: // data members
    36     ulong mEntryLocalUid;
    47     ulong mEntryLocalUid;
    37     QDateTime mInstanceTime;
    48     QDateTime mInstanceTime;
    38     AgendaEntry::Type mType;
    49     AgendaEntry::Type mType;
    39     bool mInstanceViewed;
    50     bool mInstanceViewed;