source:
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.hpp@
cb5231
Last change on this file since cb5231 was 522c45, checked in by , 9 years ago | |
---|---|
|
|
File size: 1.5 KB |
Rev | Line | |
---|---|---|
[907636] | 1 | /* |
2 | * GLMoleculeObject_atom.hpp | |
3 | * | |
4 | * Created on: Aug 17, 2011 | |
5 | * Author: heber | |
6 | */ | |
7 | ||
8 | #ifndef GLMOLECULEOBJECT_ATOM_HPP_ | |
9 | #define GLMOLECULEOBJECT_ATOM_HPP_ | |
10 | ||
11 | // include config.h | |
12 | #ifdef HAVE_CONFIG_H | |
13 | #include <config.h> | |
14 | #endif | |
15 | ||
16 | #include "GLMoleculeObject.hpp" | |
17 | ||
[7c7c4a] | 18 | #include <vector> |
19 | #include <boost/any.hpp> | |
20 | ||
[534374] | 21 | #include "CodePatterns/ObservedValue.hpp" |
[7188b1] | 22 | |
[917659] | 23 | #include "UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp" |
[65c323] | 24 | #include "UIElements/Qt4/InstanceBoard/QtObservedAtom.hpp" |
[917659] | 25 | #include "types.hpp" |
[907636] | 26 | |
[ce4126] | 27 | class GLWorldScene; |
[2f7988] | 28 | class QtObservedInstanceBoard; |
[ce4126] | 29 | |
[65c323] | 30 | class GLMoleculeObject_atom : public GLMoleculeObject |
[907636] | 31 | { |
[06ebf5] | 32 | Q_OBJECT |
[907636] | 33 | public: |
[026bef] | 34 | GLMoleculeObject_atom( |
35 | QGLSceneNode *mesh[], | |
36 | QObject *parent, | |
[1b07b1] | 37 | QtObservedAtom::ptr &_ObservedAtom |
[026bef] | 38 | ); |
[9c18e4] | 39 | virtual ~GLMoleculeObject_atom(); |
[7188b1] | 40 | |
[f115cc] | 41 | void draw(QGLPainter *painter, const QVector4D &cameraPlane); |
42 | ||
[06ebf5] | 43 | private slots: |
44 | void wasClicked(); | |
[522c45] | 45 | void resetIndex(); |
[534374] | 46 | void resetElement(); |
47 | void resetPosition(); | |
[5cd3a33] | 48 | void resetSelected(); |
[06ebf5] | 49 | |
50 | signals: | |
51 | void clicked(atomId_t); | |
[534374] | 52 | void BondsAdded(const atomId_t _left, const atomId_t _right, const GLMoleculeObject_bond::SideOfBond side); |
53 | void BondsRemoved(const atomId_t _left, const atomId_t _right); | |
[494478] | 54 | void indexChanged(GLMoleculeObject_atom*, const atomId_t _oldid, const atomId_t _newid); |
[907636] | 55 | |
[ce4126] | 56 | private: |
[026bef] | 57 | void init(const atomId_t _id); |
58 | ||
[534374] | 59 | private: |
60 | //!> current list of bonds to compare new onw against for changes | |
[65c323] | 61 | QtObservedAtom::ListOfBonds_t ListOfBonds; |
[8d5fbf1] | 62 | |
[65c323] | 63 | QtObservedAtom::ptr ObservedAtom; |
[907636] | 64 | }; |
65 | ||
66 | ||
67 | ||
68 | #endif /* GLMOLECULEOBJECT_ATOM_HPP_ */ |
Note:
See TracBrowser
for help on using the repository browser.