Changeset 407638e for src/UIElements/Views/Qt4
- Timestamp:
- Jul 17, 2012, 12:17:27 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:
- 7b6bcfe
- Parents:
- 859a00
- git-author:
- Michael Ankele <ankele@…> (06/18/12 13:33:33)
- git-committer:
- Michael Ankele <ankele@…> (07/17/12 12:17:27)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp
r859a00 r407638e 189 189 } else if (e->type() == QEvent::Enter) { 190 190 m_hovering = true; 191 emit hoverChanged( );191 emit hoverChanged(this); 192 192 } else if (e->type() == QEvent::Leave) { 193 193 m_hovering = false; 194 emit hoverChanged( );194 emit hoverChanged(NULL); 195 195 } 196 196 return QObject::event(e); -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.hpp
r859a00 r407638e 78 78 void clicked(); 79 79 void doubleClicked(); 80 void hoverChanged( );80 void hoverChanged(GLMoleculeObject *ob); 81 81 void selectionChanged(); 82 82 void changed(); -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
r859a00 r407638e 58 58 59 59 GLWorldScene::GLWorldScene(QObject *parent) 60 : QObject(parent) 60 : QObject(parent), 61 hoverAtom(NULL) 61 62 { 62 63 QGLBuilder builder0; … … 138 139 connect (atomObject, SIGNAL(clicked(atomId_t)), this, SLOT(atomClicked(atomId_t))); 139 140 connect (atomObject, SIGNAL(changed()), this, SIGNAL(changed())); 140 connect (atomObject, SIGNAL(hoverChanged()), this, SIGNAL(changed())); 141 connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SIGNAL(changed())); 142 connect (atomObject, SIGNAL(hoverChanged(GLMoleculeObject *)), this, SLOT(hoverChangedSignalled(GLMoleculeObject *))); 141 143 connect (atomObject, SIGNAL(selectionChanged()), this, SIGNAL(changed())); 142 144 connect (atomObject, SIGNAL(BondsInserted(const bond *, const GLMoleculeObject_bond::SideOfBond)), this, SLOT(bondInserted(const bond *, const GLMoleculeObject_bond::SideOfBond))); … … 338 340 } 339 341 342 void GLWorldScene::hoverChangedSignalled(GLMoleculeObject *ob) 343 { 344 // Find the atom, ob corresponds to. 345 hoverAtom = NULL; 346 GLMoleculeObject_atom *atomObject = dynamic_cast<GLMoleculeObject_atom *>(ob); 347 if (atomObject){ 348 for (AtomNodeMap::iterator iter = AtomsinSceneMap.begin();iter != AtomsinSceneMap.end(); ++ iter){ 349 if (iter->second == atomObject) 350 hoverAtom = World::getInstance().getAtom(AtomById(iter->first)); 351 } 352 } 353 354 // Propagate signal. 355 emit hoverChanged(hoverAtom); 356 } 357 -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
r859a00 r407638e 71 71 void clicked(atomId_t); 72 72 void doubleClicked(); 73 void hoverChanged( );73 void hoverChanged(const atom*); 74 74 75 75 private slots: … … 83 83 void setSelectionModeAtom(); 84 84 void setSelectionModeMolecule(); 85 void hoverChangedSignalled(GLMoleculeObject *ob); 85 86 86 87 private: … … 105 106 106 107 SelectionModeType selectionMode; 108 const atom *hoverAtom; 107 109 }; 108 110 -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
r859a00 r407638e 57 57 connect(worldscene, SIGNAL(changeOccured()), this, SLOT(changeSignalled())); 58 58 connect(worldscene, SIGNAL(changed()), this, SIGNAL(changed())); 59 connect(worldscene, SIGNAL(hoverChanged(const atom *)), this, SLOT(sceneHoverSignalled(const atom *))); 59 60 connect(this, SIGNAL(atomInserted(const atom *)), worldscene, SLOT(atomInserted(const atom *))); 60 61 connect(this, SIGNAL(atomRemoved(const atom *)), worldscene, SLOT(atomRemoved(const atom *))); … … 526 527 } 527 528 529 void GLWorldView::sceneHoverSignalled(const atom *_atom) 530 { 531 emit hoverChanged(_atom); 532 } 533 528 534 529 535 //#include <GL/glu.h> -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
r859a00 r407638e 51 51 void checkChanges(); 52 52 void sceneChangeSignalled(); 53 void sceneHoverSignalled(const atom *_atom); 53 54 54 55 signals: … … 59 60 void moleculeRemoved(const molecule *_molecule); 60 61 void worldSelectionChanged(); 62 void hoverChanged(const atom *_atom); 61 63 62 64 protected:
Note:
See TracChangeset
for help on using the changeset viewer.