本文整理汇总了C++中CCalEntry::EndTimeL方法的典型用法代码示例。如果您正苦于以下问题:C++ CCalEntry::EndTimeL方法的具体用法?C++ CCalEntry::EndTimeL怎么用?C++ CCalEntry::EndTimeL使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CCalEntry
的用法示例。
在下文中一共展示了CCalEntry::EndTimeL方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadDateFieldsL
// -----------------------------------------------------------------------------
// CPIMAgnToDoAdapter::ReadDateFieldsL
// (other items were commented in a header)
// -----------------------------------------------------------------------------
//
void CPIMAgnToDoAdapter::ReadDateFieldsL(MPIMItemData& aData, CCalEntry& aEntry)
{
JELOG2(EPim);
TTime nullTime = Time::NullTTime();
// The Agenda todo entry end field is the due date
TTime due(aEntry.EndTimeL().TimeLocalL());
if (due != nullTime)
{
// Set due to the PIM API specific due date, in this case, the start of date
// Note that PIM API uses times as UTC times so the due date must be in
// correct format. Previously requested as local time -> do not change
TPIMDate pimDueDate(StartOfDay(due));
// Date must be converted UTC time because acquired as local above
ConvertTimeL(pimDueDate, EPIMDateUTC);
TPIMFieldData dueFieldData(EPIMToDoDue, KPIMAttrNone, pimDueDate);
aData.AddValueL(dueFieldData);
// Get alarm. Ownership is transferred to the caller. Alarm cannot be set
// if the due date is not set because the calculation is done as an offset
// from the ToDo due date.
CCalAlarm* calAlarm = aEntry.AlarmL();
if (calAlarm)
{
TTimeIntervalMinutes nativeValue = calAlarm->TimeOffset();
// The alarm is not needed anymore so it can be deleted
delete calAlarm;
calAlarm = NULL;
// Change the time to the start of the due date
TTime startOfDayLocal(StartOfDay(due));
// Calculate the difference from the start of due date and start time including
// the original alarm offset which was previously read
TTimeIntervalMinutes temp(0);
User::LeaveIfError(startOfDayLocal.MinutesFrom(due, temp));
// Since it is not possible to substract TTimeIntervalMinutes
// from TTime (probably a Symbian error), the difference has
// to be calculated using the following way...
TInt alarm = (nativeValue.Int() + temp.Int()) * KPIMSecondsInMinute;
// Add alarm value to the item
TPIMFieldData fieldData(EPIMToDoExtAlarm, EPIMFieldInt,
KPIMAttrNone, alarm);
// Add value to the PIM item data
aData.AddValueL(fieldData);
}
}
// Completion date. If the item has a completion date, the item is then completed
// and completed flag is set to true in PIM API. Null time if not crossed out.
TTime completed = aEntry.CompletedTimeL().TimeUtcL();
if (completed != nullTime)
{
TPIMFieldData dateData(EPIMToDoCompletionDate, KPIMAttrNone, completed);
aData.AddValueL(dateData);
// Note that boolean and integer fields must be identified in the constructor
TPIMFieldData flag(EPIMToDoCompleted, EPIMFieldBoolean, KPIMAttrNone,
ETrue);
aData.AddValueL(flag);
}
}
示例2: ReadEndFromAgnL
// -----------------------------------------------------------------------------
// CPIMAgnApptAdapter::ReadEndFromAgnL
// Reads Agenda entry's end field and converts it into PIM Item field.
// -----------------------------------------------------------------------------
//
void CPIMAgnApptAdapter::ReadEndFromAgnL(MPIMEventItem& aItem,
CCalEntry& aEntry)
{
JELOG2(EPim);
TTime agnEndTime = aEntry.EndTimeL().TimeUtcL();
if (agnEndTime != Time::NullTTime())
{
TPIMFieldData fieldData(EPIMEventEnd, KPIMAttrNone, agnEndTime);
aItem.ItemData().AddValueL(fieldData);
}
}
示例3: ReadEndFromAgnL
// -----------------------------------------------------------------------------
// CPIMAgnMemoAdapter::ReadEndFromAgnL
// Reads Agenda entry's end field and converts it into PIM Item field.
// -----------------------------------------------------------------------------
//
void CPIMAgnMemoAdapter::ReadEndFromAgnL(MPIMEventItem& aItem,
CCalEntry& aEntry)
{
JELOG2(EPim);
TTime agnEndDate(aEntry.EndTimeL().TimeUtcL());
if (agnEndDate != Time::NullTTime())
{
// TTime end date, as a TTime but without a time component.
TPIMFieldData fieldData(EPIMEventEnd, KPIMAttrNone, agnEndDate);
aItem.ItemData().AddValueL(fieldData);
}
}
示例4: transformToDetailL
void OrganizerTodoTimeTransform::transformToDetailL(const CCalEntry& entry, QOrganizerItem *item)
{
if(item->type() == QOrganizerItemType::TypeTodo
|| item->type() == QOrganizerItemType::TypeTodoOccurrence)
{
TCalTime startTime = entry.StartTimeL();
TCalTime endTime = entry.EndTimeL();
QOrganizerTodoTime range;
if (startTime.TimeUtcL() != Time::NullTTime())
range.setStartDateTime(toQDateTimeL(startTime));
if (endTime.TimeUtcL() != Time::NullTTime())
range.setDueDateTime(toQDateTimeL(endTime));
if (!range.isEmpty())
item->saveDetail(&range);
}
}
示例5: CheckAgendaEntryL
TInt CDstIntUtils::CheckAgendaEntryL(CCalEntryView& aEntryView, const TCalLocalUid& aId, const TTime& aStart, const TTime& aEnd)
{
TInt err = KErrArgument;
CCalEntry* entry = aEntryView.FetchL(aId);
CleanupStack::PushL(entry);
TTime start = entry->StartTimeL().TimeLocalL();
TTime end = entry->EndTimeL().TimeLocalL();
#ifdef _DEBUG
TDateTime startDateTime = start.DateTime();
TDateTime aStartDateTime = aStart.DateTime();
TDateTime endDateTime = end.DateTime();
TDateTime aEndDateTime = aEnd.DateTime();
#endif
if((aStart == start) && (aEnd == end))
{
err = KErrNone;
}
CleanupStack::PopAndDestroy(entry);
return err;
}