Avogadro
1.1.0
|
Base class for all primitives (Molecule, Atom, Bond, Residue, ...). More...
#include <avogadro/primitive.h>
Public Types | |
enum | Type { OtherType = 0, MoleculeType, AtomType, BondType, ResidueType, ChainType, FragmentType, SurfaceType, MeshType, CubeType, PlaneType, GridType, PointType, LineType, VectorType, NonbondedType, TextType, LastType, FirstType = OtherType } |
Signals | |
void | updated () |
Public Member Functions | |
Primitive (QObject *parent=0) | |
Primitive (Type type, QObject *parent=0) | |
virtual | ~Primitive () |
void | update () |
Type | type () const |
unsigned long | id () const |
unsigned long | index () const |
Protected Member Functions | |
void | setId (unsigned long m_id) |
void | setIndex (unsigned long m_index) |
Primitive (PrimitivePrivate &dd, QObject *parent=0) | |
Primitive (PrimitivePrivate &dd, Type type, QObject *parent=0) | |
Protected Attributes | |
PrimitivePrivate *const | d_ptr |
enum Primitive::Type | m_type |
unsigned long | m_id |
unsigned long | m_index |
Properties | |
Type | type |
This enum allows us to iterate through the various types of primitives.
Holds the primitive type
OtherType |
Untyped Primitive. |
MoleculeType | |
AtomType | |
BondType | |
ResidueType | |
ChainType |
Chain Primitive (i.e., a set of residues) |
FragmentType |
Fragment Primitve. |
SurfaceType |
Surface Primitive. |
MeshType | |
CubeType | |
PlaneType |
Plane Primitive. |
GridType |
Grid Primitive. |
PointType |
Points (i.e., non-atoms) |
LineType |
Lines. |
VectorType |
Vectors (i.e., arrows, dipole moments) |
NonbondedType |
Non-bonded interactions (i.e., non-bond connections) |
TextType |
Text annoations. |
LastType |
End Placeholder. |
FirstType |
First Placeholder. |
Reimplemented in Avogadro::Cube.
Avogadro::Primitive::Primitive | ( | QObject * | parent = 0 | ) |
Default constructor.
parent | the object parent |
Avogadro::Primitive::Primitive | ( | Type | type, |
QObject * | parent = 0 |
||
) | [explicit] |
Constructor
type | the primitive type |
parent | the object parent |
Avogadro::Primitive::~Primitive | ( | ) | [virtual] |
Destructor
unsigned long Avogadro::Primitive::id | ( | ) | const [inline] |
Referenced by Avogadro::Molecule::addAtom(), Avogadro::Molecule::addBond(), Avogadro::Atom::addBond(), Avogadro::Molecule::addCube(), Avogadro::Molecule::addMesh(), Avogadro::GLWidget::addNamedSelection(), Avogadro::Molecule::addResidue(), Avogadro::Molecule::addRing(), Avogadro::ZMatrix::addRow(), Avogadro::IDList::append(), Avogadro::Molecule::bond(), Avogadro::Protein::chainResidues(), Avogadro::Molecule::computeGeomInfo(), Avogadro::IDList::contains(), Avogadro::Molecule::copyAtomsAndBonds(), Avogadro::Molecule::operator+=(), Avogadro::IDList::removeAll(), Avogadro::Molecule::removeAtom(), Avogadro::Molecule::removeBond(), Avogadro::Atom::removeBond(), Avogadro::Molecule::removeCube(), Avogadro::Molecule::removeHydrogens(), Avogadro::Molecule::removeMesh(), Avogadro::Molecule::removeResidue(), Avogadro::Molecule::removeRing(), Avogadro::Molecule::setAtomPos(), Avogadro::Bond::setBegin(), Avogadro::Residue::setChainID(), Avogadro::Bond::setEnd(), Avogadro::Animation::setFrame(), setId(), Avogadro::Molecule::setOBMol(), Avogadro::Atom::setResidue(), and Avogadro::Molecule::translate().
unsigned long Avogadro::Primitive::index | ( | ) | const [inline] |
Referenced by Avogadro::Molecule::addConformer(), Avogadro::Molecule::addHydrogens(), Avogadro::Residue::atomId(), Avogadro::Molecule::energy(), Avogadro::Protein::isHelix(), Avogadro::Protein::isSheet(), Avogadro::NeighborList::nbrs(), Avogadro::Molecule::OBMol(), Avogadro::Molecule::operator+=(), Avogadro::Residue::removeAtom(), Avogadro::Fragment::removeAtom(), Avogadro::Molecule::removeAtom(), Avogadro::Fragment::removeBond(), Avogadro::Molecule::removeBond(), Avogadro::Atom::removeBond(), Avogadro::Molecule::removeCube(), Avogadro::Molecule::removeMesh(), Avogadro::Molecule::removeResidue(), Avogadro::Molecule::removeRing(), Avogadro::Residue::setAtomId(), Avogadro::Molecule::setConformer(), Avogadro::Molecule::setEnergy(), Avogadro::Atom::setGroupIndex(), setIndex(), Avogadro::Molecule::setOBMol(), Avogadro::Cube::setValue(), and Avogadro::Cube::value().
void Avogadro::Primitive::setId | ( | unsigned long | m_id | ) | [protected] |
Set the id of the primitive, used to uniquely indentify the primitive.
References id().
Referenced by Avogadro::Molecule::addAtom(), Avogadro::Molecule::addBond(), Avogadro::Molecule::addCube(), Avogadro::Molecule::addMesh(), Avogadro::Molecule::addResidue(), Avogadro::Molecule::addRing(), and Avogadro::Molecule::operator=().
void Avogadro::Primitive::setIndex | ( | unsigned long | m_index | ) | [protected] |
Set the index of the primitive, starting at zero.
References index().
Referenced by Avogadro::Molecule::addAtom(), Avogadro::Molecule::addBond(), Avogadro::Molecule::addCube(), Avogadro::Molecule::addMesh(), Avogadro::Molecule::addResidue(), Avogadro::Molecule::addRing(), Avogadro::Molecule::operator=(), and Avogadro::Molecule::removeAtom().
Type Avogadro::Primitive::type | ( | ) | const |
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.
References updated().
Referenced by Avogadro::Atom::setAtomicNumber(), and Avogadro::GLWidget::setSelected().
void Avogadro::Primitive::updated | ( | ) | [signal] |
Emitted when the primitive has been updated.
Referenced by Avogadro::Residue::addAtom(), Avogadro::Molecule::addAtom(), Avogadro::Molecule::addBond(), Avogadro::Molecule::addCube(), Avogadro::Molecule::addMesh(), Avogadro::Molecule::addResidue(), Avogadro::Molecule::addRing(), Avogadro::Molecule::Molecule(), Avogadro::Residue::removeAtom(), Avogadro::Molecule::removeAtom(), Avogadro::Molecule::removeBond(), Avogadro::Molecule::removeCube(), Avogadro::Molecule::removeMesh(), Avogadro::Molecule::removeResidue(), Avogadro::Molecule::removeRing(), Avogadro::Molecule::update(), update(), and Avogadro::Molecule::updateMolecule().