|
Last change
on this file since 88bb6b was 917659, checked in by Frederik Heber <heber@…>, 13 years ago |
|
FIX: GLMoleculeObject_atom just stores the atom's id, now ptr.
|
-
Property mode
set to
100644
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 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 |
|
|---|
| 18 | #include "CodePatterns/Observer/Observer.hpp"
|
|---|
| 19 |
|
|---|
| 20 | #include "Bond/bond.hpp"
|
|---|
| 21 | #include "UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp"
|
|---|
| 22 | #include "types.hpp"
|
|---|
| 23 |
|
|---|
| 24 | class GLMoleculeObject_atom : public GLMoleculeObject, public Observer
|
|---|
| 25 | {
|
|---|
| 26 | Q_OBJECT
|
|---|
| 27 | public:
|
|---|
| 28 | GLMoleculeObject_atom(QGLSceneNode *mesh[], QObject *parent, const atomId_t id);
|
|---|
| 29 | virtual ~GLMoleculeObject_atom();
|
|---|
| 30 |
|
|---|
| 31 | // Observer functions
|
|---|
| 32 | void update(Observable *publisher);
|
|---|
| 33 | void subjectKilled(Observable *publisher);
|
|---|
| 34 | void recieveNotification(Observable *publisher, Notification_ptr notification);
|
|---|
| 35 |
|
|---|
| 36 | private slots:
|
|---|
| 37 | void wasClicked();
|
|---|
| 38 |
|
|---|
| 39 | signals:
|
|---|
| 40 | void clicked(atomId_t);
|
|---|
| 41 | void BondsInserted(const bond::ptr _bond, const GLMoleculeObject_bond::SideOfBond side);
|
|---|
| 42 | void indexChanged(GLMoleculeObject_atom *ob, int oldId, int newId);
|
|---|
| 43 |
|
|---|
| 44 | public:
|
|---|
| 45 | void resetPosition();
|
|---|
| 46 |
|
|---|
| 47 | private:
|
|---|
| 48 | void resetElement();
|
|---|
| 49 | void resetIndex();
|
|---|
| 50 | void resetProperties();
|
|---|
| 51 |
|
|---|
| 52 | const atomId_t atomicid;
|
|---|
| 53 | };
|
|---|
| 54 |
|
|---|
| 55 |
|
|---|
| 56 |
|
|---|
| 57 | #endif /* GLMOLECULEOBJECT_ATOM_HPP_ */
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.