Changeset 8b59dd for src/UIElements
- Timestamp:
- Feb 26, 2016, 9:46:19 AM (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:
- 5c9604
- Parents:
- 92af1b
- git-author:
- Frederik Heber <heber@…> (02/13/16 14:48:14)
- git-committer:
- Frederik Heber <heber@…> (02/26/16 09:46:19)
- Location:
- src/UIElements/Qt4/InstanceBoard
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp
r92af1b r8b59dd 65 65 "molecule", 66 66 *this, 67 boost::bind(&QtObservedInstanceBoard::moleculecountsubjectKilled, this, _1)), 68 lastremovedatom((atomId_t)-1), 69 lastremovedmolecule((moleculeId_t)-1) 67 boost::bind(&QtObservedInstanceBoard::moleculecountsubjectKilled, this, _1)) 70 68 { 71 69 qRegisterMetaType<QtObservedAtom::ptr>("QtObservedAtom::ptr"); … … 74 72 // be first (besides ObservedValues to know about new insertions) 75 73 World::getInstance().signOn(this, World::AtomInserted, GlobalObservableInfo::PriorityLevel(int(-10))); 76 World::getInstance().signOn(this, World::AtomRemoved, GlobalObservableInfo::PriorityLevel(int(-10)));77 74 World::getInstance().signOn(this, World::MoleculeInserted, GlobalObservableInfo::PriorityLevel(int(-10))); 78 World::getInstance().signOn(this, World::MoleculeRemoved, GlobalObservableInfo::PriorityLevel(int(-10)));79 75 WorldSignedOn = true; 80 76 } … … 84 80 if (WorldSignedOn) { 85 81 World::getInstance().signOff(this, World::AtomInserted); 86 World::getInstance().signOff(this, World::AtomRemoved);87 82 World::getInstance().signOff(this, World::MoleculeInserted); 88 World::getInstance().signOff(this, World::MoleculeRemoved);89 83 } 90 84 // sign off from all remaining molecules and atoms … … 161 155 ELOG(1, "QtObservedInstanceBoard got MoleculeInserted for unknown molecule id " << _id); 162 156 } 163 break;164 }165 case World::MoleculeRemoved:166 {167 const moleculeId_t _id = const_cast<const World &>(World::getInstance()).lastChangedMolId();168 LOG(3, "DEBUG: InformationBoard got MoleculeRemoved signal for molecule " << _id);169 // note down such that ObservedValues are simply dropped170 lastremovedmolecule = _id;171 157 break; 172 158 } … … 195 181 break; 196 182 } 197 case World::AtomRemoved:198 {199 const atomId_t _id = const_cast<const World &>(World::getInstance()).lastChangedAtomId();200 LOG(3, "DEBUG: InformationBoard got AtomRemoved signal for atom " << _id);201 // note down such that ObservedValues are simply dropped202 lastremovedatom = _id;203 break;204 }205 183 default: 206 184 ASSERT(0, "QtObservedInstanceBoard::recieveNotification() - we cannot get here for World."); … … 259 237 void QtObservedInstanceBoard::atomcountsubjectKilled(const atomId_t _atomid) 260 238 { 261 if ((_atomid == lastremovedatom)) { 262 LOG(3, "DEBUG: InstanceBoard emits atomRemoved for " << _atomid); 263 emit atomRemoved(lastremovedatom); 264 } else 265 ELOG(2, "QtObservedInstanceBoard::atomcountsubjectKilled() - id " << _atomid 266 << " not fitting with " << lastremovedatom); 239 LOG(3, "DEBUG: InstanceBoard emits atomRemoved for " << _atomid); 240 emit atomRemoved(_atomid); 267 241 } 268 242 269 243 void QtObservedInstanceBoard::moleculecountsubjectKilled(const moleculeId_t _molid) 270 244 { 271 if (lastremovedmolecule == _molid) { 272 LOG(3, "DEBUG: InstanceBoard emits moleculeRemoved for " << _molid); 273 emit moleculeRemoved(_molid); 274 } else 275 ELOG(2, "QtObservedInstanceBoard::moleculecountsubjectKilled() - id " << _molid 276 << " not fitting with " << lastremovedmolecule); 245 LOG(3, "DEBUG: InstanceBoard emits moleculeRemoved for " << _molid); 246 emit moleculeRemoved(_molid); 277 247 } 278 248 -
src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp
r92af1b r8b59dd 135 135 //!> container with all ObservedValues for each molecule, associated by id 136 136 ObservedValuesContainer<QtObservedMolecule, moleculeId_t> moleculeObservedValues; 137 138 //!> note down atom id of last removed atom to drop its ObservedValues139 atomId_t lastremovedatom;140 141 //!> note down molecule id of last removed molecule to drop its ObservedValues142 moleculeId_t lastremovedmolecule;143 137 }; 144 138
Note:
See TracChangeset
for help on using the changeset viewer.