本文整理汇总了C++中Q3PtrList::remove方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3PtrList::remove方法的具体用法?C++ Q3PtrList::remove怎么用?C++ Q3PtrList::remove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3PtrList
的用法示例。
在下文中一共展示了Q3PtrList::remove方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getSINWAV
PlotLine * SINWAV::calculateCustom (QString &, Q3PtrList<PlotLine> &)
{
Q3PtrList<PlotLine> pll;
pll.setAutoDelete(FALSE);
getSINWAV(pll);
pll.remove(1);
return pll.at(0);
}
示例2: remove
void CppRefType::remove(UmlClass * cl, Q3PtrList<CppRefType> & l)
{
Q3PtrListIterator<CppRefType> it(l);
for (; it.current(); ++it) {
if ((*it)->type.type == cl) {
l.remove(it);
return;
}
}
}
示例3: QString
void tst_Q3PtrList::removeType()
{
Q3PtrList<QString> items;
items.append(new QString("first"));
QString *second = new QString("second");
items.append(second);
QString *third = new QString("third");
items.append(third);
QString *fourth = new QString("fourth");
items.append(fourth);
QVERIFY(items.current() == fourth);
items.setAutoDelete(FALSE);
// this test an undocumented feature of remove( NULL )
// in QGList::remove if the ptr is 0 it removes the current item
// ie. it removes the fourth item from the list in this case
QString *nullPointer = NULL;
items.remove( nullPointer );
QVERIFY(items.count() == 3);
QVERIFY(items.current() == third);
// this tests that remove updates the current item also
// when it removes the _end_ item in the list
items.remove(third);
QVERIFY(items.current() == second);
// test that the removed items are not in the list, then deletes them
QVERIFY(third && items.find(third) == -1 );
QVERIFY(fourth && items.find(fourth) == -1);
delete third;
delete fourth;
fourth = third = 0;
items.setAutoDelete(TRUE);
}