- Timestamp:
- Oct 6, 2011, 4:06:10 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:
- 838cd0
- Parents:
- a099d3
- git-author:
- Frederik Heber <heber@…> (09/02/11 08:42:34)
- git-committer:
- Frederik Heber <heber@…> (10/06/11 16:06:10)
- Location:
- src/UIElements/Views/Qt4/Qt3D
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
ra099d3 r65487f 92 92 connect (atomObject, SIGNAL(BondsChanged(const atom *)), this, SLOT(bondsChanged(const atom *))); 93 93 bondsChanged(_atom); 94 emit change d();94 emit changeOccured(); 95 95 } 96 96 … … 116 116 AtomsinSceneMap.erase(iter); 117 117 delete atomObject; 118 emit change d();118 emit changeOccured(); 119 119 } 120 120 … … 205 205 BondIdsinSceneMap.insert( Rightids ); 206 206 } 207 emit change d();207 emit changeOccured(); 208 208 } 209 209 … … 239 239 "GLWorldScene::bondRemoved() - could not find (" 240 240 +toString(leftnr)+"-"+toString(rightnr)+" in BondIdsinSceneMap."); 241 emit change d();241 emit changeOccured(); 242 242 } 243 243 -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
ra099d3 r65487f 53 53 signals: 54 54 void changed(); 55 void changeOccured(); 55 56 void pressed(); 56 57 void released(); -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
ra099d3 r65487f 31 31 32 32 GLWorldView::GLWorldView(QWidget *parent) 33 : QGLView(parent), Observer("GLWorldView"), worldscene(NULL)33 : QGLView(parent), Observer("GLWorldView"), worldscene(NULL), changesPresent(false) 34 34 { 35 worldscene = new GLWorldScene(this); 36 37 setOption(QGLView::ObjectPicking, true); 38 39 connect(worldscene, SIGNAL(changed()), this, SLOT(updateGL())); 40 connect(this, SIGNAL(atomInserted(const atom *)), worldscene, SLOT(atomInserted(const atom *))); 41 connect(this, SIGNAL(atomRemoved(const atom *)), worldscene, SLOT(atomRemoved(const atom *))); 42 connect(this, SIGNAL(changed()), this, SLOT(updateGL())); 43 44 // sign on to changes in the world 45 World::getInstance().signOn(this); 46 World::getInstance().signOn(this, World::getInstance().getChannel(World::AtomInserted)); 47 World::getInstance().signOn(this, World::getInstance().getChannel(World::AtomRemoved)); 35 worldscene = new GLWorldScene(this); 36 37 setOption(QGLView::ObjectPicking, true); 38 39 connect(worldscene, SIGNAL(changeOccured()), this, SLOT(changeSignalled())); 40 connect(worldscene, SIGNAL(changed()), this, SIGNAL(changed())); 41 connect(this, SIGNAL(atomInserted(const atom *)), worldscene, SLOT(atomInserted(const atom *))); 42 connect(this, SIGNAL(atomRemoved(const atom *)), worldscene, SLOT(atomRemoved(const atom *))); 43 connect(this, SIGNAL(changed()), this, SLOT(updateGL())); 44 45 // sign on to changes in the world 46 World::getInstance().signOn(this); 47 World::getInstance().signOn(this, World::getInstance().getChannel(World::AtomInserted)); 48 World::getInstance().signOn(this, World::getInstance().getChannel(World::AtomRemoved)); 48 49 } 49 50 … … 100 101 void GLWorldView::initializeGL(QGLPainter *painter) 101 102 { 102 worldscene->initialize(this, painter); 103 worldscene->initialize(this, painter); 104 changesPresent = false; 103 105 } 104 106 105 107 void GLWorldView::paintGL(QGLPainter *painter) 106 108 { 107 worldscene->draw(painter); 109 if (changesPresent) { 110 initializeGL(painter); 111 changesPresent = false; 112 } 113 worldscene->draw(painter); 108 114 } 109 115 110 116 void GLWorldView::keyPressEvent(QKeyEvent *e) 111 117 { 112 if (e->key() == Qt::Key_Tab) { 113 // The Tab key turns the ShowPicking option on and off, 114 // which helps show what the pick buffer looks like. 115 setOption(QGLView::ShowPicking, ((options() & QGLView::ShowPicking) == 0)); 116 updateGL(); 117 } 118 QGLView::keyPressEvent(e); 118 if (e->key() == Qt::Key_Tab) { 119 // The Tab key turns the ShowPicking option on and off, 120 // which helps show what the pick buffer looks like. 121 setOption(QGLView::ShowPicking, ((options() & QGLView::ShowPicking) == 0)); 122 updateGL(); 123 } 124 QGLView::keyPressEvent(e); 125 } 126 127 void GLWorldView::changeSignalled() 128 { 129 changesPresent = true; 119 130 } 120 131 -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
ra099d3 r65487f 41 41 42 42 public slots: 43 void changeSignalled(); 43 44 44 45 signals: … … 54 55 private: 55 56 GLWorldScene *worldscene; 57 58 bool changesPresent; 56 59 }; 57 60
Note:
See TracChangeset
for help on using the changeset viewer.