Avogadro  1.1.0
Public Member Functions
Avogadro::PythonEngine Class Reference
Inheritance diagram for Avogadro::PythonEngine:
Inheritance graph

List of all members.

Public Member Functions

 PythonEngine (QObject *parent=0, const QString &filename=QString())
 ~PythonEngine ()
Engineclone () const
To python delegetad functions
QString identifier () const
QString name () const
QString description () const
Layers layers () const
double transparencyDepth () const
bool renderOpaque (PainterDevice *pd)
QWidgetsettingsWidget ()
void writeSettings (QSettings &settings) const
void readSettings (QSettings &settings)

Member Function Documentation

engine description.

Reimplemented from Avogadro::Engine.

References QObject::tr().

Virtual unique identifier - needing for saving and loading state.

This should not be manually overridden - the Engine macro does it.

Implements Avogadro::Engine.

Engine::Layers Avogadro::PythonEngine::layers ( ) const [virtual]
the layers used by this engine.

Reimplemented from Avogadro::Engine.

a string with the name of the engine.

Implements Avogadro::Engine.

References QObject::tr().

void Avogadro::PythonEngine::readSettings ( QSettings settings) [virtual]

Read in the settings that have been saved for the engine instance.

Reimplemented from Avogadro::Engine.

Render opaque elements. This function is allowed to render whatever opaque primitives it wishes. There is no requirement that it render every primitive.

During generation of the GL view engines will have their render functions called at most once. It is the responsibility of the engine to render all of the objects in it's queue if it can.

true if the rendering was completed successfully, false otherwise


 Color *map = colorMap(); // possible custom color map
 if (!map) map = pd->colorMap(); // fall back to global color map

 // Get a list of bonds and render them
 QList<Primitive *> list;
 list = primitives().subList(Primitive::BondType);

 foreach(Primitive *p, list)
   render(static_cast<const Bond *>(p))

 return true;
To allow picking to happen you need to push the object type and name. If objects cannot be picked this may be omitted.

For more information on the various primitive lists available see PrimitiveList.

Implements Avogadro::Engine.

a QWidget containing the engine settings or 0 if no settings widget is available.

Reimplemented from Avogadro::Engine.

References QLayout::addWidget(), QObject::connect(), QObject::destroyed(), QWidget::layout(), and QWidget::setLayout().

double Avogadro::PythonEngine::transparencyDepth ( ) const [virtual]
transparency level, rendered low to high.

Reimplemented from Avogadro::Engine.

void Avogadro::PythonEngine::writeSettings ( QSettings settings) const [virtual]

Write the engine settings so that they can be saved between sessions.

Reimplemented from Avogadro::Engine.

The documentation for this class was generated from the following files: