AvogadroLibs  1.96.0
Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
ActiveObjects Class Reference

Singleton to provide access to active objects. More...

#include <avogadro/qtopengl/activeobjects.h>

Inheritance diagram for ActiveObjects:

Public Slots

void setActiveGLWidget (GLWidget *glWidget)
 
void setActiveWidget (QWidget *widget)
 
void setActiveMolecule (QtGui::Molecule *molecule)
 

Signals

void activeGLWidgetChanged (GLWidget *glWidget)
 
void activeWidgetChanged (QWidget *widget)
 
void activeMoleculeChanged (QtGui::Molecule *molecule)
 

Public Member Functions

GLWidgetactiveGLWidget () const
 
QWidget * activeWidget () const
 
QtGui::MoleculeactiveMolecule () const
 

Static Public Member Functions

static ActiveObjectsinstance ()
 

Detailed Description

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.

Member Function Documentation

◆ instance()

static ActiveObjects& instance ( )
static

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

◆ activeGLWidget()

GLWidget* activeGLWidget ( ) const

Get the active GLWidget.

◆ activeWidget()

QWidget* activeWidget ( ) const

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

◆ activeMolecule()

QtGui::Molecule* activeMolecule ( ) const

Get the active molecule.

◆ setActiveGLWidget

void setActiveGLWidget ( GLWidget glWidget)
slot

Set the active GLWidget.

◆ setActiveWidget

void setActiveWidget ( QWidget *  widget)
slot

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

◆ setActiveMolecule

void setActiveMolecule ( QtGui::Molecule molecule)
slot

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

◆ activeGLWidgetChanged

void activeGLWidgetChanged ( GLWidget glWidget)
signal

The active GL widget changed.

◆ activeWidgetChanged

void activeWidgetChanged ( QWidget *  widget)
signal

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

◆ activeMoleculeChanged

void activeMoleculeChanged ( QtGui::Molecule molecule)
signal

The active molecule changed.


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