Class Avogadro::QtGui::ToolPlugin#
-
class ToolPlugin : public QObject#
The base class for plugins that interact with QtOpenGL::GLWidget.
- Author
Allison Vacanti
Unnamed Group
-
virtual QUndoCommand *mousePressEvent(QMouseEvent *e)#
Respond to user-input events.
- Parameters:
e – The 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.
-
virtual QUndoCommand *mouseReleaseEvent(QMouseEvent *e)#
Respond to user-input events.
- Parameters:
e – The 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.
-
virtual QUndoCommand *mouseMoveEvent(QMouseEvent *e)#
Respond to user-input events.
- Parameters:
e – The 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.
-
virtual QUndoCommand *mouseDoubleClickEvent(QMouseEvent *e)#
Respond to user-input events.
- Parameters:
e – The 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.
-
virtual QUndoCommand *wheelEvent(QWheelEvent *e)#
Respond to user-input events.
- Parameters:
e – The 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.
-
virtual QUndoCommand *keyPressEvent(QKeyEvent *e)#
Respond to user-input events.
- Parameters:
e – The 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.
-
virtual QUndoCommand *keyReleaseEvent(QKeyEvent *e)#
Respond to user-input events.
- Parameters:
e – The 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.
Public Functions
-
explicit ToolPlugin(QObject *parent = nullptr)#
-
~ToolPlugin() override#
-
virtual QString name() const = 0#
The name of the tool, will be displayed in the user interface.
-
virtual QString description() const = 0#
A description of the tool, may be displayed in the user interface.
-
virtual unsigned char priority() const = 0#
A priority of the tool for sorting in the user interface.
-
virtual QAction *activateAction() const = 0#
- Returns:
The QAction that will cause this tool to become active.
-
virtual QWidget *toolWidget() const = 0#
- Returns:
A QWidget that will be displayed to the user while this tool is active.
Public Slots
-
inline virtual void setEditMolecule(QtGui::RWMolecule*)#
-
inline virtual void setActiveWidget(QWidget*)#
Set the active widget used by the tool, this can be anything derived from QWidget.
-
inline virtual void setGLRenderer(Rendering::GLRenderer*)#
Set the GLRenderer used by the tool.