void QAsAppender::append(std::vector<std::shared_ptr<QA> > importedQAs) { SimpleTree::Node<QA> &mainNode = m_qAsRepository->getQAs(); std::vector<SimpleTree::Node<QA> > newNodes = createNewNodes(importedQAs); if(m_destinationSelector->select(createGroupsMap(mainNode), createStringQuestionsList(importedQAs))) { appendNewNodes(newNodes, mainNode); m_qAsRepository->onQAsImport(); } }
void Powerline_RateShowDlg::onSubscribData(int nStart, int nEnd) { Q_ASSERT(m_plNode.count() == m_plEdge.count()); m_scene->invalidate(); /////Ω®¡¢–¬πù¸c if(nStart > nEnd) { qDebug() << "Powerline_RateShowDlg::onSubscribData: nStart > nEnd ,so failed!"; return; } int nCount = nEnd + 1 - nStart; int i = 0; int idx = 0; int tmpStart = nStart; int j = 0; Q_ASSERT(/*m_pPLDev && */m_TopNode); for(i = 0; i < nCount/* + 1*/; ++i) { qDebug() << "idx=" << i << "m_nID: " << ((m_pPLDev)[i])->m_nID; //if(((*m_pPLDev)[i])->m_nID == m_TopNode->m_nID) //{ // tmpStart++; // continue; //} createNewNodes(j++); itemsFromDevice(m_plNode[idx], m_plEdge[idx], (m_pPLDev)[tmpStart++]); ++idx; } ////Ñh≥˝∂‡Nπù¸c nCount = m_plNode.count(); delRedundanceNodes(idx, nCount); ////display nodes and edges positionItem(); }