本文整理汇总了C++中Todo::setSummary方法的典型用法代码示例。如果您正苦于以下问题:C++ Todo::setSummary方法的具体用法?C++ Todo::setSummary怎么用?C++ Todo::setSummary使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Todo
的用法示例。
在下文中一共展示了Todo::setSummary方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addQuickTodo
void KOTodoView::addQuickTodo()
{
if ( ! mQuickAdd->text().stripWhiteSpace().isEmpty() ) {
Todo *todo = new Todo();
todo->setSummary( mQuickAdd->text() );
todo->setOrganizer( Person( KOPrefs::instance()->fullName(),
KOPrefs::instance()->email() ) );
if ( !mChanger->addIncidence( todo, this ) ) {
KODialogManager::errorSaveIncidence( this, todo );
delete todo;
return;
}
mQuickAdd->setText( QString::null );
}
}
示例2: testValidity
void TodoTest::testValidity()
{
QDate dt = QDate::currentDate();
Todo *todo = new Todo();
todo->setDtStart(KDateTime(dt));
todo->setDtDue(KDateTime(dt).addDays(1));
todo->setSummary(QStringLiteral("To-do1 Summary"));
todo->setDescription(QStringLiteral("This is a description of the first to-do"));
todo->setLocation(QStringLiteral("the place"));
todo->setPercentComplete(5);
//KDE5: QVERIFY( todo->typeStr() == i18n( "to-do" ) );
QVERIFY(todo->summary() == QLatin1String("To-do1 Summary"));
QVERIFY(todo->location() == QLatin1String("the place"));
QVERIFY(todo->percentComplete() == 5);
}
示例3: testTodoComparison
void ComparisonVisitorTest::testTodoComparison()
{
const QString summary = QLatin1String( "Testing comparison" );
const QString desc = QLatin1String( "Testing ComparisonVisitor" );
Todo reference;
reference.setSummary( summary );
reference.setDescription( desc );
reference.setPercentComplete( 50 );
// create a copy of the reference incidence
Todo todo( reference );
IncidenceBase *baseReference = &reference;
IncidenceBase *baseIncidence = &todo;
QVERIFY( mComparator.compare( baseIncidence, baseReference ) );
// change a property of Todo (but not of IncidenceBase)
todo.setPercentComplete( 100 );
QVERIFY( !mComparator.compare( baseIncidence, baseReference ) );
}