• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdeedu
  • Sitemap
  • Contact Us
 

kalzium

Avogadro::Tool

Avogadro::Tool Class Reference

#include <tool.h>

Inheritance diagram for Avogadro::Tool:

Inheritance graph
[legend]

List of all members.


Detailed Description

Interface for tool plugins.

Author:
Donald Ephraim Curtis <donald-curtis@uiowa.edu>
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

Avogadro::Tool::Tool ( QObject *  parent = 0  ) 

Definition at line 43 of file tool.cpp.

Avogadro::Tool::~Tool (  )  [virtual]

Definition at line 50 of file tool.cpp.


Member Function Documentation

QString Avogadro::Tool::name (  )  const [virtual]

Reimplemented in Avogadro::NavigateTool.

Definition at line 56 of file tool.cpp.

QString Avogadro::Tool::description (  )  const [virtual]

Reimplemented in Avogadro::NavigateTool.

Definition at line 61 of file tool.cpp.

QAction * Avogadro::Tool::activateAction (  )  const [virtual]

Definition at line 66 of file tool.cpp.

QWidget * Avogadro::Tool::settingsWidget (  )  [virtual]

Definition at line 77 of file tool.cpp.

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.

Definition at line 91 of file tool.cpp.

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.

Definition at line 82 of file tool.cpp.

bool Avogadro::Tool::operator< ( const Tool &  other  )  const

Definition at line 87 of file tool.cpp.


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:
  • src/tool.h
  • tool.cpp

kalzium

Skip menu "kalzium"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal