本文整理汇总了C++中kcalcore::Todo类的典型用法代码示例。如果您正苦于以下问题:C++ Todo类的具体用法?C++ Todo怎么用?C++ Todo使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Todo类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: testTodoConversion_data
void KCalConversionTest::testTodoConversion_data()
{
QTest::addColumn<KCalCore::Todo>( "kcal" );
QTest::addColumn<Kolab::Todo>( "kolab" );
Kolab::cDateTime date(2011,2,2,12,11,10,true);
Kolab::cDateTime date2(2011,2,2,12,12,10,true);
{
KCalCore::Todo kcal;
kcal.setUid("uid");
kcal.setDtStart(toDate(date));
kcal.setDtDue(toDate(date2));
kcal.setRelatedTo("uid2", KCalCore::Incidence::RelTypeParent);
Kolab::Todo kolab;
kolab.setUid("uid");
kolab.setStart(date);
kolab.setDue(date2);
std::vector<std::string> relateds;
relateds.push_back("uid2");
kolab.setRelatedTo(relateds);
QTest::newRow( "todo" ) << kcal << kolab;
}
}
示例2: setPriority
static void setPriority( const QString &value, KCalCore::Todo &todo )
{
if ( value == QLatin1String( "High" ) ) {
todo.setPriority( 1 );
} else if ( value == QLatin1String( "Medium" ) ) {
todo.setPriority( 5 );
} else if ( value == QLatin1String( "Low" ) ) {
todo.setPriority( 9 );
} else {
todo.setPriority( 0 );
}
}
示例3: getPriority
static QString getPriority( const KCalCore::Todo &todo )
{
if ( todo.priority() == 1 ) {
return QLatin1String( "High" );
} else if ( todo.priority() == 5 ) {
return QLatin1String( "Medium" );
} else if ( todo.priority() == 9 ) {
return QLatin1String( "Low" );
} else {
return QLatin1String( "None" );
}
}
示例4: getStatus
static QString getStatus( const KCalCore::Todo &todo )
{
if ( todo.status() == KCalCore::Todo::StatusConfirmed ) {
return QLatin1String( "Not Started" );
} else if ( todo.status() == KCalCore::Todo::StatusInProcess ) {
return QLatin1String( "In Progress" );
} else if ( todo.status() == KCalCore::Todo::StatusCompleted ) {
return QLatin1String( "Completed" );
} else if ( todo.status() == KCalCore::Todo::StatusNeedsAction ) {
return QLatin1String( "Pending Input" );
} else if ( todo.customStatus() == "StatusDeferred" ) {
return QLatin1String( "Deferred" );
} else {
return QLatin1String( "None" );
}
}
示例5: setStatus
static void setStatus( const QString &value, KCalCore::Todo &todo )
{
if ( value == QLatin1String( "Not Started" ) ) {
todo.setStatus( KCalCore::Todo::StatusConfirmed );
} else if ( value == QLatin1String( "In Progress" ) ) {
todo.setStatus( KCalCore::Todo::StatusInProcess );
} else if ( value == QLatin1String( "Completed" ) ) {
todo.setStatus( KCalCore::Todo::StatusCompleted );
} else if ( value == QLatin1String( "Pending Input" ) ) {
todo.setStatus( KCalCore::Todo::StatusNeedsAction );
} else if ( value == QLatin1String( "Deferred" ) ) {
todo.setCustomStatus( QLatin1String( "StatusDeferred" ) );
} else {
todo.setStatus( KCalCore::Todo::StatusNone );
}
}
示例6: setDateStartFlag
static void setDateStartFlag( const QString &value, KCalCore::Todo &todo )
{
todo.setCustomProperty( "SugarCRM", "X-DateStartFlag", value );
}
示例7: setContactId
static void setContactId( const QString &value, KCalCore::Todo &todo )
{
todo.setCustomProperty( "SugarCRM", "X-ContactId", value );
}
示例8: setSummary
static void setSummary( const QString &value, KCalCore::Todo &todo )
{
todo.setSummary( value );
}
示例9: setDescription
static void setDescription( const QString &value, KCalCore::Todo &todo )
{
todo.setDescription( value );
}
示例10: setCreatedBy
static void setCreatedBy( const QString &value, KCalCore::Todo &todo )
{
todo.setCustomProperty( "SugarCRM", "X-CreatedBy", value );
}
示例11: setModifiedUserId
static void setModifiedUserId( const QString &value, KCalCore::Todo &todo )
{
todo.setCustomProperty( "SugarCRM", "X-ModifiedUserId", value );
}
示例12: getDateModified
static QString getDateModified( const KCalCore::Todo &todo )
{
return todo.customProperty( "SugarCRM", "X-DateModified" );
}
示例13: getDateEntered
static QString getDateEntered( const KCalCore::Todo &todo )
{
return todo.created().toString();
}
示例14: getDateStartFlag
static QString getDateStartFlag( const KCalCore::Todo &todo )
{
return todo.customProperty( "SugarCRM", "X-DateStartFlag" );
}
示例15: getDateDue
static QString getDateDue( const KCalCore::Todo &todo )
{
KDateTime dateDue = todo.dtDue();
return dateDue.toString( "%Y-%m-%d %H:%M:%S" );
}