- Timestamp:
- Aug 5, 2015, 5:32:12 PM (9 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- a9161d
- Parents:
- 369cb1
- git-author:
- Frederik Heber <heber@…> (07/20/15 09:16:27)
- git-committer:
- Frederik Heber <heber@…> (08/05/15 17:32:12)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_shape.cpp
r369cb1 r07136a 50 50 #include "CodePatterns/Log.hpp" 51 51 52 #include "Shapes/Shape.hpp"53 52 #include "Shapes/ShapeFactory.hpp" 54 53 #include "LinearAlgebra/Vector.hpp" -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_shape.hpp
r369cb1 r07136a 23 23 #include "GLMoleculeObject.hpp" 24 24 25 class Shape; 25 #include "Shapes/Shape.hpp" 26 26 27 27 /** This class represents a triangulated Shape. … … 41 41 private: 42 42 43 Shape &m_shape;43 Shape m_shape; 44 44 bool m_enabled; 45 45 }; -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
r369cb1 r07136a 362 362 /** Adds a shape to the scene. 363 363 * 364 * uses ShapeRegistry::lastChanged() 365 * 366 */ 367 void GLWorldScene::addShape() 368 { 369 Shape &shape = *ShapeRegistry::getInstance().lastChanged(); 370 GLMoleculeObject_shape *shapeObject = new GLMoleculeObject_shape(shape, this); 371 ShapeNodeMap::iterator iter = ShapesinSceneMap.find(shape.getName()); 372 ASSERT(iter == ShapesinSceneMap.end(), 373 "GLWorldScene::addShape() - same shape "+shape.getName()+" added again."); 374 ShapesinSceneMap.insert( make_pair(shape.getName(), shapeObject) ); 375 } 376 377 void GLWorldScene::removeShape() 378 { 379 Shape &shape = *ShapeRegistry::getInstance().lastChanged(); 380 ShapeNodeMap::iterator iter = ShapesinSceneMap.find(shape.getName()); 364 */ 365 void GLWorldScene::addShape(const std::string &_name) 366 { 367 Shape * const shape = ShapeRegistry::getInstance().getByName(_name); 368 if (shape != NULL) { 369 GLMoleculeObject_shape *shapeObject = new GLMoleculeObject_shape(*shape, this); 370 ShapeNodeMap::iterator iter = ShapesinSceneMap.find(_name); 371 ASSERT(iter == ShapesinSceneMap.end(), 372 "GLWorldScene::addShape() - same shape "+_name+" added again."); 373 ShapesinSceneMap.insert( make_pair(_name, shapeObject) ); 374 } else 375 ELOG(2, "GLWorldScene::addShape() - shape disappeared before we could draw it."); 376 377 emit changed(); 378 } 379 380 void GLWorldScene::removeShape(const std::string &_name) 381 { 382 ShapeNodeMap::iterator iter = ShapesinSceneMap.find(_name); 381 383 ASSERT(iter != ShapesinSceneMap.end(), 382 "GLWorldScene::removeShape() - shape "+ shape.getName()+" not in scene.");384 "GLWorldScene::removeShape() - shape "+_name+" not in scene."); 383 385 ShapesinSceneMap.erase(iter); 384 386 delete(iter->second); 387 388 emit changed(); 385 389 } 386 390 … … 393 397 } 394 398 } 399 400 emit changed(); 395 401 } 396 402 -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
r369cb1 r07136a 92 92 void setSelectionModeAtom(); 93 93 void setSelectionModeMolecule(); 94 void addShape( );95 void removeShape( );94 void addShape(const std::string &_name); 95 void removeShape(const std::string &_name); 96 96 // void update(); 97 97 void moleculesVisibilityChanged(const moleculeId_t _id, bool _visible); -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
r369cb1 r07136a 83 83 qRegisterMetaType<moleculeId_t>("moleculeId_t"); 84 84 85 connect(this, SIGNAL(ShapeAdded( )), worldscene, SLOT(addShape()));86 connect(this, SIGNAL(ShapeRemoved( )), worldscene, SLOT(removeShape()));85 connect(this, SIGNAL(ShapeAdded(const std::string &)), worldscene, SLOT(addShape(const std::string &))); 86 connect(this, SIGNAL(ShapeRemoved(const std::string &)), worldscene, SLOT(removeShape(const std::string &))); 87 87 // connect(this, SIGNAL(TimeChanged()), worldscene, SIGNAL(updated())); 88 88 connect(worldscene, SIGNAL(changeOccured()), this, SLOT(changeSignalled())); … … 477 477 case ShapeRegistry::ShapeInserted: 478 478 { 479 emit ShapeAdded( );479 emit ShapeAdded(ShapeRegistry::getInstance().lastChanged()->getName()); 480 480 break; 481 481 } 482 482 case ShapeRegistry::ShapeRemoved: 483 483 { 484 emit ShapeRemoved( );484 emit ShapeRemoved(ShapeRegistry::getInstance().lastChanged()->getName()); 485 485 break; 486 486 } -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
r369cb1 r07136a 69 69 void hoverChanged(const atomId_t _id); 70 70 void hoverChanged(const moleculeId_t _id, int); 71 void ShapeAdded( );72 void ShapeRemoved( );71 void ShapeAdded(const std::string &); 72 void ShapeRemoved(const std::string &); 73 73 void moleculesVisibilityChanged(const moleculeId_t,bool); 74 74
Note:
See TracChangeset
for help on using the changeset viewer.