- Timestamp:
- Feb 12, 2016, 11:15:06 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:
- 15c8a9
- Parents:
- 099f67
- git-author:
- Frederik Heber <heber@…> (01/25/16 11:01:10)
- git-committer:
- Frederik Heber <heber@…> (02/12/16 23:15:06)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp
r099f67 r026bef 122 122 hoverAtomId(-1) 123 123 { 124 boost::function<void( )> subjectKilled =125 boost::bind(&GLMoleculeObject_molecule::countsubjectKilled, this );124 boost::function<void(const moleculeId_t)> subjectKilled = 125 boost::bind(&GLMoleculeObject_molecule::countsubjectKilled, this, _molid); 126 126 initObservedValues(ObservedValues, _molid, molref, subjectKilled); 127 127 … … 138 138 connect (this, SIGNAL(TesselationHullChanged()), this, SLOT(resetTesselationHull()), Qt::QueuedConnection); 139 139 connect (this, SIGNAL(BoundingBoxChanged()), this, SLOT(resetBoundingBox()), Qt::QueuedConnection); 140 connect (this, SIGNAL(IsSelectedChanged()), this, SLOT(resetIsSelected()), Qt::QueuedConnection);141 140 connect (this, SIGNAL(IdChanged()), this, SLOT(resetIndex()), Qt::QueuedConnection); 142 141 connect (this, SIGNAL(AtomInserted(const atomId_t)), this, SLOT(atomInserted(const atomId_t)), Qt::QueuedConnection); … … 148 147 } 149 148 150 GLMoleculeObject_molecule::GLMoleculeObject_molecule(QGLSceneNode *mesh[], QObject *parent, const moleculeId_t _molid) : 149 GLMoleculeObject_molecule::GLMoleculeObject_molecule( 150 QGLSceneNode *mesh[], 151 QObject *parent, 152 const moleculeId_t _molid) : 151 153 GLMoleculeObject(mesh, parent), 152 154 Observer(std::string("GLMoleculeObject_molecule")+toString(_molid)), … … 169 171 hoverAtomId(-1) 170 172 { 171 boost::function<void( )> subjectKilled =172 boost::bind(&GLMoleculeObject_molecule::countsubjectKilled, this );173 boost::function<void(const moleculeId_t)> subjectKilled = 174 boost::bind(&GLMoleculeObject_molecule::countsubjectKilled, this, _molid); 173 175 initObservedValues(ObservedValues, _molid, molref, subjectKilled); 174 176 … … 480 482 owner = NULL; 481 483 482 countsubjectKilled( );484 countsubjectKilled(getMolIndex()); 483 485 } 484 486 … … 844 846 } 845 847 846 void GLMoleculeObject_molecule::countsubjectKilled( )848 void GLMoleculeObject_molecule::countsubjectKilled(const moleculeId_t) 847 849 { 848 850 ++subjectKilledCount; … … 856 858 const moleculeId_t _molid, 857 859 const molecule * const _molref, 858 const boost::function<void( )> &_subjectKilled)860 const boost::function<void(const moleculeId_t)> &_subjectKilled) 859 861 { 860 862 /* This is an old note from when the code was still part of cstor's initializer body. … … 893 895 boost::bind(&GLMoleculeObject_molecule::updateBoundingBox, MolIndexGetter)); 894 896 895 _ObservedValues[MolName] = new ObservedValue_wCallback<std::string >(897 _ObservedValues[MolName] = new ObservedValue_wCallback<std::string, moleculeId_t>( 896 898 _molref, 897 899 MolNameUpdater, … … 899 901 MolNameUpdater(), 900 902 NameChannels, 901 _subjectKilled); 902 _ObservedValues[BoundingBox] = new ObservedValue_wCallback<molecule::BoundingBoxInfo>( 903 _subjectKilled, 904 MolIndexGetter); 905 _ObservedValues[BoundingBox] = new ObservedValue_wCallback<molecule::BoundingBoxInfo, moleculeId_t>( 903 906 _molref, 904 907 BoundingBoxUpdater, … … 906 909 initBoundingBox(), 907 910 BoundingBoxChannels, 908 _subjectKilled); 911 _subjectKilled, 912 MolIndexGetter); 909 913 _ObservedValues[PresentAtoms] = new ObservedValue_UpdateAtoms( 910 914 _molref, … … 919 923 { 920 924 delete boost::any_cast<ObservedValue_wCallback<moleculeId_t> *>(_ObservedValues[MolIndex]); 921 delete boost::any_cast<ObservedValue_wCallback<std::string > *>(_ObservedValues[MolName]);922 delete boost::any_cast<ObservedValue_wCallback<molecule::BoundingBoxInfo > *>(_ObservedValues[BoundingBox]);925 delete boost::any_cast<ObservedValue_wCallback<std::string, moleculeId_t> *>(_ObservedValues[MolName]); 926 delete boost::any_cast<ObservedValue_wCallback<molecule::BoundingBoxInfo, moleculeId_t> *>(_ObservedValues[BoundingBox]); 923 927 delete boost::any_cast<ObservedValue_UpdateAtoms *>(_ObservedValues[PresentAtoms]); 924 928 _ObservedValues.clear(); … … 932 936 std::string GLMoleculeObject_molecule::getMolName() const 933 937 { 934 return boost::any_cast<ObservedValue_wCallback<std::string > *>(ObservedValues[MolName])->get();938 return boost::any_cast<ObservedValue_wCallback<std::string, moleculeId_t> *>(ObservedValues[MolName])->get(); 935 939 } 936 940 937 941 molecule::BoundingBoxInfo GLMoleculeObject_molecule::getBoundingBox() const 938 942 { 939 return boost::any_cast<ObservedValue_wCallback<molecule::BoundingBoxInfo > *>(ObservedValues[BoundingBox])->get();943 return boost::any_cast<ObservedValue_wCallback<molecule::BoundingBoxInfo, moleculeId_t> *>(ObservedValues[BoundingBox])->get(); 940 944 } 941 945
Note:
See TracChangeset
for help on using the changeset viewer.