Changeset 8b59dd for src/UIElements


Ignore:
Timestamp:
Feb 26, 2016, 9:46:19 AM (9 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:
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)
Message:

Removed last...removed in QtObservedInstanceBoard.

  • this does not do anything useful anymore, we may just pass the id we obtained from ObservedValuesContainer as Qt signal.
Location:
src/UIElements/Qt4/InstanceBoard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.cpp

    r92af1b r8b59dd  
    6565      "molecule",
    6666      *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))
    7068{
    7169  qRegisterMetaType<QtObservedAtom::ptr>("QtObservedAtom::ptr");
     
    7472  // be first (besides ObservedValues to know about new insertions)
    7573  World::getInstance().signOn(this, World::AtomInserted, GlobalObservableInfo::PriorityLevel(int(-10)));
    76   World::getInstance().signOn(this, World::AtomRemoved, GlobalObservableInfo::PriorityLevel(int(-10)));
    7774  World::getInstance().signOn(this, World::MoleculeInserted, GlobalObservableInfo::PriorityLevel(int(-10)));
    78   World::getInstance().signOn(this, World::MoleculeRemoved, GlobalObservableInfo::PriorityLevel(int(-10)));
    7975  WorldSignedOn = true;
    8076}
     
    8480  if (WorldSignedOn) {
    8581    World::getInstance().signOff(this, World::AtomInserted);
    86     World::getInstance().signOff(this, World::AtomRemoved);
    8782    World::getInstance().signOff(this, World::MoleculeInserted);
    88     World::getInstance().signOff(this, World::MoleculeRemoved);
    8983  }
    9084  // sign off from all remaining molecules and atoms
     
    161155          ELOG(1, "QtObservedInstanceBoard got MoleculeInserted for unknown molecule id " << _id);
    162156        }
    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 dropped
    170         lastremovedmolecule = _id;
    171157        break;
    172158      }
     
    195181        break;
    196182      }
    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 dropped
    202         lastremovedatom = _id;
    203         break;
    204       }
    205183      default:
    206184        ASSERT(0, "QtObservedInstanceBoard::recieveNotification() - we cannot get here for World.");
     
    259237void QtObservedInstanceBoard::atomcountsubjectKilled(const atomId_t _atomid)
    260238{
    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);
    267241}
    268242
    269243void QtObservedInstanceBoard::moleculecountsubjectKilled(const moleculeId_t _molid)
    270244{
    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);
    277247}
    278248
  • src/UIElements/Qt4/InstanceBoard/QtObservedInstanceBoard.hpp

    r92af1b r8b59dd  
    135135  //!> container with all ObservedValues for each molecule, associated by id
    136136  ObservedValuesContainer<QtObservedMolecule, moleculeId_t> moleculeObservedValues;
    137 
    138   //!> note down atom id of last removed atom to drop its ObservedValues
    139   atomId_t lastremovedatom;
    140 
    141   //!> note down molecule id of last removed molecule to drop its ObservedValues
    142   moleculeId_t lastremovedmolecule;
    143137};
    144138
Note: See TracChangeset for help on using the changeset viewer.