Changeset 57a770 for src/UIElements


Ignore:
Timestamp:
Jan 4, 2012, 2:28:40 PM (13 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

Corrected verbosity levels of GLMoleculeObject..., GLWorldScene, and ..View.

  • placede messages from Observer's to observerLog.
Location:
src/UIElements/Views/Qt4/Qt3D
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp

    r0aa122 r57a770  
    5656  resetProperties();
    5757
    58   std::cout << "Created sphere for atom " << _atom->getId() << "." << endl;
     58  LOG(2, "INFO: Created sphere for atom " << _atom->getId() << ".");
    5959
    6060  connect( this, SIGNAL(clicked()), this, SLOT(wasClicked()));
     
    7171void GLMoleculeObject_atom::update(Observable *publisher)
    7272{
    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
    7476  resetProperties();
    7577}
     
    7880{
    7981  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)+".");
    8183  setPosition(QVector3D(Position[0], Position[1], Position[2]));
    8284}
     
    9092    elementno = 1;
    9193  }
    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)+".");
    9395
    9496  // set materials
     
    115117{
    116118  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)+".");
    118120  setObjectId(atomno);
    119121}
     
    136138void GLMoleculeObject_atom::recieveNotification(Observable *publisher, Notification_ptr notification)
    137139{
    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
    141145  switch (notification->getChannelNo()) {
    142146    case AtomObservable::ElementChanged:
     
    160164void GLMoleculeObject_atom::wasClicked()
    161165{
    162   qDebug("GLMoleculeObject_atom: atom %d has been clicked", _atom->getId());
     166  LOG(4, "INFO: GLMoleculeObject_atom: atom " << _atom->getId() << " has been clicked");
    163167  emit clicked(_atom->getId());
    164168}
  • src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp

    r0aa122 r57a770  
    3030
    3131#include "CodePatterns/Assert.hpp"
     32#include "CodePatterns/Log.hpp"
    3233#include "Atom/atom.hpp"
    3334#include "Bond/bond.hpp"
     
    104105  // check
    105106  Vector a_rotated = axis.rotateVector(a, alpha);
    106   std::cout << "Created cylinder from "// << Position << " to " << OtherPosition
    107       << 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.");
    108109
    109110  // set position
  • src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp

    r0aa122 r57a770  
    8686void GLWorldScene::atomInserted(const atom *_atom)
    8787{
    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())+".");
    8989  GLMoleculeObject_atom *atomObject = new GLMoleculeObject_atom(this, _atom);
    9090  AtomNodeMap::iterator iter = AtomsinSceneMap.find(_atom->getId());
     
    105105void GLWorldScene::atomRemoved(const atom *_atom)
    106106{
    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())+".");
    108108  // remove all its bonds
    109109  const BondList& bondlist = _atom->getListOfBonds();
     
    145145    presentBonds.insert( otherid );
    146146  }
    147   LOG(0, "We have the following bonds: "+toString(presentBonds)+".");
     147  LOG(3, "INFO: We have the following bonds: "+toString(presentBonds)+".");
    148148
    149149  // search for added bonds
     
    169169    }
    170170  }
    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)+".");
    172173
    173174  // remove all still presentBonds
     
    184185void GLWorldScene::bondInserted(const bond *_bond)
    185186{
    186   LOG(0, "GLWorldScene::bondInserted() - Adding bond "+toString(*_bond)+".");
     187  LOG(3, "INFO: GLWorldScene::bondInserted() - Adding bond "+toString(*_bond)+".");
    187188  const double distance =
    188189      _bond->leftatom->getPosition().distance(_bond->rightatom->getPosition())/2.;
     
    218219void GLWorldScene::bondRemoved(const atomId_t leftnr, const atomId_t rightnr)
    219220{
    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)+".");
    221222  {
    222223    // left bond
     
    268269void GLWorldScene::atomClicked(atomId_t no)
    269270{
    270    qDebug("GLWorldScene: atom %d has been clicked.", no);
     271   LOG(3, "INFO: GLWorldScene - atom " << no << " has been clicked.");
    271272   const atom *Walker = World::getInstance().getAtom(AtomById(no));
    272273   if (!World::getInstance().isSelected(Walker))
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp

    r0aa122 r57a770  
    8383    {
    8484      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
    8688      emit atomInserted(_atom);
    8789      break;
     
    9092    {
    9193      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
    9397      emit atomRemoved(_atom);
    9498      break;
Note: See TracChangeset for help on using the changeset viewer.