Avogadro
1.1.0
|
Public Member Functions | |
PythonEngine (QObject *parent=0, const QString &filename=QString()) | |
Constructor. | |
~PythonEngine () | |
Deconstructor. | |
Engine * | clone () 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) |
QWidget * | settingsWidget () |
void | writeSettings (QSettings &settings) const |
void | readSettings (QSettings &settings) |
QString Avogadro::PythonEngine::description | ( | ) | const [virtual] |
QString Avogadro::PythonEngine::identifier | ( | ) | const [virtual] |
Virtual unique identifier - needing for saving and loading state.
Implements Avogadro::Engine.
Engine::Layers Avogadro::PythonEngine::layers | ( | ) | const [virtual] |
Reimplemented from Avogadro::Engine.
QString Avogadro::PythonEngine::name | ( | ) | const [virtual] |
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.
bool Avogadro::PythonEngine::renderOpaque | ( | PainterDevice * | pd | ) | [virtual] |
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
otherwiseExample
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;
For more information on the various primitive lists available see PrimitiveList.
Implements Avogadro::Engine.
QWidget * Avogadro::PythonEngine::settingsWidget | ( | ) | [virtual] |
Reimplemented from Avogadro::Engine.
References QLayout::addWidget(), QObject::connect(), QObject::destroyed(), QWidget::layout(), and QWidget::setLayout().
double Avogadro::PythonEngine::transparencyDepth | ( | ) | const [virtual] |
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.