本文整理汇总了C++中Activity::name方法的典型用法代码示例。如果您正苦于以下问题:C++ Activity::name方法的具体用法?C++ Activity::name怎么用?C++ Activity::name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Activity
的用法示例。
在下文中一共展示了Activity::name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: data
QVariant TestList::data(const QModelIndex &index, int role) const {
int row = index.row();
if(row < 0 || row >= m_data.count()) {
return QVariant();
}
Activity* activity = m_data.at(row);
switch(role) {
case NameRole:
// return activity's name as a string (model.name)
return activity->name();
case DisciplineRole:
// return activity's discipline (model.discipline)
return activity->discipline();
case DateRole:
// return activity's submission date
return activity->date();
case GradeRole:
return activity->grade();
case AchievedGradeRole:
return activity->achievedGrade();
case ActivityTypeRole:
return activity->activityType();
}
return QVariant();
}
示例2: externalTransition
void externalTransition(
const vle::devs::ExternalEventList& events,
const vle::devs::Time& time)
{
vle::devs::ExternalEventList::const_iterator it = events.begin();
while (it != events.end()) {
if ((*it)->onPort("start")) {
if (mPhase == INIT) {
mActivities.starting(time);
if (mActivities.startingActivities().empty()) {
mPhase = WAIT;
} else {
mPhase = SEND;
}
}
} else if ((*it)->onPort("done")) {
Activity* a = Activity::build(Activity::get(*it));
TraceModel(vle::fmt(" [%1%:%2%] at %3% -> %4% DONE") %
getModel().getParentName() % getModelName() %
time % a->name());
mDoneActivities.push_back(a);
}
++it;
}
if (mSigma > 0) {
mSigma -= (time - mLastTime);
mLastTime = time;
}
}
示例3: read
void CActivity::read(const Activity& activity)
{
this->iActId = activity.actid();
this->iType = activity.type();
this->sName = activity.name();
this->iStatus = activity.status();
this->sIconFile = activity.icon();
this->sInfoFile = activity.pic();
this->iExtraParam = activity.param();
this->exlist = activity.exchange();
this->bTips = activity.tips();
}