controlDock_mapTab.cpp 15.8 KB
Newer Older
Pierre Kraemer's avatar
Pierre Kraemer committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include "controlDock_mapTab.h"

#include "schnapps.h"
#include "view.h"

namespace CGoGN
{

namespace SCHNApps
{

ControlDock_MapTab::ControlDock_MapTab(SCHNApps* s) :
	m_schnapps(s),
	m_selectedMap(NULL),
	b_updatingUI(false)
{
17 18 19
	for(unsigned int i = 0; i < NB_ORBITS; ++i)
		m_selectedSelector[i] = NULL;

Pierre Kraemer's avatar
Pierre Kraemer committed
20 21
	setupUi(this);

Pierre Kraemer's avatar
Pierre Kraemer committed
22
	connect(list_maps, SIGNAL(itemSelectionChanged()), this, SLOT(selectedMapChanged()));
Pierre Kraemer's avatar
Pierre Kraemer committed
23 24 25 26 27 28
	connect(list_maps, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(mapCheckStateChanged(QListWidgetItem*)));
	connect(list_vertexAttributes, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(vertexAttributeCheckStateChanged(QListWidgetItem*)));

	connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
	connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
	connect(m_schnapps, SIGNAL(selectedViewChanged(View*,View*)), this, SLOT(selectedViewChanged(View*,View*)));
Pierre Kraemer's avatar
Pierre Kraemer committed
29

30
	connect(list_dartSelectors, SIGNAL(itemSelectionChanged()), this, SLOT(selectedDartSelectorChanged()));
Pierre Kraemer's avatar
Pierre Kraemer committed
31 32
	connect(button_dartAddSelector, SIGNAL(clicked()), this, SLOT(addDartSelector()));
	connect(button_dartRemoveSelector, SIGNAL(clicked()), this, SLOT(removeDartSelector()));
33 34

	connect(list_vertexSelectors, SIGNAL(itemSelectionChanged()), this, SLOT(selectedVertexSelectorChanged()));
Pierre Kraemer's avatar
Pierre Kraemer committed
35 36
	connect(button_vertexAddSelector, SIGNAL(clicked()), this, SLOT(addVertexSelector()));
	connect(button_vertexRemoveSelector, SIGNAL(clicked()), this, SLOT(removeVertexSelector()));
37 38

	connect(list_edgeSelectors, SIGNAL(itemSelectionChanged()), this, SLOT(selectedEdgeSelectorChanged()));
Pierre Kraemer's avatar
Pierre Kraemer committed
39 40
	connect(button_edgeAddSelector, SIGNAL(clicked()), this, SLOT(addEdgeSelector()));
	connect(button_edgeRemoveSelector, SIGNAL(clicked()), this, SLOT(removeEdgeSelector()));
41 42

	connect(list_faceSelectors, SIGNAL(itemSelectionChanged()), this, SLOT(selectedFaceSelectorChanged()));
Pierre Kraemer's avatar
Pierre Kraemer committed
43 44
	connect(button_faceAddSelector, SIGNAL(clicked()), this, SLOT(addFaceSelector()));
	connect(button_faceRemoveSelector, SIGNAL(clicked()), this, SLOT(removeFaceSelector()));
45 46

	connect(list_volumeSelectors, SIGNAL(itemSelectionChanged()), this, SLOT(selectedVolumeSelectorChanged()));
Pierre Kraemer's avatar
Pierre Kraemer committed
47 48
	connect(button_volumeAddSelector, SIGNAL(clicked()), this, SLOT(addVolumeSelector()));
	connect(button_volumeRemoveSelector, SIGNAL(clicked()), this, SLOT(removeVolumeSelector()));
Pierre Kraemer's avatar
Pierre Kraemer committed
49 50
}

51 52 53 54 55 56 57 58 59 60 61 62 63 64
unsigned int ControlDock_MapTab::getCurrentOrbit()
{
	int current = tabWidget_mapInfo->currentIndex();
	switch(current)
	{
		case 0 : return DART; break;
		case 1 : return VERTEX; break;
		case 2 : return EDGE; break;
		case 3 : return FACE; break;
		case 4 : return VOLUME; break;
	}
	return DART;
}

Pierre Kraemer's avatar
Pierre Kraemer committed
65 66 67 68 69 70 71 72 73 74 75 76 77




void ControlDock_MapTab::selectedMapChanged()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
		{
			disconnect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(selectedMapAttributeAdded(unsigned int, const QString&)));
			disconnect(m_selectedMap, SIGNAL(vboAdded(Utils::VBO*)), this, SLOT(selectedMapVBOAdded(Utils::VBO*)));
			disconnect(m_selectedMap, SIGNAL(vboRemoved(Utils::VBO*)), this, SLOT(selectedMapVBORemoved(Utils::VBO*)));
Pierre Kraemer's avatar
Pierre Kraemer committed
78 79
			disconnect(m_selectedMap, SIGNAL(cellSelectorAdded(unsigned int, const QString&)), this, SLOT(selectedMapCellSelectorAdded(unsigned int, const QString&)));
			disconnect(m_selectedMap, SIGNAL(cellSelectorRemoved(unsigned int, const QString&)), this, SLOT(selectedMapCellSelectorRemoved(unsigned int, const QString&)));
Pierre Kraemer's avatar
Pierre Kraemer committed
80 81 82 83 84
		}

		QList<QListWidgetItem*> items = list_maps->selectedItems();
		if(!items.empty())
		{
Pierre Kraemer's avatar
Pierre Kraemer committed
85 86
			MapHandlerGen* old = m_selectedMap;

Pierre Kraemer's avatar
Pierre Kraemer committed
87 88 89 90 91 92 93 94 95 96
			QString selectedMapName = items[0]->text();
			m_selectedMap = m_schnapps->getMap(selectedMapName);

			updateSelectedMapInfo();

			m_schnapps->notifySelectedMapChanged(old, m_selectedMap);

			connect(m_selectedMap, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(selectedMapAttributeAdded(unsigned int, const QString&)));
			connect(m_selectedMap, SIGNAL(vboAdded(Utils::VBO*)), this, SLOT(selectedMapVBOAdded(Utils::VBO*)));
			connect(m_selectedMap, SIGNAL(vboRemoved(Utils::VBO*)), this, SLOT(selectedMapVBORemoved(Utils::VBO*)));
Pierre Kraemer's avatar
Pierre Kraemer committed
97 98
			connect(m_selectedMap, SIGNAL(cellSelectorAdded(unsigned int, const QString&)), this, SLOT(selectedMapCellSelectorAdded(unsigned int, const QString&)));
			connect(m_selectedMap, SIGNAL(cellSelectorRemoved(unsigned int, const QString&)), this, SLOT(selectedMapCellSelectorRemoved(unsigned int, const QString&)));
Pierre Kraemer's avatar
Pierre Kraemer committed
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
		}
	}
}

void ControlDock_MapTab::mapCheckStateChanged(QListWidgetItem *item)
{
	if(!b_updatingUI)
	{
		View* selectedView = m_schnapps->getSelectedView();
		MapHandlerGen* m = m_schnapps->getMap(item->text());
		if(m)
		{
			if(item->checkState() == Qt::Checked)
				selectedView->linkMap(m);
			else
				selectedView->unlinkMap(m);
		}
	}
}

void ControlDock_MapTab::vertexAttributeCheckStateChanged(QListWidgetItem *item)
{
	if(!b_updatingUI)
	{
		if(item->checkState() == Qt::Checked)
		{
			Utils::VBO* vbo = m_selectedMap->createVBO(item->text());
			if(!vbo)
			{
				b_updatingUI = true;
				item->setCheckState(Qt::Unchecked);
				b_updatingUI = false;
			}
		}
		else
			m_selectedMap->deleteVBO(item->text());
	}
}

138 139 140 141 142 143 144 145 146 147 148 149 150
void ControlDock_MapTab::selectedDartSelectorChanged()
{
	if(!b_updatingUI)
	{
		QList<QListWidgetItem*> items = list_dartSelectors->selectedItems();
		if(!items.empty())
		{
			QString selectedSelectorName = items[0]->text();
			m_selectedSelector[DART] = m_selectedMap->getCellSelector(DART, selectedSelectorName);
		}
	}
}

Pierre Kraemer's avatar
Pierre Kraemer committed
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
void ControlDock_MapTab::addDartSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
			m_selectedMap->addCellSelector(DART, QString("selector_") + QString::number(CellSelectorGen::selectorCount));
	}
}

void ControlDock_MapTab::removeDartSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
		{
			QList<QListWidgetItem*> items = list_dartSelectors->selectedItems();
			if(!items.empty())
				m_selectedMap->removeCellSelector(DART, items[0]->text());
		}
	}
}

173 174 175 176 177 178 179 180 181 182 183 184 185
void ControlDock_MapTab::selectedVertexSelectorChanged()
{
	if(!b_updatingUI)
	{
		QList<QListWidgetItem*> items = list_vertexSelectors->selectedItems();
		if(!items.empty())
		{
			QString selectedSelectorName = items[0]->text();
			m_selectedSelector[VERTEX] = m_selectedMap->getCellSelector(VERTEX, selectedSelectorName);
		}
	}
}

Pierre Kraemer's avatar
Pierre Kraemer committed
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
void ControlDock_MapTab::addVertexSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
			m_selectedMap->addCellSelector(VERTEX, QString("selector_") + QString::number(CellSelectorGen::selectorCount));
	}
}

void ControlDock_MapTab::removeVertexSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
		{
			QList<QListWidgetItem*> items = list_vertexSelectors->selectedItems();
			if(!items.empty())
				m_selectedMap->removeCellSelector(VERTEX, items[0]->text());
		}
	}
}

208 209 210 211 212 213 214 215 216 217 218 219 220
void ControlDock_MapTab::selectedEdgeSelectorChanged()
{
	if(!b_updatingUI)
	{
		QList<QListWidgetItem*> items = list_edgeSelectors->selectedItems();
		if(!items.empty())
		{
			QString selectedSelectorName = items[0]->text();
			m_selectedSelector[EDGE] = m_selectedMap->getCellSelector(EDGE, selectedSelectorName);
		}
	}
}

Pierre Kraemer's avatar
Pierre Kraemer committed
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
void ControlDock_MapTab::addEdgeSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
			m_selectedMap->addCellSelector(EDGE, QString("selector_") + QString::number(CellSelectorGen::selectorCount));
	}
}

void ControlDock_MapTab::removeEdgeSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
		{
			QList<QListWidgetItem*> items = list_edgeSelectors->selectedItems();
			if(!items.empty())
				m_selectedMap->removeCellSelector(EDGE, items[0]->text());
		}
	}
}

243 244 245 246 247 248 249 250 251 252 253 254 255
void ControlDock_MapTab::selectedFaceSelectorChanged()
{
	if(!b_updatingUI)
	{
		QList<QListWidgetItem*> items = list_faceSelectors->selectedItems();
		if(!items.empty())
		{
			QString selectedSelectorName = items[0]->text();
			m_selectedSelector[FACE] = m_selectedMap->getCellSelector(FACE, selectedSelectorName);
		}
	}
}

Pierre Kraemer's avatar
Pierre Kraemer committed
256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277
void ControlDock_MapTab::addFaceSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
			m_selectedMap->addCellSelector(FACE, QString("selector_") + QString::number(CellSelectorGen::selectorCount));
	}
}

void ControlDock_MapTab::removeFaceSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
		{
			QList<QListWidgetItem*> items = list_faceSelectors->selectedItems();
			if(!items.empty())
				m_selectedMap->removeCellSelector(FACE, items[0]->text());
		}
	}
}

278 279 280 281 282 283 284 285 286 287 288 289 290
void ControlDock_MapTab::selectedVolumeSelectorChanged()
{
	if(!b_updatingUI)
	{
		QList<QListWidgetItem*> items = list_volumeSelectors->selectedItems();
		if(!items.empty())
		{
			QString selectedSelectorName = items[0]->text();
			m_selectedSelector[VOLUME] = m_selectedMap->getCellSelector(VOLUME, selectedSelectorName);
		}
	}
}

Pierre Kraemer's avatar
Pierre Kraemer committed
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
void ControlDock_MapTab::addVolumeSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
			m_selectedMap->addCellSelector(VOLUME, QString("selector_") + QString::number(CellSelectorGen::selectorCount));
	}
}

void ControlDock_MapTab::removeVolumeSelector()
{
	if(!b_updatingUI)
	{
		if(m_selectedMap)
		{
			QList<QListWidgetItem*> items = list_volumeSelectors->selectedItems();
			if(!items.empty())
				m_selectedMap->removeCellSelector(VOLUME, items[0]->text());
		}
	}
}

Pierre Kraemer's avatar
Pierre Kraemer committed
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414




void ControlDock_MapTab::mapAdded(MapHandlerGen* m)
{
	b_updatingUI = true;
	QListWidgetItem* item = new QListWidgetItem(m->getName(), list_maps);
	item->setCheckState(Qt::Unchecked);
	b_updatingUI = false;
}

void ControlDock_MapTab::mapRemoved(MapHandlerGen* m)
{
	b_updatingUI = true;
	QList<QListWidgetItem*> items = list_maps->selectedItems();
	if(!items.empty())
		delete items[0];
	b_updatingUI = false;
}

void ControlDock_MapTab::selectedViewChanged(View* prev, View* cur)
{
	if(prev)
	{
		foreach(MapHandlerGen* map, prev->getLinkedMaps())
		{
			QList<QListWidgetItem*> prevItems = list_maps->findItems(map->getName(), Qt::MatchExactly);
			if(!prevItems.empty())
			{
				b_updatingUI = true;
				prevItems[0]->setCheckState(Qt::Unchecked);
				b_updatingUI = false;
			}
		}

		disconnect(prev, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(selectedViewMapLinked(MapHandlerGen*)));
		disconnect(prev, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(selectedViewMapUnlinked(MapHandlerGen*)));
	}
	if(cur)
	{
		foreach(MapHandlerGen* map, cur->getLinkedMaps())
		{
			QList<QListWidgetItem*> curItems = list_maps->findItems(map->getName(), Qt::MatchExactly);
			if(!curItems.empty())
			{
				b_updatingUI = true;
				curItems[0]->setCheckState(Qt::Checked);
				b_updatingUI = false;
			}
		}

		connect(cur, SIGNAL(mapLinked(MapHandlerGen*)), this, SLOT(selectedViewMapLinked(MapHandlerGen*)));
		connect(cur, SIGNAL(mapUnlinked(MapHandlerGen*)), this, SLOT(selectedViewMapUnlinked(MapHandlerGen*)));
	}
}





void ControlDock_MapTab::selectedViewMapLinked(MapHandlerGen* map)
{
	QList<QListWidgetItem*> curItems = list_maps->findItems(map->getName(), Qt::MatchExactly);
	if(!curItems.empty())
	{
		b_updatingUI = true;
		curItems[0]->setCheckState(Qt::Checked);
		b_updatingUI = false;
	}
}

void ControlDock_MapTab::selectedViewMapUnlinked(MapHandlerGen* map)
{
	QList<QListWidgetItem*> prevItems = list_maps->findItems(map->getName(), Qt::MatchExactly);
	if(!prevItems.empty())
	{
		b_updatingUI = true;
		prevItems[0]->setCheckState(Qt::Unchecked);
		b_updatingUI = false;
	}
}





void ControlDock_MapTab::selectedMapAttributeAdded(unsigned int orbit, const QString &name)
{
	updateSelectedMapInfo();
}

void ControlDock_MapTab::selectedMapVBOAdded(Utils::VBO *vbo)
{
	updateSelectedMapInfo();
}

void ControlDock_MapTab::selectedMapVBORemoved(Utils::VBO *vbo)
{
	updateSelectedMapInfo();
}

Pierre Kraemer's avatar
Pierre Kraemer committed
415 416 417 418 419 420 421 422 423 424
void ControlDock_MapTab::selectedMapCellSelectorAdded(unsigned int orbit, const QString& name)
{
	updateSelectedMapInfo();
}

void ControlDock_MapTab::selectedMapCellSelectorRemoved(unsigned int orbit, const QString& name)
{
	updateSelectedMapInfo();
}

Pierre Kraemer's avatar
Pierre Kraemer committed
425 426 427 428 429 430 431 432 433 434 435 436 437 438




void ControlDock_MapTab::updateSelectedMapInfo()
{
	b_updatingUI = true;

	list_dartAttributes->clear();
	list_vertexAttributes->clear();
	list_edgeAttributes->clear();
	list_faceAttributes->clear();
	list_volumeAttributes->clear();

Pierre Kraemer's avatar
Pierre Kraemer committed
439 440 441 442 443 444
	list_dartSelectors->clear();
	list_vertexSelectors->clear();
	list_edgeSelectors->clear();
	list_faceSelectors->clear();
	list_volumeSelectors->clear();

Pierre Kraemer's avatar
Pierre Kraemer committed
445 446 447 448 449 450 451 452
	GenericMap* m = m_selectedMap->getGenericMap();
	for(unsigned int orbit = DART; orbit <= VOLUME; ++orbit)
	{
		unsigned int nbc = m->getNbCells(orbit);
		switch(orbit)
		{
			case DART : {
				unsigned int nb = m->getNbDarts();
453 454
				label_dartNbOrbits->setText(QString::number(nb));
				label_dartNbCells->setText(QString::number(nbc));
Pierre Kraemer's avatar
Pierre Kraemer committed
455 456 457 458
				foreach(CellSelectorGen* cs, m_selectedMap->getCellSelectorSet(orbit).values())
				{
					QListWidgetItem* item = new QListWidgetItem(cs->getName(), list_dartSelectors);
					item->setFlags(item->flags() | Qt::ItemIsEditable);
459 460
					if(m_selectedSelector[orbit] == cs)
						item->setSelected(true);
Pierre Kraemer's avatar
Pierre Kraemer committed
461
				}
Pierre Kraemer's avatar
Pierre Kraemer committed
462 463 464 465
				break;
			}
			case VERTEX : {
				unsigned int nb = m->getNbOrbits<VERTEX>();
466 467
				label_vertexNbOrbits->setText(QString::number(nb));
				label_vertexNbCells->setText(QString::number(nbc));
Pierre Kraemer's avatar
Pierre Kraemer committed
468 469 470 471
				foreach(CellSelectorGen* cs, m_selectedMap->getCellSelectorSet(orbit).values())
				{
					QListWidgetItem* item = new QListWidgetItem(cs->getName(), list_vertexSelectors);
					item->setFlags(item->flags() | Qt::ItemIsEditable);
472 473
					if(m_selectedSelector[orbit] == cs)
						item->setSelected(true);
Pierre Kraemer's avatar
Pierre Kraemer committed
474
				}
Pierre Kraemer's avatar
Pierre Kraemer committed
475 476 477 478
				break;
			}
			case EDGE : {
				unsigned int nb = m->getNbOrbits<EDGE>();
479 480
				label_edgeNbOrbits->setText(QString::number(nb));
				label_edgeNbCells->setText(QString::number(nbc));
Pierre Kraemer's avatar
Pierre Kraemer committed
481 482 483 484
				foreach(CellSelectorGen* cs, m_selectedMap->getCellSelectorSet(orbit).values())
				{
					QListWidgetItem* item = new QListWidgetItem(cs->getName(), list_edgeSelectors);
					item->setFlags(item->flags() | Qt::ItemIsEditable);
485 486
					if(m_selectedSelector[orbit] == cs)
						item->setSelected(true);
Pierre Kraemer's avatar
Pierre Kraemer committed
487
				}
Pierre Kraemer's avatar
Pierre Kraemer committed
488 489 490 491
				break;
			}
			case FACE : {
				unsigned int nb = m->getNbOrbits<FACE>();
492 493
				label_faceNbOrbits->setText(QString::number(nb));
				label_faceNbCells->setText(QString::number(nbc));
Pierre Kraemer's avatar
Pierre Kraemer committed
494 495 496 497
				foreach(CellSelectorGen* cs, m_selectedMap->getCellSelectorSet(orbit).values())
				{
					QListWidgetItem* item = new QListWidgetItem(cs->getName(), list_faceSelectors);
					item->setFlags(item->flags() | Qt::ItemIsEditable);
498 499
					if(m_selectedSelector[orbit] == cs)
						item->setSelected(true);
Pierre Kraemer's avatar
Pierre Kraemer committed
500
				}
Pierre Kraemer's avatar
Pierre Kraemer committed
501 502 503 504
				break;
			}
			case VOLUME : {
				unsigned int nb = m->getNbOrbits<VOLUME>();
505 506
				label_volumeNbOrbits->setText(QString::number(nb));
				label_volumeNbCells->setText(QString::number(nbc));
Pierre Kraemer's avatar
Pierre Kraemer committed
507 508 509 510
				foreach(CellSelectorGen* cs, m_selectedMap->getCellSelectorSet(orbit).values())
				{
					QListWidgetItem* item = new QListWidgetItem(cs->getName(), list_volumeSelectors);
					item->setFlags(item->flags() | Qt::ItemIsEditable);
511 512
					if(m_selectedSelector[orbit] == cs)
						item->setSelected(true);
Pierre Kraemer's avatar
Pierre Kraemer committed
513
				}
Pierre Kraemer's avatar
Pierre Kraemer committed
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
				break;
			}
		}

		if(m->isOrbitEmbedded(orbit))
		{
			AttributeContainer& cont = m->getAttributeContainer(orbit);
			std::vector<std::string> names;
			std::vector<std::string> types;
			cont.getAttributesNames(names);
			cont.getAttributesTypes(types);
			for(unsigned int i = 0; i < names.size(); ++i)
			{
				QString name = QString::fromStdString(names[i]);
				QString type = QString::fromStdString(types[i]);
				switch(orbit)
				{
					case DART : {
						list_dartAttributes->addItem(name + " (" + type + ")");
					} break;
					case VERTEX : {
						QListWidgetItem* item = new QListWidgetItem(name /*+ " (" + type + ")"*/, list_vertexAttributes);
						if(m_selectedMap->getVBO(name))
							item->setCheckState(Qt::Checked);
						else
							item->setCheckState(Qt::Unchecked);
					} break;
					case EDGE : {
						list_edgeAttributes->addItem(name + " (" + type + ")");
					} break;
					case FACE : {
						list_faceAttributes->addItem(name + " (" + type + ")");
					} break;
					case VOLUME : {
						list_volumeAttributes->addItem(name + " (" + type + ")");
					} break;
				}
			}
		}
	}

	b_updatingUI = false;
}

} // namespace SCHNApps

} // namespace CGoGN