Changeset cf9287 for src/UIElements
- Timestamp:
- Feb 14, 2016, 12:33:41 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:
- b2c2e4
- Parents:
- 3b9aa1
- git-author:
- Frederik Heber <heber@…> (10/30/15 14:07:55)
- git-committer:
- Frederik Heber <heber@…> (02/14/16 12:33:41)
- Location:
- src/UIElements/Views/Qt4
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/QtInfoBox.cpp
r3b9aa1 rcf9287 41 41 42 42 #include "UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp" 43 44 #include <boost/thread/locks.hpp> 43 45 44 46 #include "Element/element.hpp" … … 70 72 QtInfoBox::~QtInfoBox() 71 73 { 72 clearTabs(); 74 clearAtomTab(); 75 clearMoleculeTab(); 73 76 } 74 77 … … 93 96 } 94 97 95 void QtInfoBox::clearTabs() 96 { 98 void QtInfoBox::clearAtomTab() 99 { 100 boost::recursive_mutex::scoped_lock lock(tabs_mutex); 97 101 if (page_atom){ 98 102 //removeTab(indexOf(page_atom)); … … 100 104 page_atom = NULL; 101 105 } 106 } 107 108 void QtInfoBox::clearMoleculeTab() 109 { 110 boost::recursive_mutex::scoped_lock lock(tabs_mutex); 102 111 if (page_mol){ 103 112 //removeTab(indexOf(page_mol)); … … 112 121 113 122 // Remove old tabs. 114 clearTabs(); 123 clearAtomTab(); 124 clearMoleculeTab(); 115 125 116 126 QtObservedAtom::ptr curAtom = board->getObservedAtom(_id); … … 122 132 nextMoleculeId = -1; 123 133 134 boost::recursive_mutex::scoped_lock lock(tabs_mutex); 124 135 page_atom = new QtAtomInfoPage(curAtom, periode, this); 125 136 addTab(page_atom, "Atom"); 126 connect(curAtom.get(), SIGNAL(atomRemoved()), this, SLOT(clear Tabs()));137 connect(curAtom.get(), SIGNAL(atomRemoved()), this, SLOT(clearAtomTab())); 127 138 128 139 const moleculeId_t molid = curAtom->getAtomMoleculeIndex(); … … 146 157 147 158 // Remove old tabs. 148 clearTabs(); 159 clearAtomTab(); 160 clearMoleculeTab(); 149 161 150 162 QtObservedMolecule::ptr curMolecule = board->getObservedMolecule(_id); … … 154 166 // Show new tabs. 155 167 if (curMolecule){ 168 boost::recursive_mutex::scoped_lock lock(tabs_mutex); 156 169 page_mol = new QtMoleculeInfoPage(curMolecule, this); 157 170 addTab(page_mol, "Molecule"); 158 connect(curMolecule.get(), SIGNAL(moleculeRemoved()), this, SLOT(clear Tabs()));171 connect(curMolecule.get(), SIGNAL(moleculeRemoved()), this, SLOT(clearMoleculeTab())); 159 172 160 173 if (currentPage > 0) -
src/UIElements/Views/Qt4/QtInfoBox.hpp
r3b9aa1 rcf9287 22 22 #include "UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp" 23 23 #include "UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp" 24 25 #include <boost/thread/recursive_mutex.hpp> 24 26 25 27 #include "types.hpp" … … 48 50 void timerTimeout(); 49 51 50 void clearTabs(); 52 void clearAtomTab(); 53 void clearMoleculeTab(); 51 54 52 55 private: … … 57 60 QtMoleculeInfoPage *page_mol; 58 61 QtAtomInfoPage *page_atom; 62 63 mutable boost::recursive_mutex tabs_mutex; 59 64 60 65 QTimer *timer;
Note:
See TracChangeset
for help on using the changeset viewer.