Changeset 5b61e5 for src/UIElements/Views
- Timestamp:
- Aug 5, 2015, 5:32:11 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:
- 25a81d
- Parents:
- 07b800
- git-author:
- Frederik Heber <heber@…> (07/19/15 13:25:40)
- git-committer:
- Frederik Heber <heber@…> (08/05/15 17:32:11)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
r07b800 r5b61e5 87 87 const Observable::channels_t GLMoleculeObject_molecule::BoundingBoxChannels(getAllAtomicChangesChannels()); 88 88 const Observable::channels_t GLMoleculeObject_molecule::IndexChannels(1, molecule::IndexChanged); 89 const Observable::channels_t GLMoleculeObject_molecule::NameChannels(1, molecule::MoleculeNameChanged); 89 90 90 91 static QGLSceneNode *createMoleculeMesh(const QGeometryData &_geo) … … 108 109 MolIndexUpdater( 109 110 boost::bind(&GLMoleculeObject_molecule::updateIndex, this) 111 ), 112 MolNameUpdater( 113 boost::bind(&GLMoleculeObject_molecule::updateName, this) 110 114 ), 111 115 TesselationHullUpdater( … … 124 128 _molid, 125 129 IndexChannels), 130 MolName( 131 molref, 132 MolNameUpdater, 133 "MoleculeName_"+toString(_molid), 134 updateName(), 135 NameChannels), 126 136 TesselationHull( 127 137 molref, … … 177 187 boost::bind(&GLMoleculeObject_molecule::updateIndex, this) 178 188 ), 189 MolNameUpdater( 190 boost::bind(&GLMoleculeObject_molecule::updateName, this) 191 ), 179 192 TesselationHullUpdater( 180 193 boost::bind(&GLMoleculeObject_molecule::updateTesselationHull, this) … … 192 205 _molid, 193 206 IndexChannels), 207 MolName( 208 molref, 209 MolNameUpdater, 210 "MoleculeName_"+toString(_molid), 211 updateName(), 212 NameChannels), 194 213 TesselationHull( 195 214 molref, … … 332 351 // Tesselate the points. 333 352 Tesselation T; 334 PointCloudAdaptor<molecule> cloud(const_cast<molecule *>(molref), molref->getName());353 PointCloudAdaptor<molecule> cloud(const_cast<molecule *>(molref), MolName.get()); 335 354 T(cloud, minradius); 336 355 … … 411 430 } 412 431 432 std::string GLMoleculeObject_molecule::updateName() const 433 { 434 const molecule * const mol = getMolecule(MolIndex.get()); 435 return mol->getName(); 436 } 437 413 438 void GLMoleculeObject_molecule::resetTesselationHull() 414 439 { … … 458 483 459 484 emit indexChanged(this, oldId, newId); 485 } 486 487 void GLMoleculeObject_molecule::resetName() 488 { 460 489 } 461 490 -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp
r07b800 r5b61e5 89 89 void resetAtoms(); 90 90 void resetIndex(); 91 void resetName(); 91 92 92 93 void AtomSelected(const atomId_t _id); … … 128 129 atoms_t updateAtoms(); 129 130 moleculeId_t updateIndex() const; 131 std::string updateName() const; 130 132 131 133 //!> the Observable we are signed on, also indicates whether we are sign on (not NULL) … … 143 145 //!> list of channels when the index needs to update 144 146 static const Observable::channels_t IndexChannels; 147 //!> list of channels when the name needs to update 148 static const Observable::channels_t NameChannels; 145 149 146 150 boost::function<moleculeId_t ()> MolIndexUpdater; 151 boost::function<std::string ()> MolNameUpdater; 147 152 boost::function<QGeometryData ()> TesselationHullUpdater; 148 153 boost::function<BoundingBoxInfo ()> BoundingBoxUpdater; … … 151 156 //!> contains the current molecule index 152 157 ObservedValue<moleculeId_t> MolIndex; 158 //!> contains the current molecule name 159 ObservedValue<std::string> MolName; 153 160 //!> contains current version of the tesselation hull on request 154 161 Cacheable<QGeometryData> TesselationHull;
Note:
See TracChangeset
for help on using the changeset viewer.