本文整理汇总了C++中event::List::first方法的典型用法代码示例。如果您正苦于以下问题:C++ List::first方法的具体用法?C++ List::first怎么用?C++ List::first使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类event::List
的用法示例。
在下文中一共展示了List::first方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cal
Incidence *ICalFormat::fromString(const QString &text)
{
CalendarLocal cal(mTimeZoneId);
fromString(&cal, text);
Incidence *ical = 0;
Event::List elist = cal.events();
if(elist.count() > 0)
{
ical = elist.first();
}
else
{
Todo::List tlist = cal.todos();
if(tlist.count() > 0)
{
ical = tlist.first();
}
else
{
Journal::List jlist = cal.journals();
if(jlist.count() > 0)
{
ical = jlist.first();
}
}
}
return ical ? ical->clone() : 0;
}
示例2: loadTemplate
void KOEventEditor::loadTemplate( CalendarLocal &cal )
{
Event::List events = cal.events();
if ( events.count() == 0 ) {
KMessageBox::error( this, i18nc( "@info", "Template does not contain a valid event." ) );
} else {
readEvent( events.first(), QDate(), true );
}
}
示例3: createDropEvent
Event::Ptr DndFactory::createDropEvent( const QMimeData *mimeData )
{
//kDebug();
Event::Ptr event;
MemoryCalendar::Ptr calendar( createDropCalendar( mimeData ) );
if ( calendar ) {
Event::List events = calendar->events();
if ( !events.isEmpty() ) {
event = Event::Ptr( new Event( *events.first() ) );
}
}
return event;
}
示例4: kDebug
Event *DndFactory::createDropEvent( const QMimeData *md )
{
kDebug();
Event *ev = 0;
Calendar *cal = createDropCalendar( md );
if ( cal ) {
Event::List events = cal->events();
if ( !events.isEmpty() ) {
ev = new Event( *events.first() );
}
delete cal;
}
return ev;
}