kalzium
Avogadro::Tool Class Reference
#include <tool.h>
Inheritance diagram for Avogadro::Tool:

Detailed Description
Interface for tool plugins.This is a template class for tools which manipulate the GLWidget area. The functions they implement are in response to actions performed by the user on the GLWidget.
Definition at line 53 of file src/tool.h.
Public Member Functions | |
| Tool (QObject *parent=0) | |
| virtual | ~Tool () |
| virtual QString | name () const |
| virtual QString | description () const |
| virtual QAction * | activateAction () const |
| virtual QWidget * | settingsWidget () |
| virtual QUndoCommand * | mousePress (GLWidget *widget, const QMouseEvent *event)=0 |
| virtual QUndoCommand * | mouseRelease (GLWidget *widget, const QMouseEvent *event)=0 |
| virtual QUndoCommand * | mouseMove (GLWidget *widget, const QMouseEvent *event)=0 |
| virtual QUndoCommand * | wheel (GLWidget *widget, const QWheelEvent *event)=0 |
| virtual bool | paint (GLWidget *widget) |
| virtual int | usefulness () const |
| bool | operator< (const Tool &other) const |
Protected Attributes | |
| ToolPrivate *const | d |
Constructor & Destructor Documentation
Member Function Documentation
| QString Avogadro::Tool::name | ( | ) | const [virtual] |
| QString Avogadro::Tool::description | ( | ) | const [virtual] |
| QAction * Avogadro::Tool::activateAction | ( | ) | const [virtual] |
| virtual QUndoCommand* Avogadro::Tool::mousePress | ( | GLWidget * | widget, | |
| const QMouseEvent * | event | |||
| ) | [pure virtual] |
Response to mouse press.
- Parameters:
-
widget the GLWidget where the even occurred event the mouse event information
Implemented in Avogadro::NavigateTool.
| virtual QUndoCommand* Avogadro::Tool::mouseRelease | ( | GLWidget * | widget, | |
| const QMouseEvent * | event | |||
| ) | [pure virtual] |
Response to mouse release.
- Parameters:
-
widget the GLWidget where the even occurred event the mouse event information
Implemented in Avogadro::NavigateTool.
| virtual QUndoCommand* Avogadro::Tool::mouseMove | ( | GLWidget * | widget, | |
| const QMouseEvent * | event | |||
| ) | [pure virtual] |
Response to mouse movement.
- Parameters:
-
widget the GLWidget where the even occurred event the mouse event information
Implemented in Avogadro::NavigateTool.
| virtual QUndoCommand* Avogadro::Tool::wheel | ( | GLWidget * | widget, | |
| const QWheelEvent * | event | |||
| ) | [pure virtual] |
Response to mouse wheel movement.
- Parameters:
-
widget the GLWidget where the even occurred event the mouse wheel event information
Implemented in Avogadro::NavigateTool.
| bool Avogadro::Tool::paint | ( | GLWidget * | widget | ) | [virtual] |
Called by the GLWidget allowing overlay painting by the tool.
Tools get painted last in the overall scheme.
- Parameters:
-
widget the GLWidget to paint to
Reimplemented in Avogadro::NavigateTool.
| int Avogadro::Tool::usefulness | ( | ) | const [virtual] |
Determines the ordering of the tools.
More useful tools are placed first. It is up to the tool designer to be humble about their usefulness value.
- Returns:
- usefulness value
Reimplemented in Avogadro::NavigateTool.
Member Data Documentation
ToolPrivate* const Avogadro::Tool::d [protected] |
Definition at line 113 of file src/tool.h.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference