Loading...
Searching...
No Matches
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

GLWidget * | activeGLWidget () const
QWidget * | activeWidget () const
QtGui::Molecule * | activeMolecule () const

## Static Public Member Functions

static ActiveObjects & | instance ()

## 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()

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.

## 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.

## setActiveMolecule

void setActiveMolecule | ( | QtGui::Molecule * | molecule | ) |

slot

Set the active molecule.

## activeGLWidgetChanged

void activeGLWidgetChanged | ( | GLWidget * | glWidget | ) |

signal

The active GL widget changed.

## activeWidgetChanged

void activeWidgetChanged | ( | QWidget * | widget | ) |

signal

The active widget changed.

## activeMoleculeChanged

void activeMoleculeChanged | ( | QtGui::Molecule * | molecule | ) |

signal

The active molecule changed.

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

- activeobjects.h