kalzium
Avogadro::Primitive Class Reference
#include <primitive.h>

Detailed Description
Base class for all primitives (Molecule, Atom, Bond, Residue, ...).
Definition at line 47 of file src/primitive.h.
Public Types | |
| enum | Type { OtherType = 0, MoleculeType, AtomType, BondType, ResidueType, SurfaceType, PlaneType, GridType, LastType, FirstType = OtherType } |
Public Slots | |
| void | toggleSelected () |
Signals | |
| void | updated () |
Public Member Functions | |
| Primitive (QObject *parent=0) | |
| Primitive (enum Type type, QObject *parent=0) | |
| virtual | ~Primitive () |
| bool | isSelected () const |
| void | setSelected (bool selected) |
| void | update () |
| enum Type | type () const |
Protected Member Functions | |
| Primitive (PrimitivePrivate &dd, QObject *parent=0) | |
| Primitive (PrimitivePrivate &dd, enum Type type, QObject *parent=0) | |
Protected Attributes | |
| PrimitivePrivate *const | d_ptr |
Properties | |
| bool | selected |
| enum | Type |
Member Enumeration Documentation
This enum allows us to iterate through the various types of primitives.
Holds the primitive type.
- Enumerator:
-
OtherType Untyped Primitive. MoleculeType Molecule Primitive. AtomType Atom Primitive. BondType Bond Primitive. ResidueType Residue Primitive. SurfaceType Surface Primitive. PlaneType Plane Primitive. GridType Grid Primitive. LastType End Placeholder. FirstType First Placeholder.
Definition at line 59 of file src/primitive.h.
Constructor & Destructor Documentation
| Avogadro::Primitive::Primitive | ( | QObject * | parent = 0 |
) |
Default constructor.
- Parameters:
-
parent the object parent
Definition at line 44 of file primitive.cpp.
Constructor.
- Parameters:
-
type the primitive type parent the object parent
Definition at line 46 of file primitive.cpp.
| Avogadro::Primitive::~Primitive | ( | ) | [virtual] |
| Avogadro::Primitive::Primitive | ( | PrimitivePrivate & | dd, | |
| QObject * | parent = 0 | |||
| ) | [protected] |
Definition at line 52 of file primitive.cpp.
| Avogadro::Primitive::Primitive | ( | PrimitivePrivate & | dd, | |
| enum Type | type, | |||
| QObject * | parent = 0 | |||
| ) | [protected] |
Definition at line 54 of file primitive.cpp.
Member Function Documentation
| bool Avogadro::Primitive::isSelected | ( | ) | const |
| void Avogadro::Primitive::setSelected | ( | bool | selected | ) |
| void Avogadro::Primitive::update | ( | ) |
Function used to push changes to a primitive to the rest of the system.
At this time there is no way (other than this) to generate a signal when properties of a primitive change.
In the case of the Atom primitive, this should be called when changes to coordinates have been made.
Reimplemented in Avogadro::Molecule.
Definition at line 89 of file primitive.cpp.
| enum Primitive::Type Avogadro::Primitive::type | ( | ) | const |
| void Avogadro::Primitive::toggleSelected | ( | ) | [slot] |
| void Avogadro::Primitive::updated | ( | ) | [signal] |
Emitted when the primitive has been updated.
Member Data Documentation
PrimitivePrivate* const Avogadro::Primitive::d_ptr [protected] |
Definition at line 153 of file src/primitive.h.
Property Documentation
Avogadro::Primitive::selected [read, write] |
Holds whether the primitive object has been selected by the user.
Defaults to false.
- See also:
- isSelected()
Definition at line 50 of file src/primitive.h.
enum Avogadro::Primitive::Type [read] |
Definition at line 51 of file src/primitive.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference