本文整理汇总了C++中kstvectormap::Iterator::value方法的典型用法代码示例。如果您正苦于以下问题:C++ Iterator::value方法的具体用法?C++ Iterator::value怎么用?C++ Iterator::value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kstvectormap::Iterator
的用法示例。
在下文中一共展示了Iterator::value方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
KstObjectItem::KstObjectItem(Q3ListView *parent, KstDataObjectPtr x, KstDataManagerI *dm, int localUseCount)
: QObject(), K3ListViewItem(parent), _rtti(RTTI_OBJ_OBJECT), _tag(x->tag()), _dm(dm) {
assert(x);
_inUse = false;
setText(0, x->tag().tag());
for (KstVectorMap::Iterator i = x->outputVectors().begin();
i != x->outputVectors().end();
++i) {
KstObjectItem *item = new KstObjectItem(this, i.value(), _dm);
connect(item, SIGNAL(updated()), this, SIGNAL(updated()));
}
for (KstMatrixMap::Iterator i = x->outputMatrices().begin();
i != x->outputMatrices().end();
++i) {
KstObjectItem *item = new KstObjectItem(this, i.value(), _dm);
connect(item, SIGNAL(updated()), this, SIGNAL(updated()));
}
x = 0L; // keep the counts in sync
update(false, localUseCount);
}
示例2: update
//.........这里部分代码省略.........
setPixmap(2, inUse ? _dm->yesPixmap() : QPixmap());
}
if (x->sampleCount() > 0) {
field = QString::number(x->sampleCount());
if (text(3) != field) {
setText(3, field);
}
} else {
if (text(3) != "-") {
setText(3, "-");
}
}
field = x->propertyString();
if (text(4) != field) {
setText(4, field);
}
if (recursive) {
Q3PtrStack<Q3ListViewItem> trash;
KstVectorMap vl = x->outputVectors();
KstVectorMap::Iterator vlEnd = vl.end();
for (Q3ListViewItem *i = firstChild(); i; i = i->nextSibling()) {
KstObjectItem *oi = static_cast<KstObjectItem*>(i);
if (vl.findTag(oi->tag().tag()) == vlEnd) {
trash.push(i);
}
}
trash.setAutoDelete(true);
trash.clear();
// get the output vectors
for (KstVectorMap::Iterator p = vl.begin(); p != vlEnd; ++p) {
bool found = false;
QString tn = p.value()->tag().tag();
for (Q3ListViewItem *i = firstChild(); i; i = i->nextSibling()) {
KstObjectItem *oi = static_cast<KstObjectItem*>(i);
if (oi->tag().tag() == tn) {
oi->update();
found = true;
break;
}
}
if (!found) {
KstObjectItem *item = new KstObjectItem(this, p.value(), _dm);
connect(item, SIGNAL(updated()), this, SIGNAL(updated()));
}
}
KstMatrixMap ml = x->outputMatrices();
KstMatrixMap::Iterator mlEnd = ml.end();
// also get the output matrices
for (KstMatrixMap::Iterator p = ml.begin(); p != mlEnd; ++p) {
bool found = false;
QString tn = p.value()->tag().tag();
for (Q3ListViewItem *i = firstChild(); i; i = i->nextSibling()) {
KstObjectItem *oi = static_cast<KstObjectItem*>(i);
if (oi->tag().tag() == tn) {
oi->update();
found = true;
break;
}
}
if (!found) {
KstObjectItem *item = new KstObjectItem(this, p.value(), _dm);
connect(item, SIGNAL(updated()), this, SIGNAL(updated()));
}