AvogadroLibs  1.93.1
Public Member Functions | List of all members
SelectionTool Class Reference

SelectionTool selects atoms and bonds from the screen.

#include <selectiontool.h>

Inheritance diagram for SelectionTool:
ToolPlugin

Public Member Functions

 SelectionTool (QObject *parent_=nullptr)
 
QString name () const override
 
QString description () const override
 
unsigned char priority () const override
 
QAction * activateAction () const override
 
QWidget * toolWidget () const override
 
void setMolecule (QtGui::Molecule *) override
 
void setGLRenderer (Rendering::GLRenderer *renderer) override
 
QUndoCommand * mousePressEvent (QMouseEvent *e) override
 
QUndoCommand * mouseReleaseEvent (QMouseEvent *e) override
 
QUndoCommand * mouseDoubleClickEvent (QMouseEvent *e) override
 
QUndoCommand * mouseMoveEvent (QMouseEvent *e) override
 
QUndoCommand * keyPressEvent (QKeyEvent *e) override
 
void draw (Rendering::GroupNode &node) override
 
- Public Member Functions inherited from ToolPlugin
 ToolPlugin (QObject *parent=0)
 
virtual QUndoCommand * wheelEvent (QWheelEvent *e)
 
virtual QUndoCommand * keyReleaseEvent (QKeyEvent *e)
 

Additional Inherited Members

- Public Slots inherited from ToolPlugin
virtual void setEditMolecule (QtGui::RWMolecule *)
 
virtual void setGLWidget (QtOpenGL::GLWidget *)
 
virtual void setActiveWidget (QWidget *)
 
- Signals inherited from ToolPlugin
void drawablesChanged ()
 
void updateRequested ()
 

Member Function Documentation

◆ name()

QString name ( ) const
overridevirtual

The name of the tool, will be displayed in the user interface.

Implements ToolPlugin.

◆ description()

QString description ( ) const
overridevirtual

A description of the tool, may be displayed in the user interface.

Implements ToolPlugin.

◆ priority()

unsigned char priority ( ) const
overridevirtual

A priority of the tool for sorting in the user interface.

Implements ToolPlugin.

◆ activateAction()

QAction* activateAction ( ) const
overridevirtual
Returns
The QAction that will cause this tool to become active.

Implements ToolPlugin.

◆ toolWidget()

QWidget* toolWidget ( ) const
overridevirtual
Returns
A QWidget that will be displayed to the user while this tool is active.

Implements ToolPlugin.

◆ setMolecule()

void setMolecule ( QtGui::Molecule mol)
overridevirtual

Called when the current molecule changes.

Implements ToolPlugin.

◆ setGLRenderer()

void setGLRenderer ( Rendering::GLRenderer )
overridevirtual

Set the GLRenderer used by the tool.

Reimplemented from ToolPlugin.

◆ mousePressEvent()

QUndoCommand* mousePressEvent ( QMouseEvent *  e)
overridevirtual

Respond to user-input events.

Parameters
eThe QEvent object.
Returns
A QUndoCommand that can be used to undo any changes to the molecule. If no undoable change is made, the method may return nullptr.

Reimplemented from ToolPlugin.

◆ mouseReleaseEvent()

QUndoCommand* mouseReleaseEvent ( QMouseEvent *  e)
overridevirtual

Respond to user-input events.

Parameters
eThe QEvent object.
Returns
A QUndoCommand that can be used to undo any changes to the molecule. If no undoable change is made, the method may return nullptr.

Reimplemented from ToolPlugin.

◆ mouseDoubleClickEvent()

QUndoCommand* mouseDoubleClickEvent ( QMouseEvent *  e)
overridevirtual

Respond to user-input events.

Parameters
eThe QEvent object.
Returns
A QUndoCommand that can be used to undo any changes to the molecule. If no undoable change is made, the method may return nullptr.

Reimplemented from ToolPlugin.

◆ mouseMoveEvent()

QUndoCommand* mouseMoveEvent ( QMouseEvent *  e)
overridevirtual

Respond to user-input events.

Parameters
eThe QEvent object.
Returns
A QUndoCommand that can be used to undo any changes to the molecule. If no undoable change is made, the method may return nullptr.

Reimplemented from ToolPlugin.

◆ keyPressEvent()

QUndoCommand* keyPressEvent ( QKeyEvent *  e)
overridevirtual

Respond to user-input events.

Parameters
eThe QEvent object.
Returns
A QUndoCommand that can be used to undo any changes to the molecule. If no undoable change is made, the method may return nullptr.

Reimplemented from ToolPlugin.

◆ draw()

void draw ( Rendering::GroupNode node)
overridevirtual

Override this method to add drawables to the scene graph.

Reimplemented from ToolPlugin.


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