|
Avogadro
1.1.0
|
Manager for GLWidget Tools. More...
#include <toolgroup.h>

Public Slots | |
| void | setActiveTool (int i) |
| void | setActiveTool (const QString &name) |
| void | setActiveTool (Tool *tool) |
| void | setMolecule (Molecule *molecule) |
| void | writeSettings (QSettings &settings) const |
| void | readSettings (QSettings &settings) |
| void | removeAllTools () |
Signals | |
| void | toolActivated (Tool *tool) |
| void | toolsDestroyed () |
Public Member Functions | |
| ToolGroup (QObject *parent=0) | |
| ~ToolGroup () | |
| void | append (QList< Tool * > tools) |
| void | append (Tool *tool) |
| Tool * | activeTool () const |
| Tool * | tool (int i) const |
| const QList< Tool * > & | tools () const |
| const QActionGroup * | activateActions () const |
Manager for GLWidget Tools.
This class is a collection of Tools which allow manipulation of the GLWidget area.
| Avogadro::ToolGroup::ToolGroup | ( | QObject * | parent = 0 | ) |
Constructor
Deconstructor
| const QActionGroup * Avogadro::ToolGroup::activateActions | ( | ) | const |
| Tool * Avogadro::ToolGroup::activeTool | ( | ) | const |
Referenced by Avogadro::GLWidget::setToolGroup().
| void Avogadro::ToolGroup::append | ( | QList< Tool * > | tools | ) |
Append the tools to the toolgroup.
References Avogadro::Tool::activateAction(), QObject::connect(), QObject::destroyed(), setActiveTool(), tool(), and toolsDestroyed().
| void Avogadro::ToolGroup::append | ( | Tool * | tool | ) |
Append the tool to the toolgroup.
References Avogadro::Tool::activateAction(), QObject::connect(), and setActiveTool().
| void Avogadro::ToolGroup::readSettings | ( | QSettings & | settings | ) | [slot] |
Read the settings of the GLWidget and restore them.
References QSettings::beginGroup(), QSettings::endGroup(), Avogadro::Plugin::identifier(), and Avogadro::Tool::readSettings().
| void Avogadro::ToolGroup::removeAllTools | ( | ) | [slot] |
Reset the toolgroup to it's original state.
| void Avogadro::ToolGroup::setActiveTool | ( | int | i | ) | [slot] |
| i | index of the tool to set active |
References QList::size(), and tools().
Referenced by append(), and setActiveTool().
| void Avogadro::ToolGroup::setActiveTool | ( | const QString & | name | ) | [slot] |
| name | the name of the tool to set active (if it's found) |
References Avogadro::Plugin::identifier(), QObject::name(), and setActiveTool().
| void Avogadro::ToolGroup::setActiveTool | ( | Tool * | tool | ) | [slot] |
| tool | pointer to the tool to set active |
References Avogadro::Tool::activateAction(), QAction::setChecked(), tool(), and toolActivated().
| void Avogadro::ToolGroup::setMolecule | ( | Molecule * | molecule | ) | [slot] |
| molecule | pointer to the molecule tools in this group should use |
References Avogadro::Tool::setMolecule().
| Tool * Avogadro::ToolGroup::tool | ( | int | i | ) | const |
| i | index of the tool to return |
References QList::size(), and tools().
Referenced by append(), and setActiveTool().
| void Avogadro::ToolGroup::toolActivated | ( | Tool * | tool | ) | [signal] |
| tool | the activated tool |
Referenced by setActiveTool().
| const QList< Tool * > & Avogadro::ToolGroup::tools | ( | ) | const |
Referenced by setActiveTool(), and tool().
| void Avogadro::ToolGroup::toolsDestroyed | ( | ) | [signal] |
This signal is emitted when one or more tools are destoyed. (Happens when plugins are reloaded)
Referenced by append().
| void Avogadro::ToolGroup::writeSettings | ( | QSettings & | settings | ) | const [slot] |
Write the settings of the GLWidget in order to save them to disk.
References QSettings::beginGroup(), QSettings::endGroup(), Avogadro::Plugin::identifier(), and Avogadro::Tool::writeSettings().
1.8.0