Changeset 1b07b1 for src/UIElements/Views/Qt4/MoleculeList
- Timestamp:
- Feb 14, 2016, 12:34:28 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:
- 62a0ee
- Parents:
- e7ed12
- git-author:
- Frederik Heber <heber@…> (01/06/16 17:34:22)
- git-committer:
- Frederik Heber <heber@…> (02/14/16 12:34:28)
- Location:
- src/UIElements/Views/Qt4/MoleculeList
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.cpp
re7ed12 r1b07b1 82 82 connect(this,SIGNAL(itemChanged(QStandardItem*)),this,SLOT(moleculeNameChanged(QStandardItem*))); 83 83 connect(this, SIGNAL(itemChanged(QStandardItem*)), this, SLOT(checkForVisibilityChange(QStandardItem*))); 84 connect(board, SIGNAL(moleculeInserted( const moleculeId_t)), this, SLOT(moleculeInserted(const moleculeId_t)));84 connect(board, SIGNAL(moleculeInserted(QtObservedMolecule::ptr)), this, SLOT(moleculeInserted(QtObservedMolecule::ptr))); 85 85 connect(board, SIGNAL(moleculeRemoved(const moleculeId_t)), this, SLOT(moleculeRemoved(const moleculeId_t))); 86 86 connect(board, SIGNAL(moleculeIndexChanged(const moleculeId_t,const moleculeId_t)), … … 102 102 } 103 103 104 void QtMoleculeList::moleculeInserted( const moleculeId_t _id)104 void QtMoleculeList::moleculeInserted(QtObservedMolecule::ptr _mol) 105 105 { 106 106 // get ObservedMolecule from board 107 107 boost::recursive_mutex::scoped_lock lock(listAccessing_mutex); 108 newMolecules.push_back( _ id);108 newMolecules.push_back( _mol ); 109 109 } 110 110 … … 678 678 list_of_group_items_t visibilityGroupItems_copy = visibilityGroupItems; 679 679 visibilityGroupItems.clear(); 680 std::vector< moleculeId_t> newMolecules_copy = newMolecules;680 std::vector<QtObservedMolecule::ptr> newMolecules_copy = newMolecules; 681 681 newMolecules.clear(); 682 682 std::vector<moleculeId_t> removedMolecules_copy = removedMolecules; … … 784 784 785 785 /// 4. instantiate all new items 786 for (std::vector< moleculeId_t>::iterator moliter = newMolecules_copy.begin();786 for (std::vector<QtObservedMolecule::ptr>::iterator moliter = newMolecules_copy.begin(); 787 787 moliter != newMolecules_copy.end(); ++moliter) { 788 QtObservedMolecule::ptr ObservedMolecule = board->getObservedMolecule(*moliter); 789 if (ObservedMolecule) { 790 // LOG(1, "Adding molecule " << ObservedMolecule->getMoleculeName()); 791 // check that World knows the molecule still 792 const std::string formula = addMolecule(ObservedMolecule); 793 // LOG(1, "Adding " << formula << " to toBeSetOccurrence."); 794 toBeSetOccurrence.insert( formula ); 795 } 788 // LOG(1, "Adding molecule " << ObservedMolecule->getMoleculeName()); 789 // check that World knows the molecule still 790 const std::string formula = addMolecule(*moliter); 791 // LOG(1, "Adding " << formula << " to toBeSetOccurrence."); 792 toBeSetOccurrence.insert( formula ); 796 793 } 797 794 -
src/UIElements/Views/Qt4/MoleculeList/QtMoleculeList.hpp
re7ed12 r1b07b1 65 65 66 66 private slots: 67 void moleculeInserted( const moleculeId_t _id);67 void moleculeInserted(QtObservedMolecule::ptr _mol); 68 68 void moleculeRemoved(const moleculeId_t _id); 69 69 void moleculeIndexChanged(const moleculeId_t _oldid, const moleculeId_t _newid); … … 155 155 list_of_group_items_t visibilityGroupItems; 156 156 //!> list of new molecules which need to be added 157 std::vector< moleculeId_t> newMolecules;157 std::vector<QtObservedMolecule::ptr> newMolecules; 158 158 //!> list of molecules that have been removed 159 159 std::vector<moleculeId_t> removedMolecules;
Note:
See TracChangeset
for help on using the changeset viewer.