bool arnStringPacketVisualizer::addChannel(const char* Label)
{
    // non finito: fare tutta l'assegnazione delle propreta'

    QString vln(Label);

    arnStringPacketItem *tmp = new arnStringPacketItem(vln,0,this);
    if (!tmp) return false;

    if (!layout()) {
        pHLayout = new QHBoxLayout(this,0,-1,"arnStringPacketVisualizerLayout");
        if (!pHLayout) arnCriticalExit();
        }
    if (pVLayout1) {delete pVLayout1; pVLayout1 = 0;}
    if (pVLayout2) {delete pVLayout2; pVLayout2 = 0;}
    

    pVLayout1 = new QVBoxLayout(pHLayout,-1,"Vlayout1");
    if (!pVLayout1) arnCriticalExit();
    pVLayout2 = new QVBoxLayout(pHLayout,-1,"Vlayout2");
    if (!pVLayout2) arnCriticalExit();


    ChannelList->append(tmp);

    for (int i = 0; i < int(ChannelList->count()); i++) {
        ((i % 2) == 0)? pVLayout2->addWidget(((arnStringPacketItem *)ChannelList->at(i)))
        : pVLayout1->addWidget(((arnStringPacketItem *)ChannelList->at(i)));
        }
    return true;
}
示例#2
0
	/*! \brief Get the Neighborhood iterator
	 *
	 * It iterate across all the neighborhood particles of a selected particle
	 *
	 * \param part_id particle id
	 *
	 * \return an interator across the neighborhood particles
	 *
	 */
	template<unsigned int impl=NO_CHECK> inline VerletNNIteratorM<dim,VerletListM<dim,T,sh_byte,transform,VerletBase>,sh_byte> getNNIterator(size_t part_id)
	{
		VerletNNIteratorM<dim,VerletListM<dim,T,sh_byte,transform,VerletBase>,sh_byte> vln(part_id,*this);

		return vln;
	}