Avogadro::QtOpenGL::ActiveObjects#

class ActiveObjects : public QObject#

Singleton to provide access to active objects.

This class provides access to the active objects in the running application. If you write an application using the Avogadro libraries you need to keep this class updated with changes in active objects in order for built in features to work as expected.

All returned objects are owned by the running application, nullptr indicates that there is no currently active object of that type.

Public Functions

GLWidget *activeGLWidget() const#

Get the active GLWidget.

QWidget *activeWidget() const#

Get the active widget (more general, could be GLWidget, vtkGLWidget, etc).

QtGui::Molecule *activeMolecule() const#

Get the active molecule.

Public Slots

void setActiveGLWidget(GLWidget *glWidget)#

Set the active GLWidget.

void setActiveWidget(QWidget *widget)#

Set the active widget (GLWidget, vtkGLWidget, etc).

void setActiveMolecule(QtGui::Molecule *molecule)#

Set the active widget (GLWidget, vtkGLWidget, etc).

Signals

void activeGLWidgetChanged(GLWidget *glWidget)#

The active GL widget changed.

void activeWidgetChanged(QWidget *widget)#

The active widget changed (GLWidget, vtkGLWidget, etc).

void activeMoleculeChanged(QtGui::Molecule *molecule)#

The active molecule changed.

Public Static Functions

static ActiveObjects &instance()#

Return a reference to the singleton instance that can be queried.