void Surface_Render_Plugin::mapAdded(MapHandlerGen *map) { DEBUG_SLOT(); connect(map, SIGNAL(vboAdded(Utils::VBO*)), this, SLOT(vboAdded(Utils::VBO*))); connect(map, SIGNAL(vboRemoved(Utils::VBO*)), this, SLOT(vboRemoved(Utils::VBO*))); connect(map, SIGNAL(boundingBoxModified()), this, SLOT(boundingBoxModified())); }
void Surface_Render_Plugin::mapRemoved(MapHandlerGen *map) { DEBUG_SLOT(); disconnect(map, SIGNAL(vboAdded(Utils::VBO*)), this, SLOT(vboAdded(Utils::VBO*))); disconnect(map, SIGNAL(vboRemoved(Utils::VBO*)), this, SLOT(vboRemoved(Utils::VBO*))); disconnect(map, SIGNAL(boundingBoxModified()), this, SLOT(boundingBoxModified())); if(map == m_schnapps->getSelectedMap()) m_dockTab->updateMapParameters(); }
void View::linkMap(MapHandlerGen* map) { // RECORDING QTextStream* rec = m_schnapps->pythonStreamRecorder(); if (rec) *rec << this->getName() << ".linkMap(\"" << map->getName() << "\");" << endl; DEBUG_SLOT(); if(map && !l_maps.contains(map)) { l_maps.push_back(map); map->linkView(this); DEBUG_EMIT("mapLinked"); emit(mapLinked(map)); connect(map, SIGNAL(selectedCellsChanged(CellSelectorGen*)), this, SLOT(updateGL())); connect(map, SIGNAL(boundingBoxModified()), this, SLOT(updateBoundingBox())); if(map->isSelectedMap()) setManipulatedFrame(map->getFrame()); updateBoundingBox(); b_updatingUI = true; m_dialogMaps->check(map->getName(), Qt::Checked); b_updatingUI = false; }
void Surface_Selection_Plugin::selectedMapChanged(MapHandlerGen *prev, MapHandlerGen *cur) { m_dockTab->updateMapParameters(); if(prev) { disconnect(prev, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(selectedMapAttributeAdded(unsigned int, const QString&))); disconnect(prev, SIGNAL(attributeModified(unsigned int, const QString&)), this, SLOT(selectedMapAttributeModified(unsigned int, const QString&))); disconnect(prev, SIGNAL(connectivityModified()), this, SLOT(selectedMapConnectivityModified())); disconnect(prev, SIGNAL(boundingBoxModified()), this, SLOT(selectedMapBoundingBoxModified())); disconnect(prev, SIGNAL(cellSelectorRemoved(unsigned int, const QString&)), this, SLOT(updateRemovedSelector(unsigned int, const QString&))); } if(cur) { connect(cur, SIGNAL(attributeAdded(unsigned int, const QString&)), this, SLOT(selectedMapAttributeAdded(unsigned int, const QString&))); connect(cur, SIGNAL(attributeModified(unsigned int, const QString&)), this, SLOT(selectedMapAttributeModified(unsigned int, const QString&))); connect(cur, SIGNAL(connectivityModified()), this, SLOT(selectedMapConnectivityModified())); connect(cur, SIGNAL(boundingBoxModified()), this, SLOT(selectedMapBoundingBoxModified())); connect(cur, SIGNAL(cellSelectorRemoved(unsigned int, const QString&)), this, SLOT(updateRemovedSelector(unsigned int, const QString&))); m_selectionRadiusBase = cur->getBBdiagSize() / 50.0f; h_parameterSet[cur].basePSradius = cur->getBBdiagSize() / (std::sqrt(cur->getNbOrbits(EDGE))); h_parameterSet[cur].verticesScaleFactor = m_dockTab->slider_verticesScaleFactor->value() / 50.0f; } }