本文整理汇总了C++中KviPointerList::next方法的典型用法代码示例。如果您正苦于以下问题:C++ KviPointerList::next方法的具体用法?C++ KviPointerList::next怎么用?C++ KviPointerList::next使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KviPointerList
的用法示例。
在下文中一共展示了KviPointerList::next方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fillTreeWidget
void OptionsDialog::fillTreeWidget(QTreeWidgetItem * p,KviPointerList<OptionsWidgetInstanceEntry> * l,const QString &szGroup,bool bNotContainedOnly)
{
if(!l)return;
OptionsDialogTreeWidgetItem * it;
OptionsWidgetInstanceEntry * e;
KviPointerList<OptionsWidgetInstanceEntry> tmp;
tmp.setAutoDelete(false);
for(e = l->first(); e; e = l->next())
{
// must be in the correct group
// if we want only containers then well.. must be one
e->bDoInsert = KviQString::equalCI(szGroup,e->szGroup) && ((!bNotContainedOnly) || e->bIsContainer || e->bIsNotContained);
OptionsWidgetInstanceEntry * ee = tmp.first();
int idx = 0;
while(ee)
{
if(ee->iPriority >= e->iPriority)break;
idx++;
ee = tmp.next();
}
tmp.insert(idx,e);
}
for(e = tmp.first(); e; e = tmp.next())
{
if(e->bDoInsert)
{
if(p)it = new OptionsDialogTreeWidgetItem(p,e);
else it = new OptionsDialogTreeWidgetItem(m_pTreeWidget,e);
if(!it->m_pOptionsWidget)
{
it->m_pOptionsWidget = g_pOptionsInstanceManager->getInstance(it->m_pInstanceEntry,m_pWidgetStack);
if(it->m_pOptionsWidget)
m_pWidgetStack->addWidget(it->m_pOptionsWidget);
}
} else {
it = (OptionsDialogTreeWidgetItem *)p;
}
if(e->pChildList)
{
if(e->bIsContainer)
{
// it's a container: add only eventual not contained children (containers or explicitly marked as not contained)
fillTreeWidget(it,e->pChildList,szGroup,true);
} else {
// it's not a container, add any children
fillTreeWidget(it,e->pChildList,szGroup,false);
}
}
}
}
示例2: findNextEnabledPage
KviTalWizardPageData * findNextEnabledPage(QWidget * pReference)
{
if(!pReference) return findFirstEnabledPage();
KviTalWizardPageData * pData = findPage(pReference);
if(!pData) return NULL;
for(pData = pPageList->next();pData;pData = pPageList->next())
{
if(pData->bEnabled) return pData;
}
return NULL;
}
示例3: removeAllModuleRawHandlers
void KviKvsEventManager::removeAllModuleRawHandlers(KviKvsModuleInterface * pIface)
{
KviKvsEventHandler * h;
for(auto & i : m_rawEventTable)
{
if(!i)
continue;
KviPointerList<KviKvsEventHandler> l;
l.setAutoDelete(false);
for(h = i->first(); h; h = i->next())
{
if(h->type() == KviKvsEventHandler::Module)
{
if(((KviKvsModuleEventHandler *)h)->moduleInterface() == pIface)
{
l.append(h);
}
}
}
for(h = l.first(); h; h = l.next())
i->removeRef(h);
if(i->isEmpty())
{
delete i;
i = nullptr;
}
}
}
示例4: removeAllModuleAppHandlers
void KviKvsEventManager::removeAllModuleAppHandlers(KviKvsModuleInterface *pIface)
{
KviKvsEventHandler * h;
for(unsigned int i =0;i< KVI_KVS_NUM_APP_EVENTS;i++)
{
if(!m_appEventTable[i].handlers())continue;
KviPointerList<KviKvsEventHandler> l;
l.setAutoDelete(false);
for(h = m_appEventTable[i].handlers()->first();h;h = m_appEventTable[i].handlers()->next())
{
if(h->type() == KviKvsEventHandler::Module)
{
if(((KviKvsModuleEventHandler *)h)->moduleInterface() == pIface)
{
l.append(h);
}
}
// COMPAT
/*
} else if(h->type() == KviKvsEventHandler::OldModule)
{
if(((KviKvsOldModuleEventHandler *)h)->module() == pIface)
{
l.append(h);
}
}
*/
// END COMPAT
}
for(h = l.first();h;h = l.next())m_appEventTable[i].removeHandler(h);
}
}
示例5: unregisterExtensionsByModule
void KviModuleExtensionManager::unregisterExtensionsByModule(KviModule * m)
{
KviPointerHashTableIterator<const char *,KviModuleExtensionDescriptorList> it(*m_pExtensionDict);
KviPointerList<KviCString> dying;
dying.setAutoDelete(true);
while(KviModuleExtensionDescriptorList * l = it.current())
{
KviPointerList<KviModuleExtensionDescriptor> dying2;
dying2.setAutoDelete(true);
for(KviModuleExtensionDescriptor * d = l->first();d;d = l->next())
{
if(d->module() == m)dying2.append(d);
}
for(KviModuleExtensionDescriptor * de = dying2.first();de;de = dying2.next())
{
l->removeRef(de);
}
if(l->isEmpty())dying.append(new KviCString(it.currentKey()));
++it;
}
for(KviCString * li = dying.first();li;li = dying.next())
{
m_pExtensionDict->remove(li->ptr());
}
}
示例6: cleanupUnusedModules
void KviModuleManager::cleanupUnusedModules()
{
KviPointerHashTableIterator<QString,KviModule> it(*m_pModuleDict);
KviPointerList<KviModule> lModulesToUnload;
lModulesToUnload.setAutoDelete(false);
while(it.current())
{
if(it.current()->secondsSinceLastAccess() > KVI_OPTION_UINT(KviOption_uintModuleCleanupTimeout))
{
if(it.current()->moduleInfo()->can_unload)
{
if((it.current()->moduleInfo()->can_unload)(it.current()))
lModulesToUnload.append(it.current());
else {
// the module don't want to be unloaded
// keep it memory for a while
it.current()->updateAccessTime();
}
} else {
if(!(it.current()->isLocked()))
lModulesToUnload.append(it.current());
}
}
++it;
}
for(KviModule * pModule = lModulesToUnload.first();pModule;pModule = lModulesToUnload.next())
unloadModule(pModule);
}
示例7: removeAllScriptRawHandlers
void KviKvsEventManager::removeAllScriptRawHandlers()
{
for(int i=0;i< KVI_KVS_NUM_RAW_EVENTS;i++)
{
if(m_rawEventTable[i])
{
KviPointerList<KviKvsEventHandler> dl;
dl.setAutoDelete(false);
KviKvsEventHandler * e;
for(e = m_rawEventTable[i]->first();e;e = m_rawEventTable[i]->next())
{
if(e->type() == KviKvsEventHandler::Script)dl.append(e);
}
for(e = dl.first();e;e = dl.next())
{
m_rawEventTable[i]->removeRef(e);
}
if(m_rawEventTable[i]->isEmpty())
{
delete m_rawEventTable[i];
m_rawEventTable[i] = 0;
}
}
}
}
示例8: removeAllScriptRawHandlers
void KviKvsEventManager::removeAllScriptRawHandlers()
{
for(auto & i : m_rawEventTable)
{
if(i)
{
KviPointerList<KviKvsEventHandler> dl;
dl.setAutoDelete(false);
KviKvsEventHandler * e;
for(e = i->first(); e; e = i->next())
{
if(e->type() == KviKvsEventHandler::Script)
dl.append(e);
}
for(e = dl.first(); e; e = dl.next())
{
i->removeRef(e);
}
if(i->isEmpty())
{
delete i;
i = nullptr;
}
}
}
}
示例9: load
void KviKvsAliasManager::load(const QString & filename)
{
m_pAliasDict->clear();
KviConfigurationFile cfg(filename,KviConfigurationFile::Read);
KviConfigurationFileIterator it(*(cfg.dict()));
KviPointerList<QString> l;
l.setAutoDelete(true);
while(it.current())
{
l.append(new QString(it.currentKey()));
++it;
}
for(QString * s = l.first();s;s = l.next())
{
cfg.setGroup(*s);
QString szCode = cfg.readEntry("_Buffer","");
if(!szCode.isEmpty())
{
KviKvsScript * m = new KviKvsScript(*s,szCode);
m_pAliasDict->insert(*s,m);
}
++it;
}
}
示例10: killAllObjectsWithClass
void KviKvsObjectController::killAllObjectsWithClass(KviKvsObjectClass * pClass)
{
if(!m_pObjectDict)
return; // no more objects at all...
KviPointerList< QPointer<KviKvsObject> > lDying;
lDying.setAutoDelete(true);
KviKvsObject * pObject;
for(pObject = m_pTopLevelObjectList->first();pObject;pObject = m_pTopLevelObjectList->next())
{
if(pObject->getClass() == pClass)
{
lDying.append(new QPointer<KviKvsObject>(pObject));
} else {
pObject->killAllChildrenWithClass(pClass);
}
}
for(QPointer<KviKvsObject> * pObject = lDying.first();pObject;pObject = lDying.next())
{
if(pObject->isNull())
continue; // already dead ?
(*pObject)->dieNow();
}
}
示例11: findPage
KviTalWizardPageData * findPage(QWidget * pWidget)
{
for(KviTalWizardPageData * pData = pPageList->first();pData;pData = pPageList->next())
{
if(pData->pWidget == pWidget) return pData;
}
return NULL;
}
示例12: cleanup
void KviSharedFilesManager::cleanup()
{
KviPointerHashTableIterator<QString, KviSharedFileList> it(*m_pSharedListDict);
time_t curTime = time(nullptr);
bool bOtherStuffToCleanup = false;
KviPointerList<QString> lDying;
lDying.setAutoDelete(true);
while(KviSharedFileList * l = it.current())
{
KviPointerList<KviSharedFile> tmp;
tmp.setAutoDelete(false);
for(KviSharedFile * o = l->first(); o; o = l->next())
{
if(o->expireTime() > 0)
{
if(((int)o->expireTime()) <= ((int)curTime))
{
tmp.append(o);
}
else
{
bOtherStuffToCleanup = true;
}
}
}
for(KviSharedFile * fo = tmp.first(); fo; fo = tmp.next())
{
l->removeRef(fo);
emit sharedFileRemoved(fo);
}
if(l->count() == 0)
lDying.append(new QString(it.currentKey()));
++it;
}
for(QString * pDyingKey = lDying.first(); pDyingKey; pDyingKey = lDying.next())
m_pSharedListDict->remove(*pDyingKey);
if(!bOtherStuffToCleanup)
m_pCleanupTimer->stop();
}
示例13: findFirstEnabledPage
KviTalWizardPageData * findFirstEnabledPage()
{
KviTalWizardPageData * pData;
for(pData = pPageList->first();pData;pData = pPageList->next())
{
if(pData->bEnabled) return pData;
}
return NULL;
}
示例14: lagCheckAbort
void KviLagMeter::lagCheckAbort(const char * key)
{
KviPointerList<KviLagCheck> l;
l.setAutoDelete(false);
KviLagCheck * c;
if(_OUTPUT_PARANOIC)
m_pConnection->console()->output(KVI_OUT_VERBOSE,__tr2qs("Lag check aborted (%s)"),key);
for(c = m_pCheckList->first();c;c = m_pCheckList->next())
if(kvi_strEqualCS(c->szKey.ptr(),key))l.append(c);
for(c = l.first();c;c = l.next())m_pCheckList->removeRef(c);
}
示例15: reindexPages
int reindexPages()
{
int iEnabledCount = 0;
for(KviTalWizardPageData * pData = pPageList->first();pData;pData = pPageList->next())
{
if(pData->bEnabled)
{
iEnabledCount++;
pData->iVisibleIndex = iEnabledCount;
}
}
return iEnabledCount;
}