Changeset 57a770 for src/UIElements
- Timestamp:
- Jan 4, 2012, 2:28:40 PM (13 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:
- b75386
- Parents:
- 0aa122
- git-author:
- Frederik Heber <heber@…> (01/04/12 13:26:47)
- git-committer:
- Frederik Heber <heber@…> (01/04/12 14:28:40)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp
r0aa122 r57a770 56 56 resetProperties(); 57 57 58 std::cout << "Created sphere for atom " << _atom->getId() << "." << endl;58 LOG(2, "INFO: Created sphere for atom " << _atom->getId() << "."); 59 59 60 60 connect( this, SIGNAL(clicked()), this, SLOT(wasClicked())); … … 71 71 void GLMoleculeObject_atom::update(Observable *publisher) 72 72 { 73 LOG(0, "GLMoleculeObject_atom::update() - called fro atom "+toString(_atom->getId())+"."); 73 #ifdef LOG_OBSERVER 74 observerLog().addMessage() << "++ Update of Observer " << observerLog().getName(this) << " from atom "+toString(_atom->getId())+"."; 75 #endif 74 76 resetProperties(); 75 77 } … … 78 80 { 79 81 const Vector Position = _atom->getPosition(); 80 LOG( 1, "GLMoleculeObject_atom::resetIndex() - new position is "+toString(Position)+".");82 LOG(4, "INFO: GLMoleculeObject_atom::resetIndex() - new position is "+toString(Position)+"."); 81 83 setPosition(QVector3D(Position[0], Position[1], Position[2])); 82 84 } … … 90 92 elementno = 1; 91 93 } 92 LOG( 1, "GLMoleculeObject_atom::resetIndex() - new element number is "+toString(elementno)+".");94 LOG(4, "INFO: GLMoleculeObject_atom::resetIndex() - new element number is "+toString(elementno)+"."); 93 95 94 96 // set materials … … 115 117 { 116 118 const size_t atomno = _atom->getId(); 117 LOG( 1, "GLMoleculeObject_atom::resetIndex() - new index is "+toString(atomno)+".");119 LOG(4, "INFO: GLMoleculeObject_atom::resetIndex() - new index is "+toString(atomno)+"."); 118 120 setObjectId(atomno); 119 121 } … … 136 138 void GLMoleculeObject_atom::recieveNotification(Observable *publisher, Notification_ptr notification) 137 139 { 138 LOG(0, "GLMoleculeObject_atom::recieveNotification() - atom " 139 +toString(_atom->getId())+" got notification type " 140 +toString(notification->getChannelNo())+"."); 140 #ifdef LOG_OBSERVER 141 observerLog().addMessage() << "++ Update of Observer "<< observerLog().getName(this) 142 << " received notification from atom " << _atom->getId() << " for channel " 143 << notification->getChannelNo() << "."; 144 #endif 141 145 switch (notification->getChannelNo()) { 142 146 case AtomObservable::ElementChanged: … … 160 164 void GLMoleculeObject_atom::wasClicked() 161 165 { 162 qDebug("GLMoleculeObject_atom: atom %d has been clicked", _atom->getId());166 LOG(4, "INFO: GLMoleculeObject_atom: atom " << _atom->getId() << " has been clicked"); 163 167 emit clicked(_atom->getId()); 164 168 } -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp
r0aa122 r57a770 30 30 31 31 #include "CodePatterns/Assert.hpp" 32 #include "CodePatterns/Log.hpp" 32 33 #include "Atom/atom.hpp" 33 34 #include "Bond/bond.hpp" … … 104 105 // check 105 106 Vector a_rotated = axis.rotateVector(a, alpha); 106 std::cout << "Created cylinder from "// << Position << " to " << OtherPosition107 << a << " to " << a_rotated << " around " << b << " by " << alpha/M_PI*180. << ", respectively." << endl;107 LOG(3, "INFO: Created cylinder from "// << Position << " to " << OtherPosition 108 << a << " to " << a_rotated << " around " << b << " by " << alpha/M_PI*180. << ", respectively."); 108 109 109 110 // set position -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
r0aa122 r57a770 86 86 void GLWorldScene::atomInserted(const atom *_atom) 87 87 { 88 LOG( 0, "GLWorldScene: Received signal atomInserted for atom "+toString(_atom->getId())+".");88 LOG(3, "INFO: GLWorldScene: Received signal atomInserted for atom "+toString(_atom->getId())+"."); 89 89 GLMoleculeObject_atom *atomObject = new GLMoleculeObject_atom(this, _atom); 90 90 AtomNodeMap::iterator iter = AtomsinSceneMap.find(_atom->getId()); … … 105 105 void GLWorldScene::atomRemoved(const atom *_atom) 106 106 { 107 LOG( 0, "GLWorldScene: Received signal atomRemoved for atom "+toString(_atom->getId())+".");107 LOG(3, "INFO: GLWorldScene: Received signal atomRemoved for atom "+toString(_atom->getId())+"."); 108 108 // remove all its bonds 109 109 const BondList& bondlist = _atom->getListOfBonds(); … … 145 145 presentBonds.insert( otherid ); 146 146 } 147 LOG( 0, "We have the following bonds: "+toString(presentBonds)+".");147 LOG(3, "INFO: We have the following bonds: "+toString(presentBonds)+"."); 148 148 149 149 // search for added bonds … … 169 169 } 170 170 } 171 LOG(0, "The following bonds should not be present: "+toString(presentBonds)+"."); 171 if (!presentBonds.empty()) 172 ELOG(2, "The following bonds should not be present: "+toString(presentBonds)+"."); 172 173 173 174 // remove all still presentBonds … … 184 185 void GLWorldScene::bondInserted(const bond *_bond) 185 186 { 186 LOG( 0, "GLWorldScene::bondInserted() - Adding bond "+toString(*_bond)+".");187 LOG(3, "INFO: GLWorldScene::bondInserted() - Adding bond "+toString(*_bond)+"."); 187 188 const double distance = 188 189 _bond->leftatom->getPosition().distance(_bond->rightatom->getPosition())/2.; … … 218 219 void GLWorldScene::bondRemoved(const atomId_t leftnr, const atomId_t rightnr) 219 220 { 220 LOG( 0, "GLWorldScene::bondRemoved() - Removing bond between "+toString(leftnr)+" and "+toString(leftnr)+".");221 LOG(3, "INFO: GLWorldScene::bondRemoved() - Removing bond between "+toString(leftnr)+" and "+toString(leftnr)+"."); 221 222 { 222 223 // left bond … … 268 269 void GLWorldScene::atomClicked(atomId_t no) 269 270 { 270 qDebug("GLWorldScene: atom %d has been clicked.", no);271 LOG(3, "INFO: GLWorldScene - atom " << no << " has been clicked."); 271 272 const atom *Walker = World::getInstance().getAtom(AtomById(no)); 272 273 if (!World::getInstance().isSelected(Walker)) -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
r0aa122 r57a770 83 83 { 84 84 const atom *_atom = World::getInstance().lastChanged<atom>(); 85 LOG(0, "GLWorldView: Received notification that atom "+toString(_atom->getId())+" has been inserted."); 85 #ifdef LOG_OBSERVER 86 observerLog().addMessage() << "++ Observer " << observerLog().getName(this) << " received notification that atom "+toString(_atom->getId())+" has been inserted."; 87 #endif 86 88 emit atomInserted(_atom); 87 89 break; … … 90 92 { 91 93 const atom *_atom = World::getInstance().lastChanged<atom>(); 92 LOG(0, "GLWorldView: Received notification that atom "+toString(_atom->getId())+" has been removed."); 94 #ifdef LOG_OBSERVER 95 observerLog().addMessage() << "++ Observer " << observerLog().getName(this) << " received notification that atom "+toString(_atom->getId())+" has been removed."; 96 #endif 93 97 emit atomRemoved(_atom); 94 98 break;
Note:
See TracChangeset
for help on using the changeset viewer.