本文整理汇总了C++中KstVectorPtr::data方法的典型用法代码示例。如果您正苦于以下问题:C++ KstVectorPtr::data方法的具体用法?C++ KstVectorPtr::data怎么用?C++ KstVectorPtr::data使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KstVectorPtr
的用法示例。
在下文中一共展示了KstVectorPtr::data方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: update
void KstObjectItem::update(bool recursive) {
switch (_rtti) {
case RTTI_OBJ_DATA_VECTOR:
{
KstVectorPtr px = *KST::vectorList.findTag(_name);
assert(px.data());
assert(dynamic_cast<KstRVector*>(px.data()));
KstRVectorPtr x = static_cast<KstRVector*>(px.data());
setText(2, QString::number(x->getUsage() - 3)); // caller has a ptr
setText(3, QString::number(x->sampleCount()));
setText(4, i18n("%3: %4 [%1..%2]").arg(x->reqStartFrame())
.arg(x->reqStartFrame() + x->reqNumFrames())
.arg(x->getFilename())
.arg(x->getField()));
_removable = x->getUsage() == 3;
break;
}
case RTTI_OBJ_VECTOR:
{
KstVectorPtr x = *KST::vectorList.findTag(_name);
assert(x.data());
setText(2, QString::number(x->getUsage() - 2)); //caller also points
setText(3, QString::number(x->sampleCount()));
setText(4, i18n("[%1..%2]").arg(x->min()).arg(x->max()));
_removable = false;
break;
}
case RTTI_OBJ_OBJECT:
{
KstDataObjectPtr x = *KST::dataObjectList.findTag(_name);
assert(x.data());
setText(1, x->typeString());
setText(2, QString::number(x->getUsage() - 1)); // our pointer
setText(3, QString::number(x->sampleCount()));
setText(4, x->propertyString());
if (recursive) {
QPtrStack<QListViewItem> trash;
for (QListViewItem *i = firstChild(); i; i = i->nextSibling()) {
KstObjectItem *oi = static_cast<KstObjectItem*>(i);
if (x->outputVectors().findTag(oi->tagName()) == x->outputVectors().end()) {
trash.push(i);
}
}
trash.setAutoDelete(true);
trash.clear();
for (KstVectorMap::Iterator p = x->outputVectors().begin();
p != x->outputVectors().end();
++p) {
bool found = false;
for (QListViewItem *i = firstChild(); i; i = i->nextSibling()) {
KstObjectItem *oi = static_cast<KstObjectItem*>(i);
if (oi->tagName() == p.data()->tagName()) {
oi->update();
found = true;
break;
}
}
if (!found) {
new KstObjectItem(this, p.data(), _dm);
}
}
}
_removable = x->getUsage() == 1;
break;
}
default:
assert(0);
}
}