GLMoleculeView Class Reference

#include <glmoleculeview.h>

Inheritance diagram for GLMoleculeView:

GLSimpleMoleculeView GLView List of all members.

Detailed Description

This class shows a molecule and various properties in 3D using OpenGL.

It is a subclass of GLSimpleMoleculeView and additionally allows changing the molecule, visualisation of isodensity surfaces etc.

Definition at line 44 of file glmoleculeview.h.

Public Slots

void alterCartesian ()
 Changes the cartesian coordinates of the selection.
void alterInternal ()
 Changes the cartesian coordinates of the selection.
void showDensity ()
 Shows electron density isosurfaces from a Gaussian .cube file.
void addAtoms ()
 Shows a dialog allowing the addition of atoms to the molecule.
void deleteSelectedAtoms ()
 Deletes all selected atoms.
void toggleSelection ()
 Toggles between manipulating the selected atoms and the entire system.

Signals

void atomsetChanged ()
 Is emitted when the number of atoms has been changed.

Public Member Functions

 GLMoleculeView (AtomSet *atomset, QWidget *parent=0, const char *name=0)
 ~GLMoleculeView ()
 The default destructor.

Protected Member Functions

void mouseMoveEvent (QMouseEvent *e)
 Overridden from GLView::mouseMoveEvent.
void keyPressEvent (QKeyEvent *e)
 Overridden from GLSimpleMoleculeView::keyPressEvent.
virtual void updateShapes ()
 Updates the contents of the shapes vector.

Private Types

enum  ShapeTypesExtra { SHAPE_SURFACE = SHAPE_NEXT }

Private Slots

void addGLSurface (const unsigned int index)
 Creates a display list for a new surface.
void updateGLSurface (const unsigned int index)
 Updates the display list for an existing surface.
void deleteGLSurface (const unsigned int index)
 Deletes the display list for an existing surface.

Private Member Functions

float boundingSphereRadius ()
 Calculates the radius of the bounding sphere.
void translateSelection (const int xRange, const int yRange, const int zRange)
 Translates the selected atoms according to the screen.
void rotateSelection (const double angleX, const double angleY, const double angleZ)
 Rotates the selected atoms around their local center of mass.
void changeSelectedIC (const int range)
 Changes the selected internal coordinate according to the magnitude and direction of the range.
void drawItem (const unsigned int index)
 Draws the item shapes[index].

Private Attributes

AtomSetatoms
 The list of atoms.
IsoSurfaceisoSurface
 An isodensity surface.
DensityBasedensityDialog
 A dialog for changing the isodensity surfaces.
NewAtomBasenewAtomDialog
 A dialog for adding atoms to the atomset.
std::vector< GLuint > glSurfaces
 A vector that holds the GL display list indices for surfaces.
bool manipulateSelection
 If true, only the selected atoms are manipulated instead of the entire system.


Member Enumeration Documentation

enum GLMoleculeView::ShapeTypesExtra [private]
 

Enumerator:
SHAPE_SURFACE 

Definition at line 78 of file glmoleculeview.h.


Constructor & Destructor Documentation

GLMoleculeView::GLMoleculeView AtomSet atomset,
QWidget *  parent = 0,
const char *  name = 0
 

Definition at line 61 of file glmoleculeview.cpp.

GLMoleculeView::~GLMoleculeView  ) 
 

The default destructor.

Definition at line 72 of file glmoleculeview.cpp.


Member Function Documentation

void GLMoleculeView::atomsetChanged  )  [signal]
 

Is emitted when the number of atoms has been changed.

void GLMoleculeView::alterCartesian  )  [slot]
 

Changes the cartesian coordinates of the selection.

If one atom is selected, the absolute coordinates can be changed If multiple atoms are selected, only relative changes can be given.

Definition at line 86 of file glmoleculeview.cpp.

void GLMoleculeView::alterInternal  )  [slot]
 

Changes the cartesian coordinates of the selection.

If one atom is selected, the absolute coordinates can be changed If multiple atoms are selected, only relative changes can be given

Definition at line 166 of file glmoleculeview.cpp.

void GLMoleculeView::showDensity  )  [slot]
 

Shows electron density isosurfaces from a Gaussian .cube file.

Definition at line 238 of file glmoleculeview.cpp.

void GLMoleculeView::addAtoms  )  [slot]
 

Shows a dialog allowing the addition of atoms to the molecule.

Definition at line 255 of file glmoleculeview.cpp.

void GLMoleculeView::deleteSelectedAtoms  )  [slot]
 

Deletes all selected atoms.

Definition at line 269 of file glmoleculeview.cpp.

void GLMoleculeView::toggleSelection  )  [slot]
 

Toggles between manipulating the selected atoms and the entire system.

Definition at line 295 of file glmoleculeview.cpp.

void GLMoleculeView::mouseMoveEvent QMouseEvent *  e  )  [protected]
 

Overridden from GLView::mouseMoveEvent.

Handles left mouse button drags.

Reimplemented from GLView.

Definition at line 373 of file glmoleculeview.cpp.

void GLMoleculeView::keyPressEvent QKeyEvent *  e  )  [protected, virtual]
 

Overridden from GLSimpleMoleculeView::keyPressEvent.

Handles key presses for manipulating selections.

Reimplemented from GLSimpleMoleculeView.

Definition at line 410 of file glmoleculeview.cpp.

void GLMoleculeView::updateShapes  )  [protected, virtual]
 

Updates the contents of the shapes vector.

Overridden from GLSimpleMoleculeView::updateShapes().

Reimplemented from GLSimpleMoleculeView.

Definition at line 471 of file glmoleculeview.cpp.

void GLMoleculeView::addGLSurface const unsigned int  index  )  [private, slot]
 

Creates a display list for a new surface.

Definition at line 497 of file glmoleculeview.cpp.

void GLMoleculeView::updateGLSurface const unsigned int  index  )  [private, slot]
 

Updates the display list for an existing surface.

Definition at line 515 of file glmoleculeview.cpp.

void GLMoleculeView::deleteGLSurface const unsigned int  index  )  [private, slot]
 

Deletes the display list for an existing surface.

Definition at line 582 of file glmoleculeview.cpp.

float GLMoleculeView::boundingSphereRadius  )  [private, virtual]
 

Calculates the radius of the bounding sphere.

If atoms are present, the radius of the base class is used. If no atoms are present but there is a density loaded, its box is used.

Reimplemented from GLSimpleMoleculeView.

Definition at line 306 of file glmoleculeview.cpp.

void GLMoleculeView::translateSelection const int  xRange,
const int  yRange,
const int  zRange
[private]
 

Translates the selected atoms according to the screen.

Definition at line 598 of file glmoleculeview.cpp.

void GLMoleculeView::rotateSelection const double  angleX,
const double  angleY,
const double  angleZ
[private]
 

Rotates the selected atoms around their local center of mass.

Definition at line 669 of file glmoleculeview.cpp.

void GLMoleculeView::changeSelectedIC const int  range  )  [private]
 

Changes the selected internal coordinate according to the magnitude and direction of the range.

Definition at line 732 of file glmoleculeview.cpp.

void GLMoleculeView::drawItem const unsigned int  index  )  [private, virtual]
 

Draws the item shapes[index].

Reimplemented from GLSimpleMoleculeView.

Definition at line 765 of file glmoleculeview.cpp.


Member Data Documentation

AtomSet* GLMoleculeView::atoms [private]
 

The list of atoms.

Reimplemented from GLSimpleMoleculeView.

Definition at line 88 of file glmoleculeview.h.

IsoSurface* GLMoleculeView::isoSurface [private]
 

An isodensity surface.

Definition at line 89 of file glmoleculeview.h.

DensityBase* GLMoleculeView::densityDialog [private]
 

A dialog for changing the isodensity surfaces.

Definition at line 90 of file glmoleculeview.h.

NewAtomBase* GLMoleculeView::newAtomDialog [private]
 

A dialog for adding atoms to the atomset.

Definition at line 91 of file glmoleculeview.h.

std::vector<GLuint> GLMoleculeView::glSurfaces [private]
 

A vector that holds the GL display list indices for surfaces.

Definition at line 92 of file glmoleculeview.h.

bool GLMoleculeView::manipulateSelection [private]
 

If true, only the selected atoms are manipulated instead of the entire system.

Definition at line 93 of file glmoleculeview.h.


Generated on Fri May 19 14:31:57 2006 for Brabosphere by  doxygen 1.4.6-NO