Changeset f91ef6 for src/UIElements


Ignore:
Timestamp:
Apr 20, 2016, 8:52:03 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:
1d9b6dd
Parents:
0a558d
git-author:
Frederik Heber <heber@…> (03/21/16 22:36:39)
git-committer:
Frederik Heber <heber@…> (04/20/16 08:52:03)
Message:

Changed slots of GLWorldScene and GLWorldView.

Location:
src/UIElements
Files:
7 edited

Legend:

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

    r0a558d rf91ef6  
    246246      {
    247247        const atomId_t _id = _molecule->lastChangedAtomId();
     248        QtObservedAtom::ptr _atom = board.getObservedAtom(_id);
    248249        emit atomcountChanged();
    249         emit atomRemoved(_id, this);
     250        emit atomRemoved(_atom->getIndex(), this);
    250251        emit bondcountChanged();
    251252        emit boundingboxChanged();
  • src/UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp

    r0a558d rf91ef6  
    167167  void boundingboxChanged();
    168168  void atomInserted(QtObservedAtom::ptr, QtObservedMolecule *);
    169   void atomRemoved(const atomId_t, QtObservedMolecule *);
     169  void atomRemoved(ObservedValue_Index_t, QtObservedMolecule *);
    170170  void moleculeRemoved();
    171171  void selectedChanged();
  • src/UIElements/Qt4/QtMainWindow.cpp

    r0a558d rf91ef6  
    161161  connect(glWorldView,SIGNAL(hoverChanged(const atomId_t)), infoBox,SLOT(atomHover(const atomId_t)));
    162162  connect(glWorldView,SIGNAL(hoverChanged(const moleculeId_t, int)), infoBox,SLOT(moleculeHover(const moleculeId_t)));
    163   connect(moleculeList,SIGNAL(moleculesVisibilityChanged(const moleculeId_t,bool)), glWorldView, SIGNAL(moleculesVisibilityChanged(const moleculeId_t,bool)));
     163  connect(moleculeList,SIGNAL(moleculesVisibilityChanged(ObservedValue_Index_t,bool)),
     164      glWorldView, SIGNAL(moleculesVisibilityChanged(ObservedValue_Index_t,bool)));
    164165
    165166  glWorldView->fitCameraToDomain();
  • src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp

    r0a558d rf91ef6  
    9595  connect(board, SIGNAL(moleculeInserted(QtObservedMolecule::ptr)),
    9696      this, SLOT(moleculeSignOn(QtObservedMolecule::ptr)), Qt::DirectConnection);
    97   connect(board, SIGNAL(moleculeRemoved(const moleculeId_t)),
    98       this, SLOT(moleculeSignOff(const moleculeId_t)), Qt::DirectConnection);
    99   connect(board, SIGNAL(moleculeIndexChanged(const moleculeId_t, const moleculeId_t)),
    100       this, SLOT(moleculeIndexChanged(const moleculeId_t, const moleculeId_t)));
     97  connect(board, SIGNAL(moleculeRemoved(ObservedValue_Index_t)),
     98      this, SLOT(moleculeSignOff(ObservedValue_Index_t)), Qt::DirectConnection);
    10199  connect(board, SIGNAL(atomInserted(QtObservedAtom::ptr)),
    102100      this, SLOT(atomInserted(QtObservedAtom::ptr)));
    103   connect(board, SIGNAL(atomRemoved(const atomId_t)),
    104       this, SLOT(atomRemoved(const atomId_t)));
     101  connect(board, SIGNAL(atomRemoved(ObservedValue_Index_t)),
     102      this, SLOT(atomRemoved(ObservedValue_Index_t)));
    105103  connect(this, SIGNAL(insertMolecule(QtObservedMolecule::ptr)),
    106104      this, SLOT(moleculeInserted(QtObservedMolecule::ptr)) );
     
    164162void GLWorldScene::atomInserted(QtObservedAtom::ptr _atom)
    165163{
    166   const atomId_t atomid = _atom->getAtomIndex();
     164  const ObservedValue_Index_t atomid = _atom->getIndex();
    167165  ASSERT( QtObservedAtomMap.find(atomid) == QtObservedAtomMap.end(),
    168       "GLWorldScene::AtomInserted() - atom with id "+toString(atomid)
     166      "GLWorldScene::AtomInserted() - atom with id "+toString(_atom->getAtomIndex())
    169167      +" is already present in QtObservedAtomMap.");
    170168  QtObservedAtomMap[atomid] = _atom;
    171   connect(_atom.get(), SIGNAL(indexChanged(const atomId_t,const atomId_t)),
    172       this, SLOT(atomIndexChanged(const atomId_t,const atomId_t)) );
    173169}
    174170
     
    179175 * @param _atom atom to remove
    180176 */
    181 void GLWorldScene::atomRemoved(const atomId_t _atomid)
     177void GLWorldScene::atomRemoved(ObservedValue_Index_t _atomid)
    182178{
    183179  const QtObservedAtomMap_t::iterator eraseiter = QtObservedAtomMap.find(_atomid);
     
    185181      "GLWorldScene::AtomRemoved() - atom with id "+toString(_atomid)
    186182      +" is not present in QtObservedAtomMap.");
    187   disconnect(eraseiter->second.get(), SIGNAL(indexChanged(const atomId_t,const atomId_t)),
    188       this, SLOT(atomIndexChanged(const atomId_t,const atomId_t)) );
    189183  QtObservedAtomMap.erase(eraseiter);
    190184}
     
    196190void GLWorldScene::moleculesAtomInserted(QtObservedAtom::ptr _atom, QtObservedMolecule * _mol)
    197191{
    198   const atomId_t atomid = _atom->getAtomIndex();
    199   QtObservedMolecule* const atommol = _atom->getAtomMolecule();
     192  const ObservedValue_Index_t atomid = _atom->getIndex();
    200193  // this ASSERT cannot work: The same molecule may get reassigned to a different
    201194  // molecule, when e.g. the time step changes (which triggers an update-molecules).
     
    206199//      +" claims to belong to QtObservedMolecule "+toString(atommol)
    207200//      +" but signal came from QtObservedMolecule "+toString(_mol)+".");
    208   LOG(3, "INFO: GLWorldScene: Received signal atomInserted for atom "+toString(atomid)+".");
    209   const moleculeId_t molid = _mol->getMolIndex();
     201  LOG(3, "INFO: GLWorldScene: Received signal atomInserted for atom " << _atom->getAtomIndex());
     202  const ObservedValue_Index_t molid = _mol->getIndex();
    210203
    211204  // check of molecule is already present
     
    219212    QtObservedMolecule::ptr &checkmol = moliter->second->ObservedMolecule;
    220213    if (checkmol.get() == _mol) {
    221       LOG(3, "INFO: GLWorldScene: Sending signal moleculesAtomInserted for atom "+toString(atomid)+".");
     214      LOG(3, "INFO: GLWorldScene: Sending signal moleculesAtomInserted for atom "
     215          << _atom->getAtomIndex());
    222216      QMetaObject::invokeMethod(moliter->second,        // pointer to a QObject
    223217                                "atomInserted",       // member name (no parameters here)
     
    254248        ASSERT( QtObservedAtomMap[atomid] == _atom,
    255249            "GLWorldScene::moleculesAtomInserted() - atom "+toString(atomid)
    256             +" inserted in molecule "+toString(molid)
     250            +" inserted in molecule "+toString(_mol->getMolIndex())
    257251            +" which does not match atom in QtObservedAtomMap.");
    258         LOG(3, "INFO: GLWorldScene: Placing atomInserted for atom " << atomid
    259              << " and molecule " << molid << " into missed state map.");
     252        LOG(3, "INFO: GLWorldScene: Placing atomInserted for atom " << _atom->getAtomIndex()
     253             << " and molecule " << _mol->getMolIndex() << " into missed state map.");
    260254      }
    261255    }
     
    267261 * @param _atomid atom to remove
    268262 */
    269 void GLWorldScene::moleculesAtomRemoved(const atomId_t _atomid, QtObservedMolecule * _mol)
     263void GLWorldScene::moleculesAtomRemoved(ObservedValue_Index_t _atomid, QtObservedMolecule * _mol)
    270264{
    271265  LOG(3, "INFO: GLWorldScene: Received signal atomRemoved for atom "+toString(_atomid)+".");
    272266
    273   const moleculeId_t molid = _mol->getMolIndex();
     267  const ObservedValue_Index_t molid = _mol->getIndex();
    274268  // check of molecule is already present
    275269  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
     
    282276                                "atomRemoved",       // member name (no parameters here)
    283277                                Qt::QueuedConnection,     // connection type
    284                                 Q_ARG(const atomId_t, _atomid));     // parameters
     278                                Q_ARG(ObservedValue_Index_t, _atomid));     // parameters
    285279    } else {
    286280      // relay atomRemoved to GLMoleculeObject_molecule in RemovedMolecules
     
    301295                                "atomRemoved",       // member name (no parameters here)
    302296                                Qt::QueuedConnection,     // connection type
    303                                 Q_ARG(const atomId_t, _atomid));     // parameters
     297                                Q_ARG(ObservedValue_Index_t, _atomid));     // parameters
    304298    }
    305299  } else {
     
    319313                                "atomRemoved",       // member name (no parameters here)
    320314                                Qt::QueuedConnection,     // connection type
    321                                 Q_ARG(const atomId_t, _atomid));     // parameters
     315                                Q_ARG(ObservedValue_Index_t, _atomid));     // parameters
    322316    } else {
    323317      boost::recursive_mutex::scoped_lock lock(MoleculeMissedStateMap_mutex);
     
    341335  connect(_mol.get(), SIGNAL(atomInserted(QtObservedAtom::ptr, QtObservedMolecule *)),
    342336      this, SLOT(moleculesAtomInserted(QtObservedAtom::ptr, QtObservedMolecule *)) );
    343   connect(_mol.get(), SIGNAL(atomRemoved(const atomId_t, QtObservedMolecule *)),
    344       this, SLOT(moleculesAtomRemoved(const atomId_t, QtObservedMolecule *)) );
    345   const moleculeId_t molid = _mol->getMolIndex();
     337  connect(_mol.get(), SIGNAL(atomRemoved(ObservedValue_Index_t, QtObservedMolecule *)),
     338      this, SLOT(moleculesAtomRemoved(ObservedValue_Index_t, QtObservedMolecule *)) );
     339  const ObservedValue_Index_t molid = _mol->getIndex();
    346340  ASSERT( QtObservedMoleculeMap.find(molid) == QtObservedMoleculeMap.end(),
    347       "GLWorldScene::moleculeSignOn() - molecule with id "+toString(molid)
     341      "GLWorldScene::moleculeSignOn() - molecule with id "+toString(_mol->getMolIndex())
    348342      +" is already present in QtObservedMoleculeMap.");
    349343  QtObservedMoleculeMap[molid] = _mol;
    350   connect(_mol.get(), SIGNAL(indexChanged(const moleculeId_t,const moleculeId_t)),
    351       this, SLOT(moleculeIndexChanged(const moleculeId_t,const moleculeId_t)) );
    352 
    353   LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOn for molecule "+toString(molid)+".");
     344
     345  LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOn for molecule " << _mol->getMolIndex());
    354346
    355347  emit insertMolecule(_mol);
    356348}
    357349
    358 void GLWorldScene::moleculeSignOff(const moleculeId_t _id)
     350void GLWorldScene::moleculeSignOff(ObservedValue_Index_t _id)
    359351{
    360352  const QtObservedMoleculeMap_t::iterator eraseiter = QtObservedMoleculeMap.find(_id);
    361353  ASSERT( eraseiter != QtObservedMoleculeMap.end(),
    362354      "GLWorldScene::moleculeSignOff() - cannot find id "+toString(_id)+" in map.");
    363   disconnect(eraseiter->second.get(), SIGNAL(indexChanged(const moleculeId_t,const moleculeId_t)),
    364       this, SLOT(moleculeIndexChanged(const moleculeId_t,const moleculeId_t)) );
    365355  QtObservedMolecule * mol = eraseiter->second.get();
    366356  QtObservedMoleculeMap.erase(eraseiter);
    367357
    368   LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOff for molecule "+toString(_id)+".");
     358  LOG(3, "INFO: GLWorldScene: Received signal moleculeSignOff for molecule " << mol->getMolIndex());
    369359
    370360  emit removeMolecule(mol);
     
    379369  ASSERT (_mol,
    380370      "GLWorldScene::moleculeInserted() - received shared_ptr for molecule is empty?");
    381   const moleculeId_t molid = _mol->getMolIndex();
    382   LOG(3, "INFO: GLWorldScene: Received signal moleculeInserted for molecule "+toString(molid)+".");
     371  const ObservedValue_Index_t molid = _mol->getIndex();
     372  LOG(3, "INFO: GLWorldScene: Received signal moleculeInserted for molecule "
     373      << _mol->getMolIndex());
    383374
    384375  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
     
    386377  MoleculeNodeMap::const_iterator iter = MoleculesinSceneMap.find(molid);
    387378  ASSERT( iter == MoleculesinSceneMap.end(),
    388       "GLWorldScene::moleculeInserted() - molecule's id "+toString(molid)+" already present.");
     379      "GLWorldScene::moleculeInserted() - molecule's id "+toString(_mol->getMolIndex())
     380      +" already present.");
    389381
    390382  // add new object
    391   LOG(1, "DEBUG: Adding GLMoleculeObject_molecule to id " << molid);
     383  LOG(1, "DEBUG: Adding GLMoleculeObject_molecule to id " << _mol->getMolIndex());
    392384  GLMoleculeObject_molecule *molObject =
    393385      new GLMoleculeObject_molecule(
     
    397389          _mol);
    398390  ASSERT( molObject != NULL,
    399       "GLWorldScene::moleculeInserted - could not create molecule object for "+toString(molid));
     391      "GLWorldScene::moleculeInserted - could not create molecule object for "
     392      +toString(_mol->getMolIndex()));
    400393#ifndef NDEBUG
    401394  std::pair<MoleculeNodeMap::iterator, bool> inserter =
     
    403396  MoleculesinSceneMap.insert( make_pair(molid, molObject) );
    404397  ASSERT(inserter.second,
    405       "GLWorldScene::moleculeInserted() - molecule "+toString(molid)+" already present in scene.");
     398      "GLWorldScene::moleculeInserted() - molecule "+toString(_mol->getMolIndex())
     399      +" already present in scene.");
    406400
    407401  // now handle all state changes that came up before the instantiation
     
    494488void GLWorldScene::moleculeRemoved(QtObservedMolecule* _mol)
    495489{
    496   const moleculeId_t molid = _mol->getMolIndex();
     490  const ObservedValue_Index_t molid = _mol->getIndex();
    497491  LOG(3, "INFO: GLWorldScene: Received signal moleculeRemoved for molecule "+toString(molid)+".");
    498492
     
    501495  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(molid);
    502496  ASSERT ( iter != MoleculesinSceneMap.end(),
    503       "GLWorldScene::moleculeRemoved() - to be removed molecule "+toString(molid)
     497      "GLWorldScene::moleculeRemoved() - to be removed molecule "+toString(_mol->getMolIndex())
    504498      +" is already gone.");
    505499  // check if it's already empty
    506500  const RemovedMoleculesMap_t::iterator emptyiter = EmptyMolecules.find(_mol);
    507501  if (emptyiter != EmptyMolecules.end()) {
    508     LOG(1, "DEBUG: Removing empty GLMoleculeObject_molecule to id " << molid << " from scene.");
     502    LOG(1, "DEBUG: Removing empty GLMoleculeObject_molecule to id " << _mol->getMolIndex()
     503        << " from scene.");
    509504    // it's already empty, remove it
    510505    ASSERT( emptyiter->second == iter->second,
     
    512507        +toString(emptyiter->second)+" and removed molecule "
    513508        +toString(iter->second)+" don't match.");
    514     LOG(1, "DEBUG: Deleting already empty GLMoleculeObject_molecule to id " << molid);
     509    LOG(1, "DEBUG: Deleting already empty GLMoleculeObject_molecule to id " << _mol->getMolIndex());
    515510    GLMoleculeObject_molecule *molObject = emptyiter->second;
    516511    EmptyMolecules.erase(emptyiter);
     
    535530void GLWorldScene::moleculeEmpty(QtObservedMolecule::ptr _mol)
    536531{
    537   const moleculeId_t molid = _mol->getMolIndex();
    538   LOG(3, "INFO: GLWorldScene: Received signal moleculeEmpty for molecule "+toString(molid)+".");
     532  LOG(3, "INFO: GLWorldScene: Received signal moleculeEmpty for molecule "
     533      +toString(_mol->getMolIndex())+".");
    539534
    540535  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
    541536
     537  const ObservedValue_Index_t molid = _mol->getIndex();
    542538  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(molid);
    543539  if ( iter == MoleculesinSceneMap.end()) {
    544540    RemovedMoleculesMap_t::iterator removeiter = RemovedMolecules.find(_mol.get());
    545541    ASSERT ( removeiter != RemovedMolecules.end(),
    546         "GLWorldScene::moleculeEmpty() - to be removed molecule "+toString(molid)
     542        "GLWorldScene::moleculeEmpty() - to be removed molecule "+toString(_mol->getMolIndex())
    547543        +" is neither in MoleculesinSceneMap, nor in RemovedMolecules.");
    548544    // it's noted for removal already, remove it
    549     LOG(1, "DEBUG: Deleting empty GLMoleculeObject_molecule to id " << molid);
     545    LOG(1, "DEBUG: Deleting empty GLMoleculeObject_molecule to id " << _mol->getMolIndex());
    550546    GLMoleculeObject_molecule *molObject = removeiter->second;
    551547    RemovedMolecules.erase(removeiter);
     
    567563}
    568564
    569 void GLWorldScene::atomIndexChanged(const atomId_t _oldid, const atomId_t _newid)
    570 {
    571   if (QtObservedAtomMap.count(_oldid)) {
    572     const QtObservedAtom::ptr atom = QtObservedAtomMap[_oldid];
    573     QtObservedAtomMap.erase(_oldid);
    574     QtObservedAtomMap.insert( std::make_pair(_newid, atom) );
    575   }
    576 }
    577 
    578 void GLWorldScene::moleculeIndexChanged(const moleculeId_t _oldid, const moleculeId_t _newid)
    579 {
    580   {
    581     QtObservedMoleculeMap_t::iterator const olditer = QtObservedMoleculeMap.find(_oldid);
    582     ASSERT ( olditer != QtObservedMoleculeMap.end(),
    583         "GLWorldScene::moleculeIndexChanged() - molecule "
    584         +toString(_oldid)+" not present in QtObservedMoleculeMap.");
    585 #ifndef NDEBUG
    586     QtObservedMoleculeMap_t::iterator const newiter = QtObservedMoleculeMap.find(_newid);
    587     ASSERT ( newiter == QtObservedMoleculeMap.end(),
    588         "GLWorldScene::moleculeIndexChanged() - molecule "
    589         +toString(_newid)+" already present in QtObservedMoleculeMap.");
    590 #endif
    591     const QtObservedMolecule::ptr mol = olditer->second;
    592     QtObservedMoleculeMap.erase(olditer);
    593     QtObservedMoleculeMap[_newid] = mol;
    594   }
    595   {
    596     MoleculeNodeMap::iterator const olditer = MoleculesinSceneMap.find(_oldid);
    597     if ( olditer != MoleculesinSceneMap.end()) {
    598 #ifndef NDEBUG
    599       MoleculeNodeMap::iterator const newiter = MoleculesinSceneMap.find(_newid);
    600       ASSERT ( newiter == MoleculesinSceneMap.end(),
    601           "GLWorldScene::moleculeIndexChanged() - molecule "
    602           +toString(_newid)+" already present in MoleculesinSceneMap.");
    603 #endif
    604       LOG(1, "DEBUG: Changing GLMoleculeObject_molecule in MoleculesinSceneMapfrom "
    605           << _oldid << " to id " << _newid);
    606       GLMoleculeObject_molecule* const molObject = olditer->second;
    607       MoleculesinSceneMap.erase(olditer);
    608       MoleculesinSceneMap[_newid] = molObject;
    609     }
    610   }
    611 }
    612 
    613 void GLWorldScene::moleculesVisibilityChanged(const moleculeId_t _id, bool _visible)
     565void GLWorldScene::moleculesVisibilityChanged(ObservedValue_Index_t _id, bool _visible)
    614566{
    615567  boost::recursive_mutex::scoped_lock lock(MoleculeinSceneMap_mutex);
    616568  MoleculeNodeMap::iterator iter = MoleculesinSceneMap.find(_id);
    617569  ASSERT( iter != MoleculesinSceneMap.end(),
    618       "GLWorldScene::moleculeInserted() - molecule's id "+toString(_id)+" is unknown.");
     570      "GLWorldScene::moleculeInserted() - molecule's id "
     571      +toString(board->getMoleculeIdToIndex(_id))+" is unknown.");
    619572
    620573  GLMoleculeObject_molecule *molObject = iter->second;
  • src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp

    r0a558d rf91ef6  
    9191  void moleculeClicked(moleculeId_t no);
    9292  void moleculeRemoved(QtObservedMolecule* _mol);
    93   void moleculeSignOff(const moleculeId_t _id);
     93  void moleculeSignOff(ObservedValue_Index_t _id);
    9494  void moleculeEmpty(QtObservedMolecule::ptr _mol);
    9595  void moleculeInserted(QtObservedMolecule::ptr);
    9696  void moleculeSignOn(QtObservedMolecule::ptr);
    97   void moleculeIndexChanged(const moleculeId_t _oldid, const moleculeId_t _newid);
    98   void moleculesAtomRemoved(const atomId_t _atomid, QtObservedMolecule * _mol);
     97  void moleculesAtomRemoved(ObservedValue_Index_t _atomid, QtObservedMolecule * _mol);
    9998  void moleculesAtomInserted(QtObservedAtom::ptr, QtObservedMolecule *_mol);
    100   void atomRemoved(const atomId_t _atomid);
     99  void atomRemoved(ObservedValue_Index_t _atomid);
    101100  void atomInserted(QtObservedAtom::ptr);
    102   void atomIndexChanged(const atomId_t _oldid, const atomId_t _newid);
    103101  void setSelectionModeAtom();
    104102  void setSelectionModeMolecule();
     
    106104  void removeShape(const std::string &_name);
    107105//  void update();
    108   void moleculesVisibilityChanged(const moleculeId_t _id, bool _visible);
     106  void moleculesVisibilityChanged(ObservedValue_Index_t _id, bool _visible);
    109107
    110108public:
     
    113111private:
    114112
    115   typedef std::map< moleculeId_t , GLMoleculeObject_molecule* > MoleculeNodeMap;
     113  typedef std::map< ObservedValue_Index_t , GLMoleculeObject_molecule* > MoleculeNodeMap;
    116114  typedef std::map< std::string , GLMoleculeObject_shape* > ShapeNodeMap;
    117115  MoleculeNodeMap MoleculesinSceneMap;
     
    126124    MAX_StateChangeType
    127125  };
    128   typedef std::map< atomId_t, QtObservedAtom::ptr> QtObservedAtomMap_t;
    129   typedef std::map< moleculeId_t, QtObservedMolecule::ptr> QtObservedMoleculeMap_t;
    130   typedef std::multimap< atomId_t, StateChangeType> StateChangeMap_t;
    131   typedef std::map< moleculeId_t, StateChangeMap_t> MoleculeMissedStateMap_t;
     126  typedef std::map< ObservedValue_Index_t, QtObservedAtom::ptr> QtObservedAtomMap_t;
     127  typedef std::map< ObservedValue_Index_t, QtObservedMolecule::ptr> QtObservedMoleculeMap_t;
     128  typedef std::multimap< ObservedValue_Index_t, StateChangeType> StateChangeMap_t;
     129  typedef std::map< ObservedValue_Index_t, StateChangeMap_t> MoleculeMissedStateMap_t;
    132130  //!> map of all missed state changes
    133131  MoleculeMissedStateMap_t MoleculeMissedStateMap;
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp

    r0a558d rf91ef6  
    9898  //connect(this, SIGNAL(changed()), this, SLOT(updateGL()));
    9999  connect(this, SIGNAL(changed()), this, SLOT(sceneChangeSignalled()));
    100   connect(this, SIGNAL(moleculesVisibilityChanged(const moleculeId_t,bool)), worldscene, SLOT(moleculesVisibilityChanged(const moleculeId_t,bool)));
     100  connect(this, SIGNAL(moleculesVisibilityChanged(ObservedValue_Index_t,bool)),
     101      worldscene, SLOT(moleculesVisibilityChanged(ObservedValue_Index_t,bool)));
    101102
    102103  // sign on to changes in the world
  • src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp

    r0a558d rf91ef6  
    2828
    2929class QtObservedInstanceBoard;
     30
     31#include "UIElements/Qt4/InstanceBoard/ObservedValue_types.hpp"
    3032
    3133/** This class is the view on the 3D representation of the World, i.e. the whole
     
    6870  void ShapeAdded(const std::string &);
    6971  void ShapeRemoved(const std::string &);
    70   void moleculesVisibilityChanged(const moleculeId_t,bool);
     72  void moleculesVisibilityChanged(ObservedValue_Index_t,bool);
    7173
    7274protected:
Note: See TracChangeset for help on using the changeset viewer.