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

List of all members.

Public Member Functions

 PythonEngine (QObject *parent=0, const QString &filename=QString())
 Constructor.
 ~PythonEngine ()
 Deconstructor.
Engineclone () const
 Copy.
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

Returns:
engine description.

Reimplemented from Avogadro::Engine.

References QObject::tr().

Virtual unique identifier - needing for saving and loading state.

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

Implements Avogadro::Engine.

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

Reimplemented from Avogadro::Engine.

Returns:
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.

Returns:
true if the rendering was completed successfully, false otherwise

Example

 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;
Note:
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.

Returns:
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]
Returns:
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: