source: src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp@ e4b13a

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
Last change on this file since e4b13a was 96f14a, checked in by Frederik Heber <heber@…>, 9 years ago

Modified all GLMoleculeObjects and GLWorldScene to the new QtObservedBond.

  • GLWorldScene transmits bondInserted/bondRemoved similarly to those for the atoms to the molecule if aLready present and otherwise into the MissedStateMap.
  • Property mode set to 100644
File size: 2.9 KB
RevLine 
[c67518]1/*
2 * GLMoleculeObject_molecule.hpp
3 *
4 * Created on: Mar 30, 2012
5 * Author: ankele
6 */
7
8#ifndef GLMOLECULEOBJECT_MOLECULE_HPP_
9#define GLMOLECULEOBJECT_MOLECULE_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include "GLMoleculeObject.hpp"
17
[6c16a0]18#include <Qt3D/qgeometrydata.h>
19
[494478]20#include "UIElements/Qt4/InstanceBoard/QtObservedMolecule.hpp"
21
22#include <map>
23
[8688ef]24#include <boost/function.hpp>
[7c7c4a]25
[c67518]26#include "GLMoleculeObject_bond.hpp"
27
[494478]28#include "types.hpp"
[e39e7a]29
[c67518]30class atom;
31class bond;
[494478]32class molecule;
[8c001a]33class GLMoleculeObject_atom;
34class GLWorldScene;
[2f7988]35class QtObservedInstanceBoard;
[c67518]36
[494478]37class GLMoleculeObject_molecule : public GLMoleculeObject
[c67518]38{
39 Q_OBJECT
40public:
[026bef]41 GLMoleculeObject_molecule(
42 QObject *parent,
[494478]43 QtObservedInstanceBoard &_board,
[1b07b1]44 QtObservedMolecule::ptr &_ObservedMolecule);
[026bef]45 GLMoleculeObject_molecule(
46 QGLSceneNode *mesh[],
47 QObject *parent,
[494478]48 QtObservedInstanceBoard &_board,
[1b07b1]49 QtObservedMolecule::ptr &_ObservedMolecule);
[c67518]50 virtual ~GLMoleculeObject_molecule();
51
[8c001a]52 void initialize(QGLView *view, QGLPainter *painter);
53 void draw(QGLPainter *painter, const QVector4D &cameraPlane);
54
55 typedef std::pair< atomId_t, atomId_t> BondIds;
56 friend std::ostream &operator<<(std::ostream &ost, const BondIds &t);
57
58signals:
59 void changed();
60 void changeOccured();
[704d59]61 void hoverChanged(const atomId_t);
62 void hoverChanged(const moleculeId_t, int);
[e29427]63 void atomClicked(atomId_t);
64 void moleculeClicked(moleculeId_t);
65 void moleculeEmptied(QtObservedMolecule::ptr);
[6c16a0]66 void IsSelectedChanged();
[8c001a]67
68private slots:
69 //!> grant GLWorldScene access to private slots
70 friend class GLWorldScene;
71
[9a7ef9]72 void wasClicked();
[1b07b1]73 void atomInserted(QtObservedAtom::ptr _atom);
[76c238]74 void atomRemoved(ObservedValue_Index_t _id);
[96f14a]75 void bondInserted(QtObservedBond::ptr _bond);
76 void bondRemoved(ObservedValue_Index_t _id);
[8c001a]77 void hoverChangedSignalled(GLMoleculeObject *ob);
78
[34e7fdb]79 void setVisible(bool value);
80
[6c16a0]81 void resetTesselationHull();
82 void resetBoundingBox();
[1c0961]83 void resetIndex(const moleculeId_t, const moleculeId_t);
[5cd3a33]84 void resetSelected();
[015f8c]85
[c67518]86private:
[8c001a]87
[96f14a]88 void init();
[494478]89
90private:
91
[6c16a0]92 //!> the Observable we are signed on, also indicates whether we are sign on (not NULL)
93 const Observable * owner;
94
[494478]95 QGeometryData updateTesselationHull() const;
[6c16a0]96
97 //!> list of channels when tesselation hull needs to update
98 static const Observable::channels_t HullChannels;
[7c7c4a]99
[6c16a0]100 //!> contains current version of the tesselation hull on request
[3fe318]101 QGeometryData TesselationHull;
[6c16a0]102
[76c238]103 typedef std::map< ObservedValue_Index_t, GLMoleculeObject_atom* > AtomNodeMap;
[96f14a]104 typedef std::multimap< ObservedValue_Index_t, GLMoleculeObject_bond* > BondNodeMap;
[8c001a]105 AtomNodeMap AtomsinSceneMap;
106 BondNodeMap BondsinSceneMap;
107
[704d59]108 atomId_t hoverAtomId;
[8d5fbf1]109
[494478]110 QtObservedInstanceBoard &board;
[8d5fbf1]111
[494478]112 QtObservedMolecule::ptr ObservedMolecule;
[c67518]113};
114
[8c001a]115std::ostream &operator<<(std::ostream &ost, const GLMoleculeObject_molecule::BondIds &t);
[c67518]116
117
118#endif /* GLMOLECULEOBJECT_MOLECULE_HPP_ */
Note: See TracBrowser for help on using the repository browser.