Ejemplo n.º 1
0
void VCSliderProperties::levelSelectChannelsByGroup(QString group)
{
	QCheckListItem* fxiNode = NULL;
	QCheckListItem* chNode = NULL;

	for (fxiNode = static_cast<QCheckListItem*> (m_levelList->firstChild());
	     fxiNode != NULL;
	     fxiNode = static_cast<QCheckListItem*> (fxiNode->nextSibling()))
	{
		for (chNode = static_cast<QCheckListItem*> (fxiNode->firstChild());
		     chNode != NULL;
		     chNode = static_cast<QCheckListItem*> (chNode->nextSibling()))
		{
			if (chNode->text(KColumnType) == group)
				chNode->setOn(true);
			else
				chNode->setOn(false);
		}
	}
}
Ejemplo n.º 2
0
void EvaQunMemberPicker::slotClicked(QListViewItem *item)
{
	if(!item) return;
	QCheckListItem *chkItem = dynamic_cast<QCheckListItem *>(item);
	if(!chkItem) return;
	unsigned int id;
	QString txt;
	QString strID;
	bool ok;
	QString nick;
	QPixmap face;
	
	QCheckListItem *child = dynamic_cast<QCheckListItem *>(chkItem->firstChild());
	if(!child){
		txt = chkItem->text(0);
		int index = txt.findRev("(");
		nick = txt.left( index );
		strID = txt.mid(index+1, txt.length() - index - 1 - 1);
		id = strID.toUInt(&ok);
		if(!ok) return;
		
		face = *(chkItem->pixmap(0));
		
		emit memberClicked(id, chkItem->isOn());
	}
	while(child){
		child->setOn(chkItem->isOn());
		
		txt = child->text(0);
		int index = txt.findRev("(");
		nick = txt.left( index );
		strID = txt.mid(index+1, txt.length() - index - 1 - 1);
		id = strID.toUInt(&ok);
		if(!ok) return;
		
		face = *(child->pixmap(0));
		
		emit memberClicked(id, child->isOn());
		child = dynamic_cast<QCheckListItem *>(child->nextSibling());
	}
}