Ejemplo n.º 1
0
void Zone::getSelectedZonelist(TDEListView *listView)
{
     _remotezonelist.clear();

     /* loop through all entries */
     TQListViewItem *root = listView->firstChild();
     while (root) {
	if (root->firstChild()) {
		root = root->firstChild();
		continue;
	}

	TQCheckListItem *cl = (TQCheckListItem*) root;
	if (cl->isOn()) {
		_remotezonelist.append(cl->text(2));
	}

	if (root->nextSibling()) {
		root = root->nextSibling();
		continue;
	}
	root = root->parent();
	if (root)
		root = root->nextSibling();
     }
}
Ejemplo n.º 2
0
void EvaQunMemberPicker::slotClicked(TQListViewItem *item)
{
	if(!item) return;
	TQCheckListItem *chkItem = dynamic_cast<TQCheckListItem *>(item);
	if(!chkItem) return;
	unsigned int id;
	TQString txt;
	TQString strID;
	bool ok;
	TQString nick;
	TQPixmap face;
	
	TQCheckListItem *child = dynamic_cast<TQCheckListItem *>(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<TQCheckListItem *>(child->nextSibling());
	}
}
Ejemplo n.º 3
0
void KSim::MonitorPrefs::saveConfig(KSim::Config *config)
{
  TQCheckListItem *item;
  TQStringList::ConstIterator it;
  for (it = m_locatedFiles.begin(); it != m_locatedFiles.end(); ++it) {
    KSim::PluginInfo info = KSim::PluginLoader::self().findPluginInfo((*it));
    item = static_cast<TQCheckListItem *>(findItem(info.name(), 0));
    config->setEnabledMonitor(info.libName(), item->isOn());
    config->setMonitorCommand(info.libName(), item->text(2));
    config->setMonitorLocation(info.libName(), itemIndex(item));
  }
}